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
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* |
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
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 |
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
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]){ |
NewerOlder