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
// 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 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
sudo tcpdump -i en1 -n -s 0 -w - | grep -a -o -E "Host\: .*|GET \/.*" |
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
chsh -s /bin/bash |
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
# 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 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 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 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
# 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 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
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 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
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 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
sudo apt-get install monit | |
# Edit config file, example below | |
sudo vim /etc/monit/monitrc | |
# Check config syntax | |
sudo monit -t | |
# When no syntax errors edit the /etc/default/monit file to startup=1 | |
sudo vim /etc/default/monit | |
# Start the service with: | |
sudo /etc/init.d/monit start |
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
# check the hostname, needed as part of install | |
hostname -f | |
sudo apt-get install postfix telnet mailx | |
# test with | |
mail [email protected] |