Skip to content

Instantly share code, notes, and snippets.

View GeorgeErickson's full-sized avatar

George Erickson GeorgeErickson

View GitHub Profile
@GeorgeErickson
GeorgeErickson / gist:1134831
Created August 9, 2011 18:36
webfaction ssh
The procedure for setting up automatic private/public key login on our servers is as follows:
- On your own machine, go to $HOME/.ssh and type: ssh-keygen -t dsa
- When prompted for it, leave the default location for the file and let the passphrase empty
- Copy the content of the "id_dsa.pub" file that just got created into the $HOME/.ssh/authorized_keys and authorized_keys2 on our machine.
- Set the following permissions:
chmod 644 $HOME/.ssh/authorized_keys*
express = require('express')
app = module.exports = express.createServer()
app.configure = ->
app.set 'views', __dirname + '/views'
app.set 'view engine', 'jade'
app.use express.bodyParser()
app.use express.methodOverride()
app.use express.compiler({ src: __dirname + '/public', enable: ['less'] })
app.use app.router
function binarySearch(list, value){
var states = new Array;
var state = new Object;
state.done = false;
state.b = 0;
state.e = list.length;
state.m = Math.floor((state.b+state.e)/2);
//states.push(state.clone());
while(list[state.m] != value && state.b < state.e){
if(value > list[state.m]){