Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Kleber Correia klebervirgilio

🎯
Focusing
View GitHub Profile
View gist:597539
data = [
215211,
218166,
221817,
224000,
226665,
228260,
230059,
235005,
239554,
@klebervirgilio
klebervirgilio / gist:653421
Created Oct 29, 2010
the error occurs whenever I try to use the class method 'Image.read'
View gist:653421
def img(opt={})
opt[:background_path] ||= "#{Rails.root.to_s}/public/images/citywaypass/card_background.png"
opt[:background_density] ||= "300x300"
opt[:font] ||= 'arial'
opt[:font_weight] ||= 900
opt[:pointsize] ||= 24
opt[:width] ||= 2603
opt[:heigth] ||= 1620
opt[:text] ||= "Something...."
View Feromes' .bach_profile
function parse_git_branch {
 git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}
function proml {
 local        BLUE="\[\033[0;34m\]"
 local         RED="\[\033[0;31m\]"
 local   LIGHT_RED="\[\033[1;31m\]"
 local       GREEN="\[\033[0;32m\]"
 local LIGHT_GREEN="\[\033[1;32m\]"
View .bash_profile
function parse_git_branch {
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}
function proml {
local BLUE="\[\033[0;34m\]"
local RED="\[\033[0;31m\]"
local LIGHT_RED="\[\033[1;31m\]"
local GREEN="\[\033[0;32m\]"
local LIGHT_GREEN="\[\033[1;32m\]"
@klebervirgilio
klebervirgilio / rename_qrcodes
Created Dec 1, 2010
Qro mudar o nome dos arquivos...
View rename_qrcodes
attr = {
"1"=>"Passeio de jeep na Floresta da Tijuca",
"4"=>"Tirolesa na Lagoa Rodrigo de Freitas",
"5"=>"City Tour pela Cidade Maravilhosa",
"8"=>"Museu Casa do Pontal",
"9"=>"Forte de Copacabana",
"13"=>"Mosteiro de São Bento",
"16"=>"Museu de Arte Moderna",
"19"=>"Museu do Índio",
"24"=>"Planetário do Rio",
@klebervirgilio
klebervirgilio / twitter_code
Created Mar 22, 2011
Esse é o nosso código do twitter.
View twitter_code
<script src="http://widgets.twimg.com/j/2/widget.js"></script>
<script>
new TWTR.Widget({
version: 2,
type: 'profile',
rpp: 4,
interval: 2000,
width: 250,
height: 300,
theme: {
View Array.rb
class Array
def delete_first_occurence!(array=nil)
return nil if array.nil? || !array.is_a?(Array)
array.each do |item|
self.delete_at(self.index(item)) if self.index(item)
end
self
end
View gist:1083941
Hardware Overview:
Model Name: MacBook
Model Identifier: MacBook4,1
Processor Name: Intel Core 2 Duo
Processor Speed: 2.4 GHz
Number Of Processors: 1
Total Number Of Cores: 2
L2 Cache: 3 MB
Memory: 4 GB
View gist:1100442
Intel GMA X3100:
Chipset Model: GMA X3100
Type: GPU
Bus: Built-In
VRAM (Total): 144 MB
Vendor: Intel (0x8086)
Device ID: 0x2a02
Revision ID: 0x0003
Displays:
@klebervirgilio
klebervirgilio / install_postgis_osx.sh
Created Jul 31, 2011 — forked from juniorz/install_postgis_osx.sh
Installing PostGIS on Mac OS X and Ubuntu
View install_postgis_osx.sh
# Some good references are:
# http://russbrooks.com/2010/11/25/install-postgresql-9-on-os-x
# http://www.paolocorti.net/2008/01/30/installing-postgis-on-ubuntu/
# http://postgis.refractions.net/documentation/manual-1.5/ch02.html#id2630392
#1. Install PostgreSQL postgis and postgres
brew install postgis
initdb /usr/local/var/postgres
pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start