Skip to content

Instantly share code, notes, and snippets.

View spalenza's full-sized avatar

Rodolfo Spalenza spalenza

  • RDStation
  • Vitória - ES - Brazil
View GitHub Profile
# 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
@spalenza
spalenza / gist:4224200
Created December 6, 2012 12:44
Help with Rails

Generate model without test and assets

rails g model MODEL_NAME ATTRIBUTES --skip-test-framework --skip-assets

@spalenza
spalenza / Gemfile
Created October 17, 2012 20:36 — forked from robotarmy/Gemfile
Adding Rake to Sinatra with Rspec
gem 'sinatra'
group :development,:test do
gem 'rspec'
gem 'rack-test'
end
@spalenza
spalenza / KeyMappings
Created October 17, 2012 15:51 — forked from rubyonrailsworks/KeyMappings
NerdTree
o.......Open files, directories and bookmarks....................|NERDTree-o|
go......Open selected file, but leave cursor in the NERDTree.....|NERDTree-go|
t.......Open selected node/bookmark in a new tab.................|NERDTree-t|
T.......Same as 't' but keep the focus on the current tab........|NERDTree-T|
i.......Open selected file in a split window.....................|NERDTree-i|
gi......Same as i, but leave the cursor on the NERDTree..........|NERDTree-gi|
s.......Open selected file in a new vsplit.......................|NERDTree-s|
gs......Same as s, but leave the cursor on the NERDTree..........|NERDTree-gs|
O.......Recursively open the selected directory..................|NERDTree-O|
x.......Close the current nodes parent...........................|NERDTree-x|
@spalenza
spalenza / config
Last active October 11, 2015 07:57
Fix timeout SSH at OS X
# Run
ssh-add -K
# PATH: ~/.ssh/config
# When in vi hit i to enter insert mode and add the following lines to the config file
ServerAliveCountMax 3
ServerAliveInterval 10
@spalenza
spalenza / gist:3756032
Created September 20, 2012 13:48
Error Ruby OS X Mountain Lion

Error

unable to convert "\xC3" to UTF-8 in conversion from ASCII-8BIT to UTF-8...

Insert into ~/.profile_bash

export LC_ALL="en_US.UTF-8"

@spalenza
spalenza / .rvmrc
Created September 19, 2012 16:05
Configure rvmrc in ~/.rvmrc
rvm_gemset_create_on_use_flag=1
rvm_install_on_use_flag=1
rvm_project_rvmrc=1
@spalenza
spalenza / gist:3307942
Created August 9, 2012 20:52
Remove Line Textmate with Command + D
sed "$TM_LINE_NUMBER d"
@spalenza
spalenza / .rvmrc
Created August 5, 2012 23:38
Ruby - Version Control File
rvm --create use version@project_name > /dev/null
Example:
rvm --create use 1.9.3@blog > /dev/null