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
// early experiments with node had mysterious double requests | |
// turned out these were for the stoopid favicon | |
// here's how to short-circuit those requests | |
// and stop seeing 404 errors in your client console | |
var http = require('http'); | |
http.createServer(function (q, r) { | |
// control for favicon |
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
var quicksort = function(A) { | |
var swap = function(a, b) { | |
var temp = A[a]; | |
A[a] = A[b]; | |
A[b] = temp; | |
} | |
var partition = function(left, right) { | |
var pivotIndex = Math.floor((left + right) / 2); |
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
curl -sL https://deb.nodesource.com/setup | sudo bash - && | |
sudo apt-get install -y nodejs | |
sudo apt-get update && | |
sudo apt-get install nginx && | |
sudo apt-get install git | |
## upgrade aps and resolve deps with the more important ones | |
sudo apt-get dist-upgrade | |
#chagne to root |
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
import code; code.interact(local=dict(globals(), **locals())) |