<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Cleber Santos</title>
	<atom:link href="http://binho.net/feed/" rel="self" type="application/rss+xml" />
	<link>http://binho.net</link>
	<description>um blog sobre desenvolvimento mobile e web.</description>
	<lastBuildDate>Tue, 21 Feb 2012 01:00:17 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>Acessando o MySQL remotamente</title>
		<link>http://binho.net/acessando-o-mysql-remotamente/</link>
		<comments>http://binho.net/acessando-o-mysql-remotamente/#comments</comments>
		<pubDate>Wed, 08 Feb 2012 15:21:39 +0000</pubDate>
		<dc:creator>binho</dc:creator>
				<category><![CDATA[Geral]]></category>

		<guid isPermaLink="false">http://binho.net/?p=55</guid>
		<description><![CDATA[Como SEMPRE me bato com isso quando vou configurar um novo servidor resolvi documentar! Edite o arquivo /etc/mysql/my.cnf e dentro de [mysqld] comente a linha: #bind-address: 127.0.0.1 Entre no MySQL via terminal: mysql -uroot -pmysql E execute (onde 123 é &#8230; <a href="http://binho.net/acessando-o-mysql-remotamente/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Como SEMPRE me bato com isso quando vou configurar um novo servidor resolvi documentar!</p>
<p>Edite o arquivo <strong>/etc/mysql/my.cnf</strong> e dentro de <strong>[mysqld]</strong> comente a linha:</p>

<div class="wp_syntax"><div class="code"><pre class="sql" style="font-family:monospace;">#bind<span style="color: #66cc66;">-</span>address: 127<span style="color: #66cc66;">.</span>0<span style="color: #66cc66;">.</span>0<span style="color: #66cc66;">.</span>1</pre></div></div>

<p>Entre no MySQL via terminal:</p>

<div class="wp_syntax"><div class="code"><pre class="sql" style="font-family:monospace;">mysql <span style="color: #66cc66;">-</span>uroot <span style="color: #66cc66;">-</span>pmysql</pre></div></div>

<p>E execute (onde 123 é a sua senha):</p>

<div class="wp_syntax"><div class="code"><pre class="sql" style="font-family:monospace;">mysql<span style="color: #66cc66;">&gt;</span> <span style="color: #993333; font-weight: bold;">GRANT</span> <span style="color: #993333; font-weight: bold;">ALL</span> PRIVILEGES <span style="color: #993333; font-weight: bold;">ON</span> <span style="color: #66cc66;">*.*</span> <span style="color: #993333; font-weight: bold;">TO</span> <span style="color: #ff0000;">'root'</span>@<span style="color: #ff0000;">'%'</span> <span style="color: #993333; font-weight: bold;">IDENTIFIED</span> <span style="color: #993333; font-weight: bold;">BY</span> <span style="color: #ff0000;">'123'</span> <span style="color: #993333; font-weight: bold;">WITH</span> <span style="color: #993333; font-weight: bold;">GRANT</span> <span style="color: #993333; font-weight: bold;">OPTION</span>;
Query OK<span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">0</span> <span style="color: #993333; font-weight: bold;">ROWS</span> affected <span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">0.00</span> sec<span style="color: #66cc66;">&#41;</span>
&nbsp;
mysql<span style="color: #66cc66;">&gt;</span> <span style="color: #993333; font-weight: bold;">GRANT</span> <span style="color: #993333; font-weight: bold;">ALL</span> PRIVILEGES <span style="color: #993333; font-weight: bold;">ON</span> <span style="color: #66cc66;">*.*</span> <span style="color: #993333; font-weight: bold;">TO</span> <span style="color: #ff0000;">'root'</span>@<span style="color: #ff0000;">'localhost'</span> <span style="color: #993333; font-weight: bold;">IDENTIFIED</span> <span style="color: #993333; font-weight: bold;">BY</span> <span style="color: #ff0000;">'123'</span> <span style="color: #993333; font-weight: bold;">WITH</span> <span style="color: #993333; font-weight: bold;">GRANT</span> <span style="color: #993333; font-weight: bold;">OPTION</span>;
Query OK<span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">0</span> <span style="color: #993333; font-weight: bold;">ROWS</span> affected <span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">0.00</span> sec<span style="color: #66cc66;">&#41;</span></pre></div></div>

<p>Reinicie o MySQL:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>init.d<span style="color: #000000; font-weight: bold;">/</span>mysql restart</pre></div></div>

<p>ou</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">service mysql restart</pre></div></div>

<p>Adicione também uma regra no iptables para que seja permitido o acesso remoto na porta 3306 (se alterar a porta padrão do MySQL deve ser alterada a porta neste comando):</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">/</span>sbin<span style="color: #000000; font-weight: bold;">/</span>iptables <span style="color: #660033;">-A</span> INPUT <span style="color: #660033;">-i</span> eth0 <span style="color: #660033;">-p</span> tcp <span style="color: #660033;">--destination-port</span> <span style="color: #000000;">3306</span> <span style="color: #660033;">-j</span> ACCEPT</pre></div></div>

<p>E é isso ai pessoal :)</p>
]]></content:encoded>
			<wfw:commentRss>http://binho.net/acessando-o-mysql-remotamente/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Validando campos de data e hora no model do Laravel.</title>
		<link>http://binho.net/validando-campos-de-data-e-hora-no-model-do-laravel/</link>
		<comments>http://binho.net/validando-campos-de-data-e-hora-no-model-do-laravel/#comments</comments>
		<pubDate>Thu, 05 Jan 2012 03:33:23 +0000</pubDate>
		<dc:creator>binho</dc:creator>
				<category><![CDATA[Dev]]></category>
		<category><![CDATA[Laravel]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://binho.net/?p=34</guid>
		<description><![CDATA[Neste post irei mostrar como validar campos de formulários com valores que contenham uma data e hora no framework Laravel, por exemplo, &#8220;04/03/2012 13:00:00&#8243;. O PHP leva em conta sua definição da variável date.timezone do arquivo php.ini ou então o &#8230; <a href="http://binho.net/validando-campos-de-data-e-hora-no-model-do-laravel/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Neste post irei mostrar como validar campos de formulários com valores que contenham uma data e hora no framework <a href="http://laravel.com" title="Laravel" target="_blank">Laravel</a>, por exemplo, &#8220;04/03/2012 13:00:00&#8243;.</p>
<p>O PHP leva em conta sua definição da variável <strong>date.timezone</strong> do arquivo php.ini ou então o valor da definição do método <strong>date_default_timezone_set()</strong> para as funções de data do sistema, no caso do Brasil ficaria assim:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #990000;">date_default_timezone_set</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'America/Sao_Paulo'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Primeiro devemos adicionar um método a classe &#8220;Validator&#8221; do Laravel em <strong>nome_do_seu_projeto/laravel/validator.php</strong> (recomendo adicionar após o método validate_required).</p>
<p>EDIT: O método usando o strtotime() do PHP parece não funcionar em alguns casos para nosso formato de data/hora, estou usando o método a seguir para validação:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">// nao alterar o nome do metodo pois senao nao</span>
<span style="color: #666666; font-style: italic;">// sera encontrado pelo validator do laravel.</span>
<span style="color: #000000; font-weight: bold;">protected</span> <span style="color: #000000; font-weight: bold;">function</span> validate_datetime<span style="color: #009900;">&#40;</span><span style="color: #000088;">$attribute</span><span style="color: #339933;">,</span> <span style="color: #000088;">$value</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
	<span style="color: #666666; font-style: italic;">// separa data e hora</span>
	<span style="color: #000088;">$pieces</span> <span style="color: #339933;">=</span> <span style="color: #990000;">explode</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">' '</span><span style="color: #339933;">,</span> <span style="color: #000088;">$value</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #990000;">count</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$pieces</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">==</span> <span style="color: #cc66cc;">2</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #000088;">$date_piece</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$pieces</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$time_piece</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$pieces</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
		<span style="color: #666666; font-style: italic;">// lista os dados de data e hora</span>
		<span style="color: #990000;">list</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$day</span><span style="color: #339933;">,</span> <span style="color: #000088;">$month</span><span style="color: #339933;">,</span> <span style="color: #000088;">$year</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">=</span> <span style="color: #990000;">explode</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'/'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$date_piece</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #990000;">list</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$hour</span><span style="color: #339933;">,</span> <span style="color: #000088;">$minute</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">=</span> <span style="color: #990000;">explode</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">':'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$time_piece</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #666666; font-style: italic;">// data eh valida?</span>
		<span style="color: #000088;">$date_is_valid</span> <span style="color: #339933;">=</span> <span style="color: #990000;">checkdate</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$month</span><span style="color: #339933;">,</span> <span style="color: #000088;">$day</span><span style="color: #339933;">,</span> <span style="color: #000088;">$year</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #666666; font-style: italic;">// hora eh valida?</span>
		<span style="color: #000088;">$time_is_valid</span> <span style="color: #339933;">=</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">;</span>
		<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$hour</span> <span style="color: #339933;">&gt;</span> <span style="color: #339933;">-</span><span style="color: #cc66cc;">1</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #000088;">$hour</span> <span style="color: #339933;">&lt;</span> <span style="color: #cc66cc;">24</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$minute</span> <span style="color: #339933;">&gt;</span> <span style="color: #339933;">-</span><span style="color: #cc66cc;">1</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #000088;">$minute</span> <span style="color: #339933;">&lt;</span> <span style="color: #cc66cc;">60</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
			<span style="color: #000088;">$time_is_valid</span> <span style="color: #339933;">=</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
		<span style="color: #666666; font-style: italic;">// data e hora sao validos?</span>
		<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #000088;">$date_is_valid</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #000088;">$time_is_valid</span> <span style="color: #009900;">&#41;</span> <span style="color: #b1b100;">return</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
	<span style="color: #b1b100;">return</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">// ### NAO RECOMENDADO ###</span>
<span style="color: #000000; font-weight: bold;">protected</span> <span style="color: #000000; font-weight: bold;">function</span> validate_datetime<span style="color: #009900;">&#40;</span><span style="color: #000088;">$attribute</span><span style="color: #339933;">,</span> <span style="color: #000088;">$value</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
    <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #339933;">!</span> <span style="color: #990000;">strtotime</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$value</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #b1b100;">return</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">return</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>Desta forma podemos dentro do model do Laravel adicionar a validação da seguinte maneira.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$rules</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
    <span style="color: #0000ff;">'start_at'</span>  <span style="color: #339933;">=&gt;</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'required'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'datetime'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
    <span style="color: #0000ff;">'end_at'</span>    <span style="color: #339933;">=&gt;</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'required'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'datetime'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// mensagens personalizadas para os erros (opcional)</span>
<span style="color: #000088;">$messages</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span>
    <span style="color: #0000ff;">'start_at_required'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'O campo &quot;Data início&quot; é obrigatório.'</span><span style="color: #339933;">,</span>
    <span style="color: #0000ff;">'start_at_datetime'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'A data informada em &quot;Data início&quot; é inválida.'</span><span style="color: #339933;">,</span>
    <span style="color: #0000ff;">'end_at_required'</span>   <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'O campo &quot;Data fim&quot; é obrigatório.'</span><span style="color: #339933;">,</span>
    <span style="color: #0000ff;">'end_at_datetime'</span>   <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'A data informada em &quot;Data fim&quot; é inválida.'</span><span style="color: #339933;">,</span>
<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000088;">$validator</span> <span style="color: #339933;">=</span> Validator<span style="color: #339933;">::</span><span style="color: #004000;">make</span><span style="color: #009900;">&#40;</span> Input<span style="color: #339933;">::</span><span style="color: #004000;">get</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$rules</span><span style="color: #339933;">,</span> <span style="color: #000088;">$messages</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span> <span style="color: #000088;">$validator</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">valid</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #666666; font-style: italic;">// salvar dados da model!</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>Ainda é possível criar outros métodos de validação por exemplo para validar um CPF, telefone, etc.</p>
<p>Até mais!!</p>
]]></content:encoded>
			<wfw:commentRss>http://binho.net/validando-campos-de-data-e-hora-no-model-do-laravel/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Desabilitando temporariamente a checagem de Foreign keys no MySQL.</title>
		<link>http://binho.net/desabilitando-temporariamente-a-checagem-de-foreign-keys-no-mysql/</link>
		<comments>http://binho.net/desabilitando-temporariamente-a-checagem-de-foreign-keys-no-mysql/#comments</comments>
		<pubDate>Tue, 03 Jan 2012 23:19:45 +0000</pubDate>
		<dc:creator>binho</dc:creator>
				<category><![CDATA[Geral]]></category>

		<guid isPermaLink="false">http://binho.net/?p=22</guid>
		<description><![CDATA[Durante o processo de modelagem e teste de dados no MySQL as vezes queremos que a checagem de FK&#8217;s do MySQL não estivessem ali para inserção de dados e pequenas alterações. Podemos desabilitar esta checagem de uma forma muito simples &#8230; <a href="http://binho.net/desabilitando-temporariamente-a-checagem-de-foreign-keys-no-mysql/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Durante o processo de modelagem e teste de dados no MySQL as vezes queremos que a checagem de FK&#8217;s do MySQL não estivessem ali para inserção de dados e pequenas alterações. Podemos desabilitar esta checagem de uma forma muito simples e ativar novamente assim que o modelo/dados das tabelas estiverem ok.</p>

<div class="wp_syntax"><div class="code"><pre class="sql" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">/* desliga checagem de FKs */</span>
<span style="color: #993333; font-weight: bold;">SET</span> foreign_key_checks <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">0</span>;</pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="sql" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">/* liga checagem de FKs */</span>
<span style="color: #993333; font-weight: bold;">SET</span> foreign_key_checks <span style="color: #66cc66;">=</span> <span style="color: #cc66cc;">1</span>;</pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="sql" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">/* verificando o estado atual da opcao */</span>
<span style="color: #993333; font-weight: bold;">SELECT</span> @@foreign_key_checks;</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://binho.net/desabilitando-temporariamente-a-checagem-de-foreign-keys-no-mysql/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Importando arquivos grandes no MySQL</title>
		<link>http://binho.net/importando-arquivos-grandes-no-mysql/</link>
		<comments>http://binho.net/importando-arquivos-grandes-no-mysql/#comments</comments>
		<pubDate>Tue, 03 Jan 2012 13:45:12 +0000</pubDate>
		<dc:creator>binho</dc:creator>
				<category><![CDATA[Geral]]></category>

		<guid isPermaLink="false">http://binho.net/?p=17</guid>
		<description><![CDATA[Importar arquivos muito grandes no MySQL sempre é uma batalha. Uma das maneiras mais simples de se livrar dessa tarefa é usando o método abaixo. Conectar no MySQL: mysql -uUSUARIO -pSENHA -hHOST Dentro do MySQL: use NOME_DO_BANCO; Após selecionar o &#8230; <a href="http://binho.net/importando-arquivos-grandes-no-mysql/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Importar arquivos muito grandes no MySQL sempre é uma batalha.<br />
Uma das maneiras mais simples de se livrar dessa tarefa é usando o método abaixo.</p>
<p>Conectar no MySQL:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">mysql <span style="color: #660033;">-uUSUARIO</span> <span style="color: #660033;">-pSENHA</span> <span style="color: #660033;">-hHOST</span></pre></div></div>

<p>Dentro do MySQL:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">use NOME_DO_BANCO;</pre></div></div>

<p>Após selecionar o banco que deseja importar os dados execute:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">source</span> <span style="color: #000000; font-weight: bold;">/</span>caminho<span style="color: #000000; font-weight: bold;">/</span>para<span style="color: #000000; font-weight: bold;">/</span>arquivo<span style="color: #000000; font-weight: bold;">/</span>dados.sql;</pre></div></div>

<p>O MySQL irá começar a importar os dados do seu arquivo :-)</p>
]]></content:encoded>
			<wfw:commentRss>http://binho.net/importando-arquivos-grandes-no-mysql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Como redefinir seu timezone no Ubuntu</title>
		<link>http://binho.net/como-redefinir-seu-timezone-no-ubuntu/</link>
		<comments>http://binho.net/como-redefinir-seu-timezone-no-ubuntu/#comments</comments>
		<pubDate>Wed, 28 Dec 2011 16:35:24 +0000</pubDate>
		<dc:creator>binho</dc:creator>
				<category><![CDATA[Geral]]></category>

		<guid isPermaLink="false">http://binho.net/?p=9</guid>
		<description><![CDATA[Para redefinir seu timezone no Ubuntu será necessário reconfigurar o pacote tzdata, vamos lá: dpkg-reconfigure tzdata Após entrar com o comando acima via Terminal será apresentada uma tela, se você esta no Brasil assim como eu selecione &#8220;America&#8221; e na &#8230; <a href="http://binho.net/como-redefinir-seu-timezone-no-ubuntu/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Para redefinir seu timezone no Ubuntu será necessário reconfigurar o pacote tzdata, vamos lá:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">dpkg-reconfigure tzdata</pre></div></div>

<p>Após entrar com o comando acima via Terminal será apresentada uma tela, se você esta no Brasil assim como eu selecione &#8220;America&#8221; e na tela seguinte selecione &#8220;Sao_Paulo&#8221;.<br />
A seguinte saída será apresentada:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">root<span style="color: #000000; font-weight: bold;">@</span>li208-<span style="color: #000000;">44</span>:~<span style="color: #666666; font-style: italic;"># dpkg-reconfigure tzdata</span>
Current default <span style="color: #000000; font-weight: bold;">time</span> zone: <span style="color: #ff0000;">'America/Sao_Paulo'</span>
Local <span style="color: #000000; font-weight: bold;">time</span> is now: Wed Dec <span style="color: #000000;">28</span> <span style="color: #000000;">14</span>:<span style="color: #000000;">27</span>:<span style="color: #000000;">47</span> BRST <span style="color: #000000;">2011</span>.
Universal Time is now: Wed Dec <span style="color: #000000;">28</span> <span style="color: #000000;">16</span>:<span style="color: #000000;">27</span>:<span style="color: #000000;">47</span> UTC <span style="color: #000000;">2011</span>.</pre></div></div>

<p>Agora iremos confirmar se a alteração foi feita com sucesso:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">root<span style="color: #000000; font-weight: bold;">@</span>li208-<span style="color: #000000;">44</span>:~<span style="color: #666666; font-style: italic;"># date</span>
Wed Dec <span style="color: #000000;">28</span> <span style="color: #000000;">14</span>:<span style="color: #000000;">28</span>:05 BRST <span style="color: #000000;">2011</span></pre></div></div>

<p>Isso ai! Data e hora foram alterados com sucesso :)</p>
]]></content:encoded>
			<wfw:commentRss>http://binho.net/como-redefinir-seu-timezone-no-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Olá Mundo!</title>
		<link>http://binho.net/hello-world/</link>
		<comments>http://binho.net/hello-world/#comments</comments>
		<pubDate>Tue, 13 Dec 2011 02:19:14 +0000</pubDate>
		<dc:creator>binho</dc:creator>
				<category><![CDATA[Geral]]></category>

		<guid isPermaLink="false">http://binho.net/?p=1</guid>
		<description><![CDATA[Olá a todos, começo aqui um blog sobre desenvolvimento mobile e web. Meu nome é Cleber ou &#8220;Binho&#8221; e trabalho a quase 9 anos com desenvolvimento e administração de servidores. Pretendo colocar neste blog coisas que aprendo durante o dia-a-dia &#8230; <a href="http://binho.net/hello-world/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Olá a todos, começo aqui um blog sobre desenvolvimento mobile e web.<br />
Meu nome é Cleber ou &#8220;Binho&#8221; e trabalho a quase 9 anos com desenvolvimento e administração de servidores. Pretendo colocar neste blog coisas que aprendo durante o dia-a-dia e assim ensinar e aprender. :)</p>
]]></content:encoded>
			<wfw:commentRss>http://binho.net/hello-world/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

