Skip to content

Instantly share code, notes, and snippets.

View rodrigopinto's full-sized avatar

Rodrigo Pinto rodrigopinto

  • Berlin, Germany
  • 07:23 (UTC +01:00)
View GitHub Profile
@rodrigopinto
rodrigopinto / gist:1166449
Created August 23, 2011 20:38 — forked from viniciusteles/gist:556029
Sete Atitudes para Hackear a Indústria de Software
Sete Atitudes para Hackear a Indústria de Software
By Klaus Wuestefeld
1) Torne-se excelente.
Seja realmente bom em alguma coisa. Não fique só choramingando ou
querendo progredir às custas dos outros. Não pense q pq vc sentou 4
anos numa faculdade ouvindo um professor falar sobre software q vc
sabe alguma coisa. Jogador de futebol não aprende a jogar bola tendo
@rodrigopinto
rodrigopinto / fuck.yeah
Created September 3, 2011 02:50
install ruby version on rvm pointing to libiconv of brew
#installing iconv library
$ brew install libiconv
#removing the ruby version if it there is previously
$ rvm remove 1.9.2
#installing the ruby version pointing to the iconv library
$ rvm install 1.9.2 --with-iconv-dir=/usr/local/Cellar/libiconv/1.13.1
@rodrigopinto
rodrigopinto / gist:1246902
Created September 28, 2011 03:17
error pg gem
@mac:~/code/github/private/eventos-hq ree-1.8.7(feature/to_rails_3)$ gem install pg -- --with-pg-config=/Library/PostgreSQL/8.4/bin/pg_config
Building native extensions. This could take a while...
ERROR: Error installing pg:
ERROR: Failed to build gem native extension.
/Users/rodrigopinto/.rvm/rubies/ree-1.8.7-2011.03/bin/ruby extconf.rb --with-pg-config=/Library/PostgreSQL/8.4/bin/pg_config
Using config values from /Library/PostgreSQL/8.4/bin/pg_config
checking for libpq-fe.h... yes
checking for libpq/libpq-fs.h... yes
checking for PQconnectdb() in -lpq... no
@rodrigopinto
rodrigopinto / gist:1248314
Created September 28, 2011 15:53
brew install git
GIT_VERSION = 1.7.6.1
* new build flags or prefix
./generate-cmdlist.sh > common-cmds.h+ && mv common-cmds.h+ common-cmds.h
* new link flags
gcc -o hex.o -c -O3 -march=core2 -msse4.1 -w -pipe -I. -DUSE_ST_TIMESPEC -DSHA1_HEADER='<openssl/sha.h>' -DNO_MEMMEM hex.c
gcc -o ident.o -c -O3 -march=core2 -msse4.1 -w -pipe -I. -DUSE_ST_TIMESPEC -DSHA1_HEADER='<openssl/sha.h>' -DNO_MEMMEM ident.c
gcc -o levenshtein.o -c -O3 -march=core2 -msse4.1 -w -pipe -I. -DUSE_ST_TIMESPEC -DSHA1_HEADER='<openssl/sha.h>' -DNO_MEMMEM levenshtein.c
gcc -o list-objects.o -c -O3 -march=core2 -msse4.1 -w -pipe -I. -DUSE_ST_TIMESPEC -DSHA1_HEADER='<openssl/sha.h>' -DNO_MEMMEM list-objects.c
gcc -o ll-merge.o -c -O3 -march=core2 -msse4.1 -w -pipe -I. -DUSE_ST_TIMESPEC -DSHA1_HEADER='<openssl/sha.h>' -DNO_MEMMEM ll-merge.c
gcc -o lockfile.o -c -O3 -march=core2 -msse4.1 -w -pipe -I. -DUSE_ST_TIMESPEC -DSHA1_HEADER='<openssl/sha.h>' -DNO_MEMMEM lockfile.c
pt-br:
formtastic:
yes: 'Sim'
no: 'Não'
create: 'Criar %{model}'
update: 'Atualizar %{model}'
submit: 'Salvar %{model}'
required: 'obrigatório'
@rodrigopinto
rodrigopinto / long_day_part_one.rb
Created November 24, 2011 12:18
A long journey of day at the office
### THIS IS PART OF A QUERY
def conditions_for_regioncode(region_ids)
regions = []
region_ids.each do |region|
regions << "reg.regioncode = '#{region}'"
end
"(#{regions.join(' OR ')})"
end
@rodrigopinto
rodrigopinto / horaextra_blogroll.html
Created December 11, 2011 03:31
Blogroll da galera do horaextra do RJ , copiado do Blog do rafael lima
<ul>
<li><a href="http://metronus.com/blog/?utm_source=rafael.adm.br&amp;utm_medium=affiliate&amp;utm_content=textlink&amp;utm_campaign=horaextra">André Fonseca</a></li>
<li><a href="http://nighto.net/?utm_source=rafael.adm.br&amp;utm_medium=affiliate&amp;utm_content=textlink&amp;utm_campaign=horaextra">Arlindo Pereira</a></li>
<li><a href="http://blog.justen.eng.br/?utm_source=rafael.adm.br&amp;utm_medium=affiliate&amp;utm_content=textlink&amp;utm_campaign=horaextra">Álvaro Justen</a></li>
<li><a href="http://bkether.blogspot.com/?utm_source=rafael.adm.br&amp;utm_medium=affiliate&amp;utm_content=textlink&amp;utm_campaign=horaextra">Bruno Barros</a></li>
<li><a href="http://blog.brunoborges.com.br/?utm_source=rafael.adm.br&amp;utm_medium=affiliate&amp;utm_content=textlink&amp;utm_campaign=horaextra">Bruno Borges</a></li>
<li><a href="http://www.caikesouza.com/?utm_source=rafael.adm.br&amp;utm_medium=affiliate&amp;utm_content=textlink&amp;utm_campaign=horaextra">Caike Sousa</a></li>
<li><a href="http://diegodu
@rodrigopinto
rodrigopinto / gist:1602857
Created January 12, 2012 20:17
lista de gems do servidor
aaronh-chronic (0.3.9)
actionmailer (2.3.8, 2.3.5)
actionpack (2.3.8, 2.3.5)
actionwebservice (2.3.8)
activemodel (3.0.6)
activerecord (3.0.3, 2.3.8, 2.3.5)
activerecord-sqlserver-adapter (2.3.8)
activeresource (2.3.8, 2.3.5)
activesupport (3.0.6, 3.0.3, 2.3.8, 2.3.5)
acts_as_reportable (1.1.1)
class OperationsController < ApplicationController
respond_to :json
def create
app = App.find_by_app_key!(params[:app_key]) #aqui retorna um 404
operation = app.new_operation(params[:operation])
operation.save
respond_with operation
end
end
@rodrigopinto
rodrigopinto / grbc_horaextra_2012.beer
Created January 21, 2012 22:25
Samba enredo 2012 do G.R.B.C #horaextra
Hojeee é mais uma segunda-feira,
a patroa ta avisada,
não tenho hora pra voltar.
Vou pro bar com amigos,
Entre uma cerveja e outra,
não vejo a hora passar
Conversa nerd, filosófica ou afiada
o que importa é a cervejada