This file contains 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
# Install Postgres 9.2 from https://launchpad.net/~pitti/+archive/postgresql | |
# drop the cluster which gets created during the setup | |
pg_dropcluster --stop 9.2 main | |
# create a backup of your current cluster | |
rsync -a /var/lib/postgresql/9.1 /var/lib/postgresql/9.1.backup | |
# upgrade the the old 9.1 cluster | |
pg_upgradecluster 9.1 main /var/lib/postgresql/9.2 |
This file contains 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
cd tmp/x86_64-darwin11.3.0/ruby_mapnik/1.9.3 | |
make | |
compiling ../../../../ext/ruby_mapnik/_mapnik_feature.rb.cpp | |
cc1plus: warning: command line option "-Wdeclaration-after-statement" is valid for C/ObjC but not for C++ | |
cc1plus: warning: command line option "-Wimplicit-function-declaration" is valid for C/ObjC but not for C++ | |
In file included from /Users/ben/.rvm/gems/ruby-1.9.3-p194@mapnik/gems/rice-1.4.3/ruby/lib/include/rice/detail/../to_from_ruby.hpp:5, | |
from /Users/ben/.rvm/gems/ruby-1.9.3-p194@mapnik/gems/rice-1.4.3/ruby/lib/include/rice/detail/Auto_Function_Wrapper.ipp:12, | |
from /Users/ben/.rvm/gems/ruby-1.9.3-p194@mapnik/gems/rice-1.4.3/ruby/lib/include/rice/detail/Auto_Function_Wrapper.hpp:826, | |
from /Users/ben/.rvm/gems/ruby-1.9.3-p194@mapnik/gems/rice-1.4.3/ruby/lib/include/rice/detail/wrap_function.ipp:10, | |
from /Users/ben/.rvm/gems/ruby-1.9.3-p194@mapnik/gems/rice-1.4.3/ruby/lib/include/rice/detail/wrap_function.hpp:338, |
This file contains 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
cd tmp/x86_64-darwin11.3.0/ruby_mapnik/1.9.3 | |
make | |
compiling ../../../../ext/ruby_mapnik/_mapnik_feature.rb.cpp | |
cc1plus: warning: command line option "-Wdeclaration-after-statement" is valid for C/ObjC but not for C++ | |
cc1plus: warning: command line option "-Wimplicit-function-declaration" is valid for C/ObjC but not for C++ | |
In file included from /Users/ben/.rvm/gems/ruby-1.9.3-p194@mapnik/gems/rice-1.4.3/ruby/lib/include/rice/detail/../to_from_ruby.hpp:5, | |
from /Users/ben/.rvm/gems/ruby-1.9.3-p194@mapnik/gems/rice-1.4.3/ruby/lib/include/rice/detail/Auto_Function_Wrapper.ipp:12, | |
from /Users/ben/.rvm/gems/ruby-1.9.3-p194@mapnik/gems/rice-1.4.3/ruby/lib/include/rice/detail/Auto_Function_Wrapper.hpp:826, | |
from /Users/ben/.rvm/gems/ruby-1.9.3-p194@mapnik/gems/rice-1.4.3/ruby/lib/include/rice/detail/wrap_function.ipp:10, | |
from /Users/ben/.rvm/gems/ruby-1.9.3-p194@mapnik/gems/rice-1.4.3/ruby/lib/include/rice/detail/wrap_function.hpp:338, |
This file contains 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
#!/usr/bin/env bash | |
apt-get -y update | |
apt-get -y install build-essential zlib1g-dev libssl-dev libreadline6-dev libyaml-dev | |
cd /tmp | |
wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p194.tar.gz | |
tar -xvzf ruby-1.9.3-p194.tar.gz | |
cd ruby-1.9.3-p194/ | |
./configure --prefix=/opt/ruby-1.9.3-p194 | |
make | |
make install |
This file contains 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
file = File.new(File.join(Rails.root, 'extras', 'bson', 'foobar.bson') | |
while not file.eof? do | |
entry = BSON.read_bson_document(file) | |
entry.delete("_id") | |
Entry.create(entry) | |
end |
This file contains 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
# Terminal Progress Indicators. Four examples are included: percentage, | |
# spinner, progress bar, and combined. This script has been tested on | |
# Mac OS X 10.8 with Ruby 1.8.7, 1.9.1, 1.9.2, and 1.9.3 | |
class Spinner | |
include Enumerable | |
def each | |
loop do | |
yield '|' | |
yield '/' |
This file contains 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
history | awk {'print $2, $3, $4'} | sort | uniq -c | sort -k1 -rn | head -n 30 |
This file contains 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
{ | |
"color_scheme": "Packages/User/Tomorrow-Night-Bright.tmTheme", | |
"ensure_newline_at_eof_on_save": true, | |
"folder_exclude_patterns": | |
[ | |
".svn", | |
".git", | |
".hg", | |
"CVS", | |
".sass-cache" |
This file contains 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
#!/usr/bin/env bash | |
apt-get -y update | |
apt-get -y install build-essential zlib1g-dev libssl-dev libreadline6-dev libyaml-dev | |
cd /tmp | |
wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p194.tar.gz | |
tar -xvzf ruby-1.9.3-p194.tar.gz | |
cd ruby-1.9.3-p194/ | |
./configure --prefix=/opt/ruby-1.9.3-p194 | |
make | |
make install |
This file contains 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
#!/usr/bin/env bash | |
aptitude -y update | |
aptitude -y install build-essential zlib1g-dev libssl-dev libreadline6-dev libyaml-dev | |
cd /tmp | |
wget http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p392.tar.gz | |
tar -xvzf ruby-1.9.3-p392.tar.gz | |
cd ruby-1.9.3-p392/ | |
./configure --prefix=/opt/ruby-1.9.3-p392 | |
make -j 4 | |
make install |