This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
data = [ | |
215211, | |
218166, | |
221817, | |
224000, | |
226665, | |
228260, | |
230059, | |
235005, | |
239554, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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...." |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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\]" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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\]" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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: { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
OlderNewer