Skip to content

Instantly share code, notes, and snippets.

View agibsonccc's full-sized avatar

Adam Gibson agibsonccc

View GitHub Profile
@agibsonccc
agibsonccc / gist:8230583
Created January 3, 2014 01:03
Netflix genres
Array.prototype.pick = function () {
return this[Math.floor(Math.random() * this.length)]
};
function randInt(a, b) {
return Math.floor(Math.random() * (b - a + 1)) + a
}
function chance(a) {
return randInt(0, 100) < a ? !0 : !1
@rdegges
rdegges / proxy_nginx.sh
Created April 11, 2011 05:30
Create a HTTP proxy for jenkins using NGINX.
sudo aptitude -y install nginx
cd /etc/nginx/sites-available
sudo rm default
sudo cat > jenkins
upstream app_server {
server 127.0.0.1:8080 fail_timeout=0;
}
server {
listen 80;