Skip to content

Instantly share code, notes, and snippets.

View knightq's full-sized avatar

Andrea Salicetti knightq

View GitHub Profile
@knightq
knightq / gist:3077181
Created July 9, 2012 15:30
Repair MongoDB on Ubuntu
# see: http://stackoverflow.com/questions/4837427/mongo-ruby-connection-problem
sudo rm /var/lib/mongodb/mongod.lock
sudo -u mongodb mongod -f /etc/mongodb.conf --repair
sudo start mongodb
sudo status mongodb
@knightq
knightq / [Rails][test] - How to run one test only
Created June 7, 2012 09:36
Console script to launch one test method only in Rails
ruby -I test test/functional/items_controller_test.rb -n 'mio_test'
@knightq
knightq / rvm_setup.txt
Created November 30, 2011 09:07
RVM setup
# Install from scratch
bash < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer )
# Update
rvm get head
# Install openssl
rvm pkg install openssl #(older format - rvm package install openssl)
# Install iconv
rvm pkg install iconv # (older format - rvm package install iconv)
# In case of problem, try to install without autoreconf
@knightq
knightq / hudson.xml
Created September 23, 2011 13:39
Script to update jenkins to the latest version
hudson_home: /home/cruisecontrol/apache-tomcat-6.0.16/webapps/hudson
hudson_ftp: ftp.osuosl.org
hudson_ftp_base_dir: pub/jenkins/war/