<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-9122775846015663009</id><updated>2024-08-28T11:48:08.697-03:00</updated><category term="Linux"/><category term="equipamentos"/><category term="Python"/><category term="Freebsd"/><category term="Jogos"/><title type='text'>SnakeCode</title><subtitle type='html'>Dicas de programação, Desenvolvimento de softwares e  curiosidades.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://snakecode.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9122775846015663009/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://snakecode.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/01301257559700427958</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>17</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-9122775846015663009.post-5753890618251238306</id><published>2013-05-30T11:27:00.001-03:00</published><updated>2013-06-01T08:15:47.413-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Python"/><title type='text'>Pegar o número de CPUs (CORES) usando python</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgEydZ-sQYpzFECqfjiyLS_t8hvFZdRfamhebFs0e6LQqLiZRVXPccoM5Fvqjdvymgq1E6lrBf9etd7o1vyJ5kRQmfsuXJ3MXZFK57Z6MLTWi621G5I4KDiJ-GxudJPs9Q0rHWdpVyTBIU/s1600/core_i7.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;269&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgEydZ-sQYpzFECqfjiyLS_t8hvFZdRfamhebFs0e6LQqLiZRVXPccoM5Fvqjdvymgq1E6lrBf9etd7o1vyJ5kRQmfsuXJ3MXZFK57Z6MLTWi621G5I4KDiJ-GxudJPs9Q0rHWdpVyTBIU/s320/core_i7.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
Eu estava testando alguns algorítimos para funcionar de forma a usar os vários núcleos das máquinas atuais (Core i7 - 8 núcleos), porem esse número pode varia para mais ou para menos dependendo da máquina. Quando só importa a sua máquina para processar o algorítimo, você acaba colocando o numero de threads simultâneas manualmente... porem quando você quer extrair o máximo da maquina, independente de qual ela seja, você deve encontrar de forma automática o número de cores para determinar o melhor número de threads a ser usada simultaneamente.&lt;br /&gt;
&lt;br /&gt;
Porem no Python isso pode variar um pouco, aqui eu juntei vários casos de como determinar o número de cores (CPUs) em vários ambientes diferentes: (Windows, Linux, FreeBSD, Jython e outros)&lt;br /&gt;
&lt;br /&gt;
Cada uma das funções abaixo serve tem uma forma diferente de determinar o número de CPUs, é só escolher a que mais se adéqua ao seu ambiente.&lt;br /&gt;
&lt;br /&gt;
def get_cores_python():&lt;br /&gt;
&amp;nbsp; &amp;nbsp; u&quot;\nRetorna o número de cpu usnado python 2.6+\n&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; import multiprocessing&lt;br /&gt;
&amp;nbsp; &amp;nbsp; return multiprocessing.cpu_count()&lt;br /&gt;
&lt;br /&gt;
#-----------&lt;br /&gt;
&lt;br /&gt;
def get_cores_posix():&lt;br /&gt;
&amp;nbsp; &amp;nbsp; u&quot;\nRetorna o número de cpu usnado POSIX(Interface Portável entre Sistemas Operacionais)\n&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; import os&lt;br /&gt;
&amp;nbsp; &amp;nbsp; res = int(os.sysconf(&#39;SC_NPROCESSORS_ONLN&#39;))&lt;br /&gt;
&amp;nbsp; &amp;nbsp; if res &amp;gt; 0:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return res&lt;br /&gt;
&amp;nbsp; &amp;nbsp; return None&lt;br /&gt;
&lt;br /&gt;
#-----------&lt;br /&gt;
&lt;br /&gt;
def get_cores_psutil():&lt;br /&gt;
&amp;nbsp; &amp;nbsp; u&quot;&quot;&quot;&lt;br /&gt;
Retorna o número de cpu usnado google psutil&lt;br /&gt;
http://code.google.com/p/psutil/&lt;br /&gt;
&quot;&quot;&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; import psutil&lt;br /&gt;
&amp;nbsp; &amp;nbsp; return psutil.NUM_CPUS&lt;br /&gt;
&lt;br /&gt;
#-----------&lt;br /&gt;
&lt;br /&gt;
def get_cores_windows():&lt;br /&gt;
&amp;nbsp; &amp;nbsp; u&quot;\nRetorna o número de cores(CPUs) em máquinas Windows\n&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; import os&lt;br /&gt;
&amp;nbsp; &amp;nbsp; res = int(os.environ[&#39;NUMBER_OF_PROCESSORS&#39;])&lt;br /&gt;
&amp;nbsp; &amp;nbsp; if res &amp;gt; 0:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return res&lt;br /&gt;
&amp;nbsp; &amp;nbsp; return None&lt;br /&gt;
&lt;br /&gt;
#-----------&lt;br /&gt;
&lt;br /&gt;
def get_cores_jython():&lt;br /&gt;
&amp;nbsp; &amp;nbsp; u&quot;\nRetorna o númeo cores(CPUs) usando interpretador jython\n&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; from java.lang import Runtime&lt;br /&gt;
&amp;nbsp; &amp;nbsp; runtime = Runtime.getRuntime()&lt;br /&gt;
&amp;nbsp; &amp;nbsp; res = runtime.availableProcessors()&lt;br /&gt;
&amp;nbsp; &amp;nbsp; if res &amp;gt; 0:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return res&lt;br /&gt;
&amp;nbsp; &amp;nbsp; return None&lt;br /&gt;
&lt;br /&gt;
#-----------&lt;br /&gt;
&lt;br /&gt;
def get_cores_bsd():&lt;br /&gt;
&amp;nbsp; &amp;nbsp; u&quot;\nRetorna o número de cores(CPUs) usando o processo externo em máquinas com sistema BSD (FreeBSD, openBSD e outras)\n&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; import subprocess&lt;br /&gt;
&amp;nbsp; &amp;nbsp; sysctl = subprocess.Popen([&#39;sysctl&#39;, &#39;-n&#39;, &#39;hw.ncpu&#39;], stdout=subprocess.PIPE)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; scStdout = sysctl.communicate()[0]&lt;br /&gt;
&amp;nbsp; &amp;nbsp; res = int(scStdout)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; if res &amp;gt; 0:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return res&lt;br /&gt;
&amp;nbsp; &amp;nbsp; return None&lt;br /&gt;
&lt;br /&gt;
#-----------&lt;br /&gt;
&lt;br /&gt;
def get_cores_linux():&lt;br /&gt;
&amp;nbsp; &amp;nbsp; u&quot;\nRetorna o número de cores(CPUs) atraves da leitura do /proc/cpuinfo contando as chamadas de cada núcleo\n&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; res = open(&#39;/proc/cpuinfo&#39;).read().count(&#39;processor\t:&#39;)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; if res &amp;gt; 0:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return res&lt;br /&gt;
&amp;nbsp; &amp;nbsp; return None&lt;br /&gt;
&lt;br /&gt;
#-----------&lt;br /&gt;
&lt;br /&gt;
def get_cores_solaris():&lt;br /&gt;
&amp;nbsp; &amp;nbsp; u&quot;\nRetorna o número de cores(CPUs) atravez da leitura do /devices/pseudo/ contanto um a um\n&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; pseudoDevices = os.listdir(&#39;/devices/pseudo/&#39;)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; expr = re.compile(&#39;^cpuid@[0-9]+$&#39;)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; res = 0&lt;br /&gt;
&amp;nbsp; &amp;nbsp; for pd in pseudoDevices:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if expr.match(pd) != None:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; res += 1&lt;br /&gt;
&amp;nbsp; &amp;nbsp; if res &amp;gt; 0:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return res&lt;br /&gt;
&lt;br /&gt;
#-----------&lt;br /&gt;
&lt;br /&gt;
def get_cores_unixlike():&lt;br /&gt;
&amp;nbsp; &amp;nbsp; u&quot;&quot;&quot;&lt;br /&gt;
Returna o número de cores(CPUs) analisando o arquivo de log dmesg.&lt;br /&gt;
Esse processo pode varias muito entre versões do sistema operacial, então esse codigo pode necessitar de ajustes.&lt;br /&gt;
O quê importa é a idéia do algorítimo. -- Está validado usando ubuntu 13.04 --&lt;br /&gt;
&quot;&quot;&quot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; dmesg = open(&#39;/var/log/dmesg&#39;).read() # O local varia com a distribuição&lt;br /&gt;
&amp;nbsp; &amp;nbsp; dmesgProcess = subprocess.Popen([&#39;dmesg&#39;], stdout=subprocess.PIPE)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; dmesg = dmesgProcess.communicate()[0]&lt;br /&gt;
&amp;nbsp; &amp;nbsp; res = 0&lt;br /&gt;
&amp;nbsp; &amp;nbsp; while &#39; CPU&#39; + str(res) + &#39;: &#39; in dmesg: # faz o loog enquando &#39; CPU&lt;num_core&gt;: &#39; existir no arquivo de log&lt;/num_core&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; res += 1&lt;br /&gt;
&amp;nbsp; &amp;nbsp; if res &amp;gt; 0:&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return res&lt;br /&gt;
&amp;nbsp; &amp;nbsp; return None</content><link rel='replies' type='application/atom+xml' href='http://snakecode.blogspot.com/feeds/5753890618251238306/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://snakecode.blogspot.com/2013/05/pegar-o-numero-de-cpus-cores-usando.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9122775846015663009/posts/default/5753890618251238306'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9122775846015663009/posts/default/5753890618251238306'/><link rel='alternate' type='text/html' href='http://snakecode.blogspot.com/2013/05/pegar-o-numero-de-cpus-cores-usando.html' title='Pegar o número de CPUs (CORES) usando python'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/01301257559700427958</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgEydZ-sQYpzFECqfjiyLS_t8hvFZdRfamhebFs0e6LQqLiZRVXPccoM5Fvqjdvymgq1E6lrBf9etd7o1vyJ5kRQmfsuXJ3MXZFK57Z6MLTWi621G5I4KDiJ-GxudJPs9Q0rHWdpVyTBIU/s72-c/core_i7.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9122775846015663009.post-4507221334569000763</id><published>2011-04-13T09:42:00.003-03:00</published><updated>2011-04-13T10:13:30.318-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Python"/><title type='text'>Django + SQL Server no LINUX</title><content type='html'>&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7N-24shRG8CZEnGZ9OSLHj03YwztHG-2uLvj-8RmKCIXp39KYxJZmD9-Sb1_v_tCHiW7twX3VB-NZEtbhLgMZOYQn-0-G_B4a8S4vcbqbQeiNmccXMoDFw12CcYwCJFmuvwR1ir64H6I/s1600/sql.png&quot; onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot;&gt;&lt;img style=&quot;text-align: justify;float: left; margin-top: 0px; margin-right: 10px; margin-bottom: 10px; margin-left: 0px; cursor: pointer; width: 320px; height: 200px; &quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7N-24shRG8CZEnGZ9OSLHj03YwztHG-2uLvj-8RmKCIXp39KYxJZmD9-Sb1_v_tCHiW7twX3VB-NZEtbhLgMZOYQn-0-G_B4a8S4vcbqbQeiNmccXMoDFw12CcYwCJFmuvwR1ir64H6I/s320/sql.png&quot; border=&quot;0&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5595054841255053730&quot; /&gt;&lt;/a&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;13/04/2010&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Recente mente eu tive uns probleminhas ao tentar usar em um projeto o Django com o Microsoft SQL Server 2008, sendo que o Django está em uma maquina Linux.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;O primeiro problema foi como acessar, pois o Django não tem suporte nativo ao SQL Server.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Encontrei alguns módulos de terceiros que fazia o serviço, só que se o Django estivesse no windows.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Ex: django-mssql só funciona no Windows, usa uma outro modulo que não tem similar para Linux.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Minha saida foi usar o pymssql, que se demonstrou ser muito eficiente.&lt;/div&gt;&lt;div&gt;&lt;img src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEixZzhyg-GJK0aX1Nptla6hhClgDHzMkb_RYCuqJXV8IeB-0nt7_UfXTggG6dOAzHtYoIdLPyZq5n4RTweS8OPMnCHgBJEjhpawE91nXMH2BMI64qo_D4i2rcV3J8nzGwFSoqBH2Olb5hk/s320/django-logo-positive.png&quot; style=&quot;text-align: justify;float: right; margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 10px; cursor: pointer; width: 320px; height: 111px; &quot; border=&quot;0&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5595055173509087250&quot; /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Depois de ter aberto o SQL Server para TCP na porta 1433, consegui lo&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;gar com o pymssql facilmente, mas ainda tive uns obstáculos a superar.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;A minha ferramenta era para migração de dados, tirar o SQL Server e &lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;colocar no MySQL.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;primeiro problema foi a codificação. O Django usa o UTF8 e o SQL Server usa o &quot;CP1252&quot; (demorou para saber). Conversor do array:&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; &gt;def rowdecode(row):&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; &gt;  row2=[]&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; &gt;  for item in row:&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; &gt;    if type(item)==str:&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; &gt;      txt = unicode(item, &#39;cp1252&#39;)&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; &gt;      row2.append( txt )&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; &gt;    else:&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; &gt;      row2.append( item )&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; &gt;  return row&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: rgb(0, 0, 153); &quot;&gt;2&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;color: rgb(0, 0, 153); &quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;O outro problema é que os nomes das colunas no SQL Server estavam bem &quot;espirados&quot; tinha colunas com mais de 30 caracteres no nome. A solução estava a query de solicitação:&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;SELECT [nome_muito_muito_longo_como_esse]  AS nome_curto form FROM [base].[dbo].[bdo_tabela]&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;e o terceiro problema é que campos nvarchar do SQL Server pode ser maior que o varchar do MySQL&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;sendo assim usei o CAST para corrigir o tamanho .&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Por último, na minha importação tinha mais de 5 milhões de entradas (era uma tabela com logs importantes da aplicação) o Django começou a consumir cada vez mais memória, até a maquina ficar lenta e eu tive de interromper a operação.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Foi pesquisar o que estava ocorrendo quando descobri que o Django manter um histório em memória das query enviadas ao banco.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;A solução foi ficar esvaziando esse histórico, dai o espaço em memória ficou baixo e estável durante a toda a importação.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; &gt;def salva(row):&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; &gt;   from django.db import connection&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; &gt;   dado = LogHistorico(.......................)&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; &gt;   dado.save()&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; &gt;   connection.queries.pop()&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; &gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Quase nada de para superar, como a ajuda pela internet foi escassa resolvi portar no meu blog.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;Espero que ajude a mais alguem.&lt;/div&gt;&lt;div style=&quot;text-align: justify;&quot;&gt;&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://snakecode.blogspot.com/feeds/4507221334569000763/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://snakecode.blogspot.com/2011/04/django-sql-server-no-linux.html#comment-form' title='4 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9122775846015663009/posts/default/4507221334569000763'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9122775846015663009/posts/default/4507221334569000763'/><link rel='alternate' type='text/html' href='http://snakecode.blogspot.com/2011/04/django-sql-server-no-linux.html' title='Django + SQL Server no LINUX'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/01301257559700427958</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg7N-24shRG8CZEnGZ9OSLHj03YwztHG-2uLvj-8RmKCIXp39KYxJZmD9-Sb1_v_tCHiW7twX3VB-NZEtbhLgMZOYQn-0-G_B4a8S4vcbqbQeiNmccXMoDFw12CcYwCJFmuvwR1ir64H6I/s72-c/sql.png" height="72" width="72"/><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9122775846015663009.post-8963664626814161434</id><published>2010-11-03T18:19:00.000-03:00</published><updated>2010-11-03T18:56:29.003-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Python"/><title type='text'>Como fazer os HASH do shadow usando python</title><content type='html'>&lt;div style=&quot;float:left&quot;&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhb8weB8RSTDhvSTIMk-BymJw_mRPqzW1c9XFHyF9iCiBRsQZ3BzLSiQ2mNs94YSXr94XKizSFpn66WJSX1w31LVDT_aspYAs_bnUSe7IjgZeXOPoAR4mxhiELrxOW3FZZ09KU1HwEZlQc/s1600/yacine-tux-monstre-2396.png&quot;&gt;&lt;img style=&quot;float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 256px; height: 256px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhb8weB8RSTDhvSTIMk-BymJw_mRPqzW1c9XFHyF9iCiBRsQZ3BzLSiQ2mNs94YSXr94XKizSFpn66WJSX1w31LVDT_aspYAs_bnUSe7IjgZeXOPoAR4mxhiELrxOW3FZZ09KU1HwEZlQc/s320/yacine-tux-monstre-2396.png&quot; border=&quot;0&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5535437483830356066&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style=&quot;overflow:auto; width:300px&quot;&gt;&lt;br /&gt;As senhas no linux ficam em um arquivo &quot;/etc/shadonw&quot; só que elas são mascaradas por uma função de hash, ex:&lt;br /&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;color:#000099;&quot;&gt;bispo:$6$7rmDOxic$53xiWN/VjGLnSLE25EfSPWixgCKr5GwXoO5HOrhZMpvNL3JiSvOmtYu3cTdcRof9p9rpCw5G3/LXE1aRoubS9/:14916:0:99999:7:::&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;para gerar um hash desse ou mesmo checar se a senha é válida podemos usar um modulo em python chamado crypt&lt;br /&gt;&lt;br /&gt;o crypt tem dois valores a serem entrados: senha em texto puro e o passo&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;color:#000099;&quot;&gt;&gt;&gt;&gt; import crypt&lt;br /&gt;&gt;&gt;&gt; crypt.crypt(senha,passo)&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;Minha senha é fedora_linux, como podemos chegar ao valor do hash &lt;span class=&quot;Apple-style-span&quot;  style=&quot;color:#000099;&quot;&gt;&quot;$6$7rmDOx...aRoubS9/&quot;&lt;/span&gt; para validar esse senha:&lt;br /&gt;&lt;br /&gt;O passo do shadow é a parte inicial do hash $6$7rmDOxic$ (12 primeiros caracteristicas).&lt;br /&gt;&lt;br /&gt;para gerar o hast é só colocar&lt;br /&gt;&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;color:#000099;&quot;&gt;&gt;&gt;&gt; crypt.crypt(&#39;fedora_linux&#39;,&#39;$6$7rmDOxic$&#39;)                                                                                                  &lt;br /&gt;&#39;$6$7rmDOxic$53xiWN/VjGLnSLE25EfSPWixgCKr5GwXoO5HOrhZMpvNL3JiSvOmtYu3cTdcRof9p9rpCw5G3/LXE1aRoubS9/&#39;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;pronto, temos o hash completo gerado, com isso já podemos fazer o teste de validação da senha&lt;/div&gt;&lt;div&gt;&lt;br /&gt;para criar uma senha nova o procedimento é:&lt;br /&gt;1) Gerar um passo novo, ex: $6$9aaz9XCD$&lt;br /&gt;2) Escolhe uma nova senha, ex: nova_senha&lt;br /&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;color:#000099;&quot;&gt;&gt;&gt;&gt; crypt.crypt(&#39;nova_senha&#39;,&#39;$6$9aaz9XCD$&#39;)                                                                                                    &lt;br /&gt;&#39;$6$9aaz9XCD$Se77F6VrRJAGHZx6pIatONUYiSg7j4phpUDG8VFcgVyLn9eDPnTajBKgn1XSfS/5huIquHiZrcXwONsMlYIMP.&#39;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Se sobrescrever o hash antigo por esse novo, a senha do usário estará trocada para &quot;nova_senha&quot;.&lt;br /&gt;&lt;br /&gt;Fica ai essa dica para quem quiser fazer um aplicativo mais integrado ao linux e usando o banco de senhas do linux para fazer o login da aplicação.&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://snakecode.blogspot.com/feeds/8963664626814161434/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://snakecode.blogspot.com/2010/11/como-fazer-os-hash-do-shadow-usando.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9122775846015663009/posts/default/8963664626814161434'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9122775846015663009/posts/default/8963664626814161434'/><link rel='alternate' type='text/html' href='http://snakecode.blogspot.com/2010/11/como-fazer-os-hash-do-shadow-usando.html' title='Como fazer os HASH do shadow usando python'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/01301257559700427958</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhb8weB8RSTDhvSTIMk-BymJw_mRPqzW1c9XFHyF9iCiBRsQZ3BzLSiQ2mNs94YSXr94XKizSFpn66WJSX1w31LVDT_aspYAs_bnUSe7IjgZeXOPoAR4mxhiELrxOW3FZZ09KU1HwEZlQc/s72-c/yacine-tux-monstre-2396.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9122775846015663009.post-2771940334183830738</id><published>2010-11-03T13:08:00.000-03:00</published><updated>2010-11-03T13:17:09.917-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Linux"/><title type='text'>Cartão de Credito LINUX</title><content type='html'>&lt;span style=&quot;font-weight: bold;font-size:130%;&quot; &gt;&lt;br /&gt;&lt;/span&gt;&lt;div style=&quot;text-align: center; font-family: arial;&quot;&gt;&lt;span style=&quot;font-weight: bold;font-size:130%;&quot; &gt;Parece até brincadeira, mas é verdade.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;a style=&quot;font-family: arial;&quot; onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJngp1mZrXRT7jsIuSvQEFnJ266kU82QK2hyphenhyphenzR19eGvNbwBMX5hHaaj-6kfy2EDet3LODx5_8O1Tum-qzTLe_P_XdiK9EjIBpesS0vVvLNhmSJBvkfm0_QiTv9wI8pa5spBuQvonVUHeA/s1600/cartao-linux-foundation-20101102105417.jpg&quot;&gt;&lt;img style=&quot;float: left; margin: 0pt 10px 10px 0pt; cursor: pointer; width: 320px; height: 273px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJngp1mZrXRT7jsIuSvQEFnJ266kU82QK2hyphenhyphenzR19eGvNbwBMX5hHaaj-6kfy2EDet3LODx5_8O1Tum-qzTLe_P_XdiK9EjIBpesS0vVvLNhmSJBvkfm0_QiTv9wI8pa5spBuQvonVUHeA/s320/cartao-linux-foundation-20101102105417.jpg&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5535356427183708786&quot; border=&quot;0&quot; /&gt;&lt;/a&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;Como uma forma arecadar fundos, a LINUX FOUNDATION está lançando o cartão de crédito LINUX.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-family: arial;&quot;&gt;Na primeira compra usando esse cartão a LINUX FUNDATION receberá $50,00 doado pelo banco UMB.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;fonte: &lt;a href=&quot;http://info.abril.com.br/noticias/ti/fundacao-linux-lanca-cartao-de-credito-02112010-2.shl&quot;&gt;http://info.abril.com.br/noticias/ti/fundacao-linux-lanca-cartao-de-credito-02112010-2.shl&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://snakecode.blogspot.com/feeds/2771940334183830738/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://snakecode.blogspot.com/2010/11/cartao-de-credito-linux.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9122775846015663009/posts/default/2771940334183830738'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9122775846015663009/posts/default/2771940334183830738'/><link rel='alternate' type='text/html' href='http://snakecode.blogspot.com/2010/11/cartao-de-credito-linux.html' title='Cartão de Credito LINUX'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/01301257559700427958</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjJngp1mZrXRT7jsIuSvQEFnJ266kU82QK2hyphenhyphenzR19eGvNbwBMX5hHaaj-6kfy2EDet3LODx5_8O1Tum-qzTLe_P_XdiK9EjIBpesS0vVvLNhmSJBvkfm0_QiTv9wI8pa5spBuQvonVUHeA/s72-c/cartao-linux-foundation-20101102105417.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9122775846015663009.post-2542080069740086401</id><published>2010-10-26T15:52:00.000-03:00</published><updated>2010-10-26T15:56:22.835-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Linux"/><title type='text'>Como remover backgound de forma profissional</title><content type='html'>Esse vídeo tutorial do GIMP mostra como remover o fundo da imagem, de forma profissional. tem um Excelente resultado final.&lt;br /&gt;&lt;br /&gt;O Audio está em inglês.&lt;br /&gt;&lt;br /&gt;&lt;object width=&quot;640&quot; height=&quot;385&quot;&gt;&lt;param name=&quot;movie&quot; value=&quot;http://www.youtube.com/v/AnbxtMCHKV0?fs=1&amp;amp;hl=pt_BR&quot;&gt;&lt;param name=&quot;allowFullScreen&quot; value=&quot;true&quot;&gt;&lt;param name=&quot;allowscriptaccess&quot; value=&quot;always&quot;&gt;&lt;embed src=&quot;http://www.youtube.com/v/AnbxtMCHKV0?fs=1&amp;amp;hl=pt_BR&quot; type=&quot;application/x-shockwave-flash&quot; allowscriptaccess=&quot;always&quot; allowfullscreen=&quot;true&quot; width=&quot;640&quot; height=&quot;385&quot;&gt;&lt;/embed&gt;&lt;/object&gt;</content><link rel='replies' type='application/atom+xml' href='http://snakecode.blogspot.com/feeds/2542080069740086401/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://snakecode.blogspot.com/2010/10/como-remover-backgound-de-forma.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9122775846015663009/posts/default/2542080069740086401'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9122775846015663009/posts/default/2542080069740086401'/><link rel='alternate' type='text/html' href='http://snakecode.blogspot.com/2010/10/como-remover-backgound-de-forma.html' title='Como remover backgound de forma profissional'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/01301257559700427958</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9122775846015663009.post-3445917810152871029</id><published>2010-10-25T16:35:00.000-03:00</published><updated>2010-10-25T16:38:43.826-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Linux"/><title type='text'>Linux vs Windows - ponto para linux!</title><content type='html'>&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgvZac1bwS5UydR78NoVqA397Z3GGyZnajGpm6rqKLpJLmhyrgbYYFObsNchyphenhyphensAz6SdVDjKShT0G_kTu3ljHE2Edhw7ImOIwDMZBlRje1sTNnPu210FwCPprDldMroZw7XeX7A97vfmf04/s1600/isp_speed_money.jpg&quot;&gt;&lt;img style=&quot;float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 300px; height: 240px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgvZac1bwS5UydR78NoVqA397Z3GGyZnajGpm6rqKLpJLmhyrgbYYFObsNchyphenhyphensAz6SdVDjKShT0G_kTu3ljHE2Edhw7ImOIwDMZBlRje1sTNnPu210FwCPprDldMroZw7XeX7A97vfmf04/s320/isp_speed_money.jpg&quot; border=&quot;0&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5532069904201009346&quot; /&gt;&lt;/a&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;b&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-weight: normal; &quot;&gt;&lt;b&gt;Bolsa de Londres agora com linux!&lt;/b&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;br /&gt;   Ela afirma que com a mudança, está oferecendo em rede mundial uma velocidade recorde na negociação (126 microsegundos por transacao)&lt;br /&gt;   Essa velocidade veio na substituição do Microsoft. Net por Linux. Ficando com a velocidade duas vezes mais rapida que seus concorrentes (BATS Europa e Chi-X)&lt;br /&gt;&lt;br /&gt;fonte: &lt;a href=&quot;http://www.computerworlduk.com/news/networking/3244936/london-stock-exchange-smashes-world-record-trade-speed-with-linux/?cmpid=sbycombinatorrplant&quot;&gt;www.computerworlduk.com&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://snakecode.blogspot.com/feeds/3445917810152871029/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://snakecode.blogspot.com/2010/10/linux-vs-windows-ponto-para-linux.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9122775846015663009/posts/default/3445917810152871029'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9122775846015663009/posts/default/3445917810152871029'/><link rel='alternate' type='text/html' href='http://snakecode.blogspot.com/2010/10/linux-vs-windows-ponto-para-linux.html' title='Linux vs Windows - ponto para linux!'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/01301257559700427958</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgvZac1bwS5UydR78NoVqA397Z3GGyZnajGpm6rqKLpJLmhyrgbYYFObsNchyphenhyphensAz6SdVDjKShT0G_kTu3ljHE2Edhw7ImOIwDMZBlRje1sTNnPu210FwCPprDldMroZw7XeX7A97vfmf04/s72-c/isp_speed_money.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9122775846015663009.post-1094111916992542834</id><published>2010-10-16T15:00:00.000-03:00</published><updated>2010-10-25T16:39:07.751-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Freebsd"/><category scheme="http://www.blogger.com/atom/ns#" term="Linux"/><title type='text'>Adaptação do Linux para FreeBSD</title><content type='html'>&lt;div&gt;Vou abordar algumas alterações entre o linux e o FreeBSD,   &lt;/div&gt;&lt;div style=&quot;float:left&quot;&gt;&lt;br /&gt;&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgWPBZJFrCbRnUfVMmbM8tFow4EBYm2GKq47XDuX7Ed0-uyK8VmRWzBpD0SpLJybS7LCC33r5BaXL-2KJfhHiQMt5lOtgLSOKcRKgTBFUNH7zSoBOnazKoN9Na0HNvFHEJWiFcmy0hwayE/s1600/BSD_tux.png&quot;&gt;&lt;img style=&quot;float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 320px; height: 196px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgWPBZJFrCbRnUfVMmbM8tFow4EBYm2GKq47XDuX7Ed0-uyK8VmRWzBpD0SpLJybS7LCC33r5BaXL-2KJfhHiQMt5lOtgLSOKcRKgTBFUNH7zSoBOnazKoN9Na0HNvFHEJWiFcmy0hwayE/s320/BSD_tux.png&quot; border=&quot;0&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5528706820382122898&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;1) Umas das principais shell do linux é o BASH, no FreeBSD a shell padrão é o tcsh.&lt;/div&gt;&lt;div&gt;  Tirando o nome na utilização diferem muito pouco, o arquivo de inicialização para trocar as&lt;/div&gt;&lt;div&gt;configurações iniciais é ~/.cshrc&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;2) Instalação de Pacotes:&lt;/div&gt;&lt;div&gt;  No linux cada distribuição tem o seu:&lt;/div&gt;&lt;div&gt;    apt-get (no Ubuntu)&lt;/div&gt;&lt;div&gt;    yum (no Fedora)&lt;/div&gt;&lt;div&gt;  No freebsd existem 2 instaladores&lt;/div&gt;&lt;div&gt;    pkg_add (download da aplicação compilada)&lt;/div&gt;&lt;div&gt;    ports (download da codigo fonte para compilação)&lt;/div&gt;&lt;div&gt;  Instalação mais simples é pelo pkg_add:&lt;/div&gt;&lt;div&gt;&lt;b&gt;    # pkg_add -r nano&lt;/b&gt;&lt;/div&gt;&lt;div&gt;    Ele vai no repositório e intala o nano, seria o simiplar ao &#39;apt-get install nano&#39;&lt;/div&gt;&lt;div&gt;  Com o ports:&lt;/div&gt;&lt;div&gt;&lt;b&gt;    # cd /usr/ports/www/apache22&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;    # make install clean&lt;/b&gt;&lt;/div&gt;&lt;div&gt;    Ele vai baixar os fontes do apache e dos arquivos necessários, dai vai iniciar a compilação deles. Demora bastante tempo para compilar. Alguns programas ao compilar fica melhor otimizado ao hardware.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;3) Inicialização do sistema:&lt;/div&gt;&lt;div&gt;  os run-levels fica no mesmo lugar /etc/inittab&lt;/div&gt;&lt;div&gt;  os scripts de inicialização dos serviços ficam na pasta /etc/rc.d/ assim como em alguns linux (slackware)&lt;/div&gt;&lt;div&gt;  só que a maioria dos servições no freebsd são instalados usando prefix /usr/local, sendo assim olhe tambem a parta /usr/local/etc/rc.d/&lt;/div&gt;&lt;div&gt;  No freebsd os serviços tem que ser habilitados no /etc/rc.conf ou a execulsão será bloqueada&lt;/div&gt;&lt;div&gt;&lt;b&gt;  # echo &quot;sshd_enable=\&quot;YES\&quot; &gt;&gt; /etc/rc.conf&lt;/b&gt;&lt;/div&gt;&lt;div&gt;  Isso tem dois efeitos: 1o. que o script &#39;/etc/rc.d/sshd start&#39; vai está desbloqueado e 2o. que no boot o sshd vai ser inicilizado.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;4) Rede:&lt;/div&gt;&lt;div&gt;  o ifconfig tem a mesma função, só mudando as posições de algumas informações.&lt;/div&gt;&lt;div&gt;  no linux as interfaces de rede são nomeadas em sequencia eth0, eth1, eth2&lt;/div&gt;&lt;div&gt;  no freebsd o nome das interfaces tem haver com o modulo que está execultando ela:&lt;/div&gt;&lt;div&gt;  placas intel são em0, em1.... as realteck são rl0, rl1... lo é a loopback&lt;/div&gt;&lt;div&gt;  O que eu acho mais significativo é que no freebsd tem o status active/noactive se tá ou não com o cabo plugado.&lt;/div&gt;&lt;div&gt; &lt;/div&gt;&lt;div&gt;  para configurar a rede no boot do freebsd é só acresentar no /etc/rc.conf as linhas&lt;/div&gt;&lt;div&gt;&lt;b&gt;  echo &quot;hostname=\&quot;nomemaquina.dominio.com\&quot;&quot; &gt;&gt; /etc/rc.conf&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;  echo &quot;ifconfig_em0=\&quot;inet 10.10.10.100  netmask 255.255.255.0\&quot;&quot; &gt;&gt; /etc/rc.conf&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;  echo &quot;defaultrouter=\&quot;10.10.10.1\&quot;&quot; &gt;&gt; /etc/rc.conf&lt;/b&gt;&lt;/div&gt;&lt;div&gt;  ou em dhcp:&lt;/div&gt;&lt;div&gt;&lt;b&gt;  echo &quot;ifconfig_em0=\&quot;DHCP\&quot;&quot; &gt;&gt; /etc/rc.conf&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;  as propriedades tipo /proc/sys/net/ipv4/ip_forward no linux, pode ser acessada no freebsd usando&lt;/div&gt;&lt;div&gt;&lt;b&gt;  # sysctl net.inet.ip.forwarding&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;5) Firewall:&lt;/div&gt;&lt;div&gt;  No linux o firewall atualmente é o iptables, no freebsd o firewall é ipfw ou pfctl&lt;/div&gt;&lt;div&gt;  Uma regra para liberar o SSH&lt;/div&gt;&lt;div&gt;&lt;b&gt;  # ipfw add allow tcp form any to me 22 in via $ext_if&lt;/b&gt;&lt;/div&gt;&lt;div&gt;  Sabendo inglês é muito mais simples entender o ipfw que a regra de iptables&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;6) Lista de hadware:&lt;/div&gt;&lt;div&gt;  no linux temos o lspci, no freebsd é o pciconf -l&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;7) System Managment:&lt;/div&gt;&lt;div&gt;  linux:...................FreeBSD:&lt;/div&gt;&lt;div&gt;  lsmod ................ kldstat&lt;/div&gt;&lt;div&gt;  modprobe ........  kldload / kldunload&lt;/div&gt;&lt;div&gt;  strace .............    truss&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://snakecode.blogspot.com/feeds/1094111916992542834/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://snakecode.blogspot.com/2010/10/adaptacao-do-linux-para-freebsd.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9122775846015663009/posts/default/1094111916992542834'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9122775846015663009/posts/default/1094111916992542834'/><link rel='alternate' type='text/html' href='http://snakecode.blogspot.com/2010/10/adaptacao-do-linux-para-freebsd.html' title='Adaptação do Linux para FreeBSD'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/01301257559700427958</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgWPBZJFrCbRnUfVMmbM8tFow4EBYm2GKq47XDuX7Ed0-uyK8VmRWzBpD0SpLJybS7LCC33r5BaXL-2KJfhHiQMt5lOtgLSOKcRKgTBFUNH7zSoBOnazKoN9Na0HNvFHEJWiFcmy0hwayE/s72-c/BSD_tux.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9122775846015663009.post-4460468293759559727</id><published>2010-10-15T19:03:00.000-03:00</published><updated>2010-10-15T19:12:32.573-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Jogos"/><title type='text'>A volta do jogo Duke Nukem</title><content type='html'>Bons tempo... lembro do tempo em que eu jogava muito Duke Nukem, até em disputas usando modem. Pois bem, programadores autônomos estão repaginando esse clássico com tecnologia recentes. Esse é um video de dessa nova promessa: Duke Nukem - NEXT-GEN&lt;br /&gt;&lt;object width=&quot;560&quot; height=&quot;340&quot;&gt;&lt;param name=&quot;movie&quot; value=&quot;http://www.youtube.com/v/bMjJL6SWs_U?fs=1&amp;amp;hl=pt_BR&quot;&gt;&lt;param name=&quot;allowFullScreen&quot; value=&quot;true&quot;&gt;&lt;param name=&quot;allowscriptaccess&quot; value=&quot;always&quot;&gt;&lt;embed src=&quot;http://www.youtube.com/v/bMjJL6SWs_U?fs=1&amp;amp;hl=pt_BR&quot; type=&quot;application/x-shockwave-flash&quot; allowscriptaccess=&quot;always&quot; allowfullscreen=&quot;true&quot; width=&quot;560&quot; height=&quot;340&quot;&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;Mais detalhes em: &lt;a href=&quot;http://toad.geek.com.br/posts/14032-duke-nukem-ganha-nova-versao-feita-por-fas&quot;&gt;Geek&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://snakecode.blogspot.com/feeds/4460468293759559727/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://snakecode.blogspot.com/2010/10/volta-do-jogo-duke-nukem.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9122775846015663009/posts/default/4460468293759559727'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9122775846015663009/posts/default/4460468293759559727'/><link rel='alternate' type='text/html' href='http://snakecode.blogspot.com/2010/10/volta-do-jogo-duke-nukem.html' title='A volta do jogo Duke Nukem'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/01301257559700427958</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9122775846015663009.post-6532533406065541573</id><published>2010-10-14T19:28:00.000-03:00</published><updated>2010-10-14T19:35:00.229-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="equipamentos"/><title type='text'>Witricity - Transmissão de energia sem fio</title><content type='html'>&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-family:arial;&quot;&gt;Uma coisa que acho muito interessante é a transmissão de eletricidade pelo ar. Ainda muito pouco explora e comentanda. Porem esse jovem francês fez um video muito legal é altamente instrutivo para aproveitamos e brincarmos tambem com witricity.&lt;/span&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-family:arial;&quot;&gt;Ao Final do Video tem o esquema eletrônico da witricity.&lt;br /&gt;&lt;/span&gt;&lt;object width=&quot;640&quot; height=&quot;385&quot;&gt;&lt;param name=&quot;movie&quot; value=&quot;http://www.youtube.com/v/N0-TR-BpZpw?fs=1&amp;amp;hl=pt_BR&quot;&gt;&lt;param name=&quot;allowFullScreen&quot; value=&quot;true&quot;&gt;&lt;param name=&quot;allowscriptaccess&quot; value=&quot;always&quot;&gt;&lt;embed src=&quot;http://www.youtube.com/v/N0-TR-BpZpw?fs=1&amp;amp;hl=pt_BR&quot; type=&quot;application/x-shockwave-flash&quot; allowscriptaccess=&quot;always&quot; allowfullscreen=&quot;true&quot; width=&quot;640&quot; height=&quot;385&quot;&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;Se alguem tiver uma boa idéia para aplicar a witricity, coloca num post para discutirmos a ideia.&lt;br /&gt;Obs: Se um dia eu colocasse na minha casa toda coberta por witricity, como faria para meu vizinho não usar a minha energia?&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://snakecode.blogspot.com/feeds/6532533406065541573/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://snakecode.blogspot.com/2010/10/witricity-transmissao-de-energia-sem.html#comment-form' title='1 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9122775846015663009/posts/default/6532533406065541573'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9122775846015663009/posts/default/6532533406065541573'/><link rel='alternate' type='text/html' href='http://snakecode.blogspot.com/2010/10/witricity-transmissao-de-energia-sem.html' title='Witricity - Transmissão de energia sem fio'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/01301257559700427958</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9122775846015663009.post-7704325118592738813</id><published>2010-10-14T19:18:00.000-03:00</published><updated>2010-10-14T19:21:49.479-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="equipamentos"/><title type='text'>Holograma 2022</title><content type='html'>&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-family:arial;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-size:medium;&quot;&gt;O Japão tá apostando alto em tecnologia de holografia, isso pode realmente mudar nosso cotidiano. Como monstra nesse video.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;object width=&quot;640&quot; height=&quot;385&quot;&gt;&lt;param name=&quot;movie&quot; value=&quot;http://www.youtube.com/v/Kfnxl19F5U0?fs=1&amp;amp;hl=pt_BR&quot;&gt;&lt;param name=&quot;allowFullScreen&quot; value=&quot;true&quot;&gt;&lt;param name=&quot;allowscriptaccess&quot; value=&quot;always&quot;&gt;&lt;embed src=&quot;http://www.youtube.com/v/Kfnxl19F5U0?fs=1&amp;amp;hl=pt_BR&quot; type=&quot;application/x-shockwave-flash&quot; allowscriptaccess=&quot;always&quot; allowfullscreen=&quot;true&quot; width=&quot;640&quot; height=&quot;385&quot;&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;Utilizações desse tipo de tecnologia:&lt;br /&gt; - Telepresença&lt;br /&gt; - Ambiente de Desktop Holográfico</content><link rel='replies' type='application/atom+xml' href='http://snakecode.blogspot.com/feeds/7704325118592738813/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://snakecode.blogspot.com/2010/10/holograma-2022.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9122775846015663009/posts/default/7704325118592738813'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9122775846015663009/posts/default/7704325118592738813'/><link rel='alternate' type='text/html' href='http://snakecode.blogspot.com/2010/10/holograma-2022.html' title='Holograma 2022'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/01301257559700427958</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9122775846015663009.post-6975281733168298082</id><published>2010-10-09T14:53:00.001-03:00</published><updated>2010-10-25T16:39:07.751-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Linux"/><title type='text'>VPN no linux</title><content type='html'>Aqui vamos abordar varios tipos de VPN:&lt;br /&gt;PPTP (&lt;a href=&quot;http://poptop.sourceforge.net/dox/&quot;&gt; http://poptop.sourceforge.net/dox/ &lt;/a&gt;)&lt;br /&gt;IPSec (&lt;a href=&quot;&quot;&gt;http://www.ipsec-howto.org/ipsec-howto.pdf&lt;/a&gt;) (&lt;a href=&quot;&quot;&gt;http://www.openswan.org/&lt;/a&gt;)&lt;br /&gt;OPENVPN (&lt;a href=&quot;http://openvpn.net/&quot;&gt; http://openvpn.net/ &lt;/a&gt;)&lt;br /&gt;Usando SSH para VPN (simples e muito boa)&lt;br /&gt;&lt;br /&gt;&lt;div style=&quot;text-align: center;&quot;&gt;VPN (Virtual Privete Network) conceito:&lt;/div&gt; Uma rede local permite mais recursos do que dois computadores simplemente com acesso a internet.&lt;br /&gt;    A VPN é uma forma de interligar dois ou mais computadores através da internet, mas preservando todas as característica de uma rede local.&lt;br /&gt;    A VPN pode ser feita por intermedio de um “discado” ou em uma rede corporativa podemos fazer um mecanismo transparente ao usuário.&lt;br /&gt;&lt;br /&gt;Como funcina uma VPN:&lt;br /&gt;    O funcionamento básico da VPN é composto por dois processos distintos: Tunelamento + Cryptografia.&lt;br /&gt;    O Tunelamento é um processo em que uma máquina encapsula uma informação antes de mandar para outra maquina, que a recebe. A maquina receptora abre o encapsulamento e procede uma nova tarefa de destino os dados do pacote.&lt;br /&gt;&lt;br /&gt; O processo de Cryptografia é para dar a privacidade dos dados, fazendo uma forma de embaralhar a informação tal quê só os computadores pertencentes a VPN sabem ler-las.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;IPSec:&lt;/b&gt;&lt;br /&gt; Finalidade: Interligar duas redes destintas traves da internet&lt;br /&gt; Tem Alta segurança, é bastante flexível no que se pode fazer&lt;br /&gt;&lt;br /&gt;&lt;b&gt;PPTP:&lt;/b&gt;&lt;br /&gt; É uma VPN em formato Cliente / Servidor destinado a reunir varios computadores clientes,  soltos na internet, formando uma rede entre eles usando um Servidor na internet, essa VPN é faz pequenas redes, pois o servidor logo fica com a conexão saturada.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;SSH:&lt;/b&gt;&lt;br /&gt; Muitos utilização o ssh só para acessar uma shell de maquina linux, porem ele é muito mais que isso, podemos usalo para transferencia de arquivos isolados, compartilhamento de pastas, forward de portas e VPN.&lt;br /&gt; A VPN do SSH interliga duas máquinas atravéz de uma rede Virtual, se essa maquina forem os gateways das redes, podemos aproveitar essa VPN para interligar as redes fazendo as regras de roteamento.&lt;br /&gt; Para isso vamos necessitar de um Tunel, Configurar as pontas do tunel e regras de roteamento, para isso vamos ao exemplo a baixo:&lt;br /&gt;&lt;br /&gt;&lt;table width=&quot;100%&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;br /&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;b&gt;Rede A:&lt;/b&gt;&lt;/div&gt;  ip de rede: 192.168.10.0/24&lt;br /&gt;  gateway: 192.168.10.1&lt;br /&gt;  ip internet: 187.18.19.xx&lt;br /&gt;&lt;/td&gt;&lt;td&gt;&lt;br /&gt;&lt;div style=&quot;text-align: left;&quot;&gt;&lt;b&gt;Rede B:&lt;/b&gt;&lt;/div&gt;  ip de rede: 192.168.15.0/25&lt;br /&gt;  gateway: 192.168.15.1&lt;br /&gt;  ip internet: 201.39.44.xx&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt; O Servidor B está com o sshd ativo, é servidor de ssh. O servidor A tem só o cliente de ssh instalado.&lt;br /&gt;&lt;br /&gt; Vamos iniciar pelo servidor A:&lt;br /&gt; Para criar o tunel vamos usar o ssh da sequinte forma:&lt;br /&gt; # &lt;b&gt;ssh -w 0:0 root@201.39.44.xx&lt;/b&gt;&lt;br /&gt; Com isso o ssh irá criar uma interface de rede chamada tun0 no Servidor A e no Servidor B&lt;br /&gt; Agora é só darmos ips para o tunelamento funcionar. Para o trafego interno da VPN vamos usar a rede 10.1.2.0/255.255.255.252&lt;br /&gt; No servidor A colocaremos:&lt;br /&gt; #&lt;b&gt; ifconfig tun0 10.1.2.1 netmask 255.255.255.252&lt;/b&gt;&lt;br /&gt; E no servidor B colocaremos:&lt;br /&gt; # &lt;b&gt;ifconfig tun0 10.1.2.2 netmask 255.255.255.252&lt;/b&gt;&lt;br /&gt; Pronto! Já temos nossa VPN funcionando entre as maquina, para testar basta pingar&lt;br /&gt; # &lt;b&gt;ping 10.1.2.2&lt;/b&gt; (no servidor A)&lt;br /&gt; # &lt;b&gt;ping 10.1.2.1&lt;/b&gt; (no servidor B)&lt;br /&gt; Se responder é por que a informação foi e voltou entre os servidores, mas as redes ainda não estão se conectando por que não temos as rotas.&lt;br /&gt; No servidor A colocaremos:&lt;br /&gt; # &lt;b&gt;route add -net 192.168.15.0 netmask 255.255.255.0 gw 10.1.2.2&lt;/b&gt;&lt;br /&gt; No servidor B colocaremos:&lt;br /&gt; # &lt;b&gt;route add -net 192.168.10.0 netmask 255.255.255.0 gw 10.1.2.1&lt;/b&gt;&lt;br /&gt; Se formos em uma estação da rede A e pingar para uma estação da rede B vai funcionar, pois a informação vai usar a VPN dos gateways de modo transparente.</content><link rel='replies' type='application/atom+xml' href='http://snakecode.blogspot.com/feeds/6975281733168298082/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://snakecode.blogspot.com/2010/10/vpn-no-linux.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9122775846015663009/posts/default/6975281733168298082'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9122775846015663009/posts/default/6975281733168298082'/><link rel='alternate' type='text/html' href='http://snakecode.blogspot.com/2010/10/vpn-no-linux.html' title='VPN no linux'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/01301257559700427958</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9122775846015663009.post-6843667822745780714</id><published>2010-10-09T14:19:00.000-03:00</published><updated>2010-10-16T15:23:46.579-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Python"/><title type='text'>Autocompletar em python no shell</title><content type='html'>&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh4TFHkR8lZRurBoo76RBcXy4Ap9zTi1-uA2brffJ0hig220QWVIRnLO3GAtSVYBoyYNaueIKjAPJsIAMZ5SnhYX-Bt3DwpjYCPZ3e1urcCsld7Mp76qXN_MCATJPAxNf_-YBAwauOc8KA/s1600/tab.jpg&quot;&gt;&lt;img style=&quot;float:left; margin:0 10px 10px 0;cursor:pointer; cursor:hand;width: 142px;&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh4TFHkR8lZRurBoo76RBcXy4Ap9zTi1-uA2brffJ0hig220QWVIRnLO3GAtSVYBoyYNaueIKjAPJsIAMZ5SnhYX-Bt3DwpjYCPZ3e1urcCsld7Mp76qXN_MCATJPAxNf_-YBAwauOc8KA/s320/tab.jpg&quot; border=&quot;0&quot; alt=&quot;&quot; id=&quot;BLOGGER_PHOTO_ID_5526097301958942194&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Ô ferramentazinha necessária hoje em dia e o Autocompletar (Auto Compleat). Usar a shell do linx ser usar a tecla “tab” é bem chato... o tab para complementar agiliza muito.&lt;br /&gt;No Shell do Python tambem é possível usar o autocompleat, basta introduzir o codigo abaixo:&lt;br /&gt;&lt;br /&gt;----------conteuto:---------------&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;import atexit&lt;br /&gt;import rlcompleter&lt;br /&gt;import readline&lt;br /&gt;readline.parse_and_bind(&quot;tab: complete&quot;)&lt;br /&gt;import os&lt;br /&gt;os.system(&quot;touch ~/.pyhistory&quot;)&lt;br /&gt;historyPath = os.path.expanduser(&quot;~/.pyhistory&quot;)&lt;br /&gt;def save_history(historyPath):&lt;br /&gt;  import readline&lt;br /&gt;  readline.write_history_file(historyPath)&lt;br /&gt;  print &quot;Obrigado por usar o python! Espero ter sido muito útil.&quot;&lt;br /&gt;&lt;br /&gt;atexit.register(save_history,historyPath)&lt;br /&gt;readline.read_history_file(historyPath)&lt;br /&gt;&lt;br /&gt;def clear():&lt;br /&gt; import os&lt;br /&gt; os.system(&quot;clear&quot;)&lt;br /&gt;&lt;br /&gt;readline.clear_history()&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;----------fim do arquivo---------------&lt;br /&gt;&lt;br /&gt;Mas sempre ter que copiar e colar esse texto não tem graça, não memso?&lt;br /&gt;Para isso vamos colocar ele para iniciar semple que o python for chamado. (Valido somente para linux)&lt;br /&gt;O Python tem um variavel de ambiente chamada PYTHONSTARTUP onde podemos indicar um caminho de uma arquivo que vai ser execultado assim que o python abrir.&lt;br /&gt;adicione a linha &quot;export PYTHONSTARTUP=~/.pystartup&quot; no arquivo &quot;~/.bashrc&quot; execultando:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;echo &quot;export PYTHONSTARTUP=~/.pystartup &quot; &gt;&gt; ~/.bashrc&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Agora crie um arquivo chamado .pystartup diretório de seu usuáro:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;touch ~/.pystartup&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;e adicione o código que faz o auto completar na proxima vez que você chamar o terminal e entrar na shell do python o TAB vai estar funcinando como autocompletar.</content><link rel='replies' type='application/atom+xml' href='http://snakecode.blogspot.com/feeds/6843667822745780714/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://snakecode.blogspot.com/2010/10/autocompletar-em-python-no-shell.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9122775846015663009/posts/default/6843667822745780714'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9122775846015663009/posts/default/6843667822745780714'/><link rel='alternate' type='text/html' href='http://snakecode.blogspot.com/2010/10/autocompletar-em-python-no-shell.html' title='Autocompletar em python no shell'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/01301257559700427958</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh4TFHkR8lZRurBoo76RBcXy4Ap9zTi1-uA2brffJ0hig220QWVIRnLO3GAtSVYBoyYNaueIKjAPJsIAMZ5SnhYX-Bt3DwpjYCPZ3e1urcCsld7Mp76qXN_MCATJPAxNf_-YBAwauOc8KA/s72-c/tab.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9122775846015663009.post-4021409883160357667</id><published>2010-10-09T14:03:00.000-03:00</published><updated>2010-10-09T14:14:29.014-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="equipamentos"/><title type='text'>Óculos Monitor 3D!</title><content type='html'>&lt;a onblur=&quot;try {parent.deselectBloggerImageGracefully();} catch(e) {}&quot; href=&quot;http://img.diytrade.com/cdimg/877794/8243368/0/1236757625/80inch_PC_Monitor_Eyewear_LCD_Monitor_Game_Accessories_Game_Eyewear_Video_Glasse.jpg&quot;&gt;&lt;img style=&quot;float:right; margin:0 0 10px 10px;cursor:pointer; cursor:hand;width: 350px;&quot; src=&quot;http://img.diytrade.com/cdimg/877794/8243368/0/1236757625/80inch_PC_Monitor_Eyewear_LCD_Monitor_Game_Accessories_Game_Eyewear_Video_Glasse.jpg&quot; border=&quot;0&quot; alt=&quot;&quot; /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Esse oculos reproduz imagens dando a sensação de uma tela de 80” a sua frente.&lt;br /&gt;Com alta resolução de até 1024x768 pixels.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Achei na &lt;a href=&quot;http://www.dealextreme.com/details.dx/sku.41713&quot;&gt;dealextreme&lt;/a&gt; por U$ 277.70.&lt;br /&gt;&lt;br /&gt;Cada olho pode receber uma imagem diferente, ao ligar em uma placa de video Nvidia e abilitar o recurso de 3D.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Caracteristicas:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;- Leve e portátil permite, fácil de transportar&lt;br /&gt;- Visualização de imagems em 3D ( Estereoscopia )&lt;br /&gt;- Definição de Imagem: 920k, (Auto ajustando em) 1024 * 768/800 * 600/640 * 480&lt;br /&gt;- Ângulo de visão: 32 graus diagonal&lt;br /&gt;- Contraste: 64:1&lt;br /&gt;- Profundidade de cor: 24 bits&lt;br /&gt;- Consumo de energia: 1.1W&lt;br /&gt;- Entrada de vídeo: RGB analógico VGA sinal&lt;br /&gt;- Com o fone de ouvido efeitos de som estéreo&lt;br /&gt;- Pode ser conectado com o PC / notebook, alimentado pela porta USB&lt;br /&gt;Contém microfone -&lt;br /&gt;- Interfaces: USB VGA 2 * 3.5mm portas de áudio&lt;br /&gt;&lt;br /&gt;Usos: Asistir Filmes, videos, clipes e Jogos</content><link rel='replies' type='application/atom+xml' href='http://snakecode.blogspot.com/feeds/4021409883160357667/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://snakecode.blogspot.com/2010/10/oculos-monitor-3d.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9122775846015663009/posts/default/4021409883160357667'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9122775846015663009/posts/default/4021409883160357667'/><link rel='alternate' type='text/html' href='http://snakecode.blogspot.com/2010/10/oculos-monitor-3d.html' title='Óculos Monitor 3D!'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/01301257559700427958</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9122775846015663009.post-5648048911503665311</id><published>2010-10-04T17:53:00.000-03:00</published><updated>2010-10-06T19:03:47.274-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="equipamentos"/><title type='text'>Em vez do Touch...</title><content type='html'>&lt;img src=&quot;http://www1.dealextreme.com/productimages/sku_34808_1.jpg&quot; style=&quot;float: left; font-family: arial;&quot; width=&quot;150px&quot; /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;Navegando hoje achei o &quot;SISO Tablo Tablet&quot;, pense numa solução legal para usar no lugar do touch screen. Esse video é um bom exemplo de utilidade&lt;/span&gt;&lt;br /&gt;&lt;object style=&quot;font-family: arial;&quot; height=&quot;385&quot; width=&quot;480&quot;&gt;&lt;param name=&quot;movie&quot; value=&quot;http://www.youtube.com/v/37L8nlmGN24?fs=1&amp;amp;hl=pt_BR&quot;&gt;&lt;param name=&quot;allowFullScreen&quot; value=&quot;true&quot;&gt;&lt;param name=&quot;allowscriptaccess&quot; value=&quot;always&quot;&gt;&lt;embed src=&quot;http://www.youtube.com/v/37L8nlmGN24?fs=1&amp;amp;hl=pt_BR&quot; type=&quot;application/x-shockwave-flash&quot; allowscriptaccess=&quot;always&quot; allowfullscreen=&quot;true&quot; height=&quot;385&quot; width=&quot;480&quot;&gt;&lt;/embed&gt;&lt;/object&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;Uma das chateações do touch é a marca do dedão da tela (digitais), por isso o fato de ter de usar a caneta, para mim, é inrelevante.&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-family:arial;&quot;&gt;O Preço tambem é um atrativo na &lt;/span&gt;&lt;a style=&quot;font-family: arial;&quot; href=&quot;http://www.dealextreme.com/details.dx/sku.34808&quot;&gt;Dealextreme&lt;/a&gt;&lt;span style=&quot;font-family:arial;&quot;&gt; tá por U$ 73,00. Pena que tenha um limite para telas de 15&quot; dai acho que no meu monitor de 24&quot; não vai funcionar... mas magina ai um tablet de 24&quot;, ficaria show de bola.&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://snakecode.blogspot.com/feeds/5648048911503665311/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://snakecode.blogspot.com/2010/10/em-vez-do-touch.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9122775846015663009/posts/default/5648048911503665311'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9122775846015663009/posts/default/5648048911503665311'/><link rel='alternate' type='text/html' href='http://snakecode.blogspot.com/2010/10/em-vez-do-touch.html' title='Em vez do Touch...'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/01301257559700427958</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9122775846015663009.post-2709447565542551636</id><published>2010-10-04T16:17:00.000-03:00</published><updated>2010-10-06T19:03:47.274-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="equipamentos"/><title type='text'>Melhor que o iPad?</title><content type='html'>&lt;img src=&quot;http://www.dealextreme.com/productimages/sku_44673_1_small.jpg&quot; style=&quot;float: right; clear: both;&quot; width=&quot;320px&quot; /&gt;&lt;br /&gt;&lt;img src=&quot;http://www.telechips.com/eng/images/product/img_consumer08.gif&quot; style=&quot;float: left; clear: both;&quot; width=&quot;320px&quot; /&gt; &lt;span style=&quot;font-family: arial;&quot;&gt;Uma dia desses me apresentaram um equipamento para eu ver se era bom. Esse &lt;/span&gt;&lt;a style=&quot;font-family: arial;&quot; href=&quot;http://www.dealextreme.com/details.dx/sku.44673&quot;&gt;Tablet 7&quot; Telechips TCC8902&lt;/a&gt;&lt;span style=&quot;font-family: arial;&quot;&gt; tem um processador da Telechips que me parece muito bom  com o núcle um ARM11 o Clock de 720Mhz é várias otimizações  JPEG / MPEG1 / MPEG2 / MPEG4 / H.264 / VC-1 / RV up to Full HD (1080p). O equipamento vem com o Andrioid, mas é possível trocar o sistema para um Linux Ubunto (personalizado para ARM). Esse table eu achei muito bom... e sinceramente é um equipamento muito mais versátil que o Ipad.&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://snakecode.blogspot.com/feeds/2709447565542551636/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://snakecode.blogspot.com/2010/10/melhor-que-o-ipad.html#comment-form' title='1 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9122775846015663009/posts/default/2709447565542551636'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9122775846015663009/posts/default/2709447565542551636'/><link rel='alternate' type='text/html' href='http://snakecode.blogspot.com/2010/10/melhor-que-o-ipad.html' title='Melhor que o iPad?'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/01301257559700427958</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9122775846015663009.post-7810834744916913992</id><published>2009-09-10T11:05:00.000-03:00</published><updated>2010-10-06T19:26:40.583-03:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Linux"/><title type='text'>Usando internet via Claro pelo Bluetooth.</title><content type='html'>Adaptador bluetooth USB no Ubuntu 9.04&lt;br /&gt;Recentemente eu adquiri um adaptador bluetooth desses genéricos:&lt;br /&gt;execultando o comando “lsusb”, o dispositivo que aparece é esse.&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Bus 002 Device 002: ID 0a12:0001 Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Tentei fazer reconecer o meu celular, um Nokia E62, pelos programas que vinha instalado por padrão no Ubuntu.&lt;br /&gt;&lt;br /&gt;Sistema → Preferências → Bluetooth&lt;br /&gt;&lt;br /&gt;Minha intensão era conectar o notebook ao celular e usar a internet pelo bluetooth, pois muitas vezes estou em clientes e quero conectar a internet e tenho que colocar o celular na mesa e ligar o fio no notebook, pelo com o bluetooth agora fica mais prático.&lt;br /&gt;No inicio eu pensei que não estava funcionando, pois não vi celular nenhum na lista. Depois fui verificar se estava funcionando com o comando: &quot;&lt;span style=&quot;font-weight: bold;&quot;&gt;hcitool dev&lt;/span&gt;&quot;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Devices:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt; hci0 00:1F:81:00:02:50&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;O Linux estava encontrando o dispositivo, mas para fazer funcionar tive que colocar o “nome amigável”, depois eu tentei var se o celular conseguia detectar o notebook foi que apareceu o celular na lista de dispositivos, um bug, pois o celular estava para ser sempre visível. Outro ponto chato é que o celular não pode criar a conexão só o Ubuntu, pois ele cria um PIN aleatório para entrar no celular.&lt;br /&gt;Para configurar a internet da Claro, temos que colocar o bluetooth para criar uma porta serial com o celular usar o discador para levantar a conexão:&lt;br /&gt;&lt;br /&gt;1) Achar o MAC do celular:&lt;br /&gt;Logo após tentar emparelhar o computador com o celular (pelo aparelho) pode-se execultar o comando: “&lt;span style=&quot;font-weight: bold;&quot;&gt;hcitool scan&lt;/span&gt;”&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;Scanning ...&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt; 00:18:42:9A:D8:DC NokiaE62&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;2) Modificar o arquivo “/etc/bluetooth/rfcomm.conf”, note que o número do device é o MAC do celular identificado no item anterior.&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;rfcomm0 {&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;bind yes;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;device 00:18:42:9A:D8:DC;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;channel 1;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;comment &quot;NokiaE62&quot;;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;3) Criar o arquivo /etc/ppp/chat-gprs contendo:&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;&#39;&#39; ATZ OK &lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;AT+CGDCONT=1,&quot;IP&quot;,&quot;claro.com.br&quot;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;OK &quot;ATD*99***1#&quot;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;CONNECT &#39;&#39;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;4) Criar um arquivo /etc/ppp/peers/claro contendo:&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;/dev/rfcomm0 115200&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;connect &#39;/usr/sbin/chat -v -f /etc/ppp/chat-gprs&#39;&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;crtscts&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;modem -detach&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;noccp&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;defaultroute&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;usepeerdns&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;noauth&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;ipcp-accept-remote&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;ipcp-accept-local&lt;/span&gt;&lt;br /&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;noipdefault&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;5) Agora é só iniciar o discador usando o comando: &lt;span style=&quot;font-weight: bold;&quot;&gt;ppp call claro&lt;/span&gt;&lt;br /&gt;6) O celular vai soliciar permissão para o computador é só liberar e pronto, já esta conectado. Agora sempre que quiser usar a internet por bluetooth é só colocar “ppp call claro”. Lembrando que o firefox vai ficar com a “modo off line”, para navegar deve desmarcar a opção: Arquivo-&gt;modo off-line do firefox.</content><link rel='replies' type='application/atom+xml' href='http://snakecode.blogspot.com/feeds/7810834744916913992/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://snakecode.blogspot.com/2009/09/usando-internet-via-claro-pelo.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9122775846015663009/posts/default/7810834744916913992'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9122775846015663009/posts/default/7810834744916913992'/><link rel='alternate' type='text/html' href='http://snakecode.blogspot.com/2009/09/usando-internet-via-claro-pelo.html' title='Usando internet via Claro pelo Bluetooth.'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/01301257559700427958</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9122775846015663009.post-8010158258717696998</id><published>2009-09-08T13:57:00.000-03:00</published><updated>2009-09-08T14:15:29.085-03:00</updated><title type='text'>Primeiro Post</title><content type='html'>Estou iniciando as atividades desse blog. Sou um programador e utilizo varias linguagens nos meus projetos, tais como PHP, Java, Perl e outras... Como ao longo dos anos vamos acumulando algumas esperiências no desenvolvimento resolvi compartilhar algumas com as comunidade e tambem poder apromoralas pela discursão delas.</content><link rel='replies' type='application/atom+xml' href='http://snakecode.blogspot.com/feeds/8010158258717696998/comments/default' title='Postar comentários'/><link rel='replies' type='text/html' href='http://snakecode.blogspot.com/2009/09/primeiro-post.html#comment-form' title='0 Comentários'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9122775846015663009/posts/default/8010158258717696998'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9122775846015663009/posts/default/8010158258717696998'/><link rel='alternate' type='text/html' href='http://snakecode.blogspot.com/2009/09/primeiro-post.html' title='Primeiro Post'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/01301257559700427958</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>