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
sudo apt-get update | |
sudo aptitude install build-essential | |
sudo apt-get install libmozjs-dev libicu-dev libcurl4-openssl-dev erlang | |
mkdir ~/src | |
cd ~/src | |
wget http://apache.mirror.anlx.net/couchdb/0.9.1/apache-couchdb-0.9.1.tar.gz | |
tar zxvf apache-couchdb-0.9.1.tar.gz | |
cd apache-couchdb-0.9.1 | |
./configure && make && sudo 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
sudo vi /etc/apt/sources.list | |
# Add multiverse to the end of each of the strings | |
sudo apt-get update | |
sudo apt-get install sun-java6-jdk | |
java -version | |
#java version "1.6.0_06" | |
#Java(TM) SE Runtime Environment (build 1.6.0_06-b02) | |
#Java HotSpot(TM) 64-Bit Server VM (build 10.0-b22, mixed mode) |
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
# Integrity CI setup on slicehost | |
useradd -m ci | |
sudo passwd ci | |
su ci | |
bash | |
gem install bundler | |
git clone git://github.com/integrity/integrity | |
cd integrity | |
git checkout -b deploy v0.2.0 |
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
class ProjectsController < ApplicationController | |
# GET /projects | |
# GET /projects.xml | |
def index | |
@projects = Project.all | |
respond_to do |format| | |
format.html # index.html.erb | |
format.xml { render :xml => @projects } | |
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
# Postgres install on ubuntu | |
sudo apt-get install postgresql | |
# Log in with | |
sudo -u postgres psql postgres | |
# change password by issuing | |
\password postgres | |
# create databases with |
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
chsh -s /bin/bash |
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
sudo tcpdump -i en1 -n -s 0 -w - | grep -a -o -E "Host\: .*|GET \/.*" |
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
// Standard jQuery plugin pattern | |
(function($){ | |
$.fn.pluginName = function(options) { | |
var options = $.extend({},$.fn.pluginName.defaults,options) | |
return this.each(function() { | |
// Code goes here | |
// $(this) //DOM element | |
// |
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
# Snow Leopard | |
ARCHFLAGS="-arch x86_64" gem install mysql -v=2.7 -- --with-mysql-config=/usr/local/bin/mysql_config | |
# Leopard | |
env ARCHFLAGS="-arch i386" gem install mysql -- --with-mysql-dir=/usr/local/mysql --with-mysql-lib=/usr/local/mysql/lib --with-mysql-include=/usr/local/mysql/include |
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 1000 | awk '{a[$2]++}END{for(i in a){print a[i] " " i}}' | sort -rn | head |