Skip to content

Instantly share code, notes, and snippets.

View saulovenancio's full-sized avatar

Saulo Venancio saulovenancio

View GitHub Profile
@saulovenancio
saulovenancio / gist:5314128
Created April 4, 2013 20:35
Importando dump em SQL
psql db < file.sql
@saulovenancio
saulovenancio / gist:5319276
Created April 5, 2013 13:30
install phpunit linux
pear config-set auto_discover 1
pear install pear.phpunit.de/PHPUnit
pear install phpunit/DbUnit
pear install phpunit/PHPUnit_Selenium
@saulovenancio
saulovenancio / gist:5321174
Created April 5, 2013 17:44
create shortcuts for git
#make "com" alias for "commit"
git config alias.com commit
#make "co" alias for checkout
git config alias.co checkout
#make "br" alias for branch
git config alias.br branch
@saulovenancio
saulovenancio / gist:5354662
Created April 10, 2013 13:33
Gerar entidade no doctrine
php app/console doctrine:generate:entity
<?php
function PrintArray($aVals)
{
echo '<ul>';
foreach($aVals as $key => $val)
{
if(is_array($val))
{
var http = require('http');
var parseTrack = function (data) {
var trackLines = data.replace(/[\r\n]/g, '').replace(/<\/tr>/gi, '</tr>\n').match(/<tr.*?>(.*)<\/tr>/gi);
trackLines.shift();
var parsed = [], parts = [];
var length = trackLines.length;
var details, date, track;
for (;length--;) {
@saulovenancio
saulovenancio / gist:5714001
Last active December 18, 2015 02:49 — forked from anonymous/gist:5713995
integração php cielo
<?php
// arquivo: recarga.php 2011-05-19 18:37
// por: Giancarlo Gil Ottaviani Raduan - gra...@gmail.com /
http://www.raduan.net
// saudações aos colegas da Lista PHP (list...@googlegroups.com)
// copie, altere, mude, mas por favor, deixe os créditos acima :)
if ( $_POST ) {
//ambiente de producao
$numero = 'coloque aqui seu numero de estabelecimento'; //
@saulovenancio
saulovenancio / gist:5843492
Created June 23, 2013 02:28
install sublie text on ubuntu 12.04
sudo add-apt-repository ppa:webupd8team/sublime-text-2
sudo apt-get update
sudo apt-get install sublime-text
@saulovenancio
saulovenancio / gist:6166619
Created August 6, 2013 17:29
find jar files which has Class
find . -name '*.jar' -exec grep -Hls ELException {} \;
@saulovenancio
saulovenancio / gist:6188448
Created August 8, 2013 20:35
mudar passphrase de chave ssh
ssh-keygen -f id_rsa -p