Skip to content

Instantly share code, notes, and snippets.

@omphalos
omphalos / Dockerfile
Created October 1, 2015 00:54
wrtc dockerfile
# baseline
FROM debian:8.2
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update
RUN apt-get install -y curl sudo
# node
RUN curl --silent --location https://deb.nodesource.com/setup_0.12 | sudo bash -
RUN apt-get install -y nodejs
@omphalos
omphalos / gist:316e94d13b4567be9096
Created December 21, 2014 15:13
GameKnot chess scraper
var trs = [].slice.call(document.querySelectorAll('tr[itemprop]'))
trs.map(function(tr) { return +tr.id.substring(6) }).join()
@omphalos
omphalos / Reverse proxy one-liner
Created July 3, 2014 16:34
Reverse proxy one-liner
require('http-proxy').createProxyServer({ target: 'http://REMOTESERVER:REMOTEPORT' }).listen(LOCALPORT)
@omphalos
omphalos / multiple-regression-sylvester.js
Created August 17, 2013 16:52
multiple regression with sylvester
var sylvester = require('sylvester')
function multipleRegression(x, y) {
var X = $M(x)
, Y = $M(y)
, Xt = X.transpose()
, regression = Xt.multiply(X).inverse().multiply(Xt).multiply(Y)
return regression
@omphalos
omphalos / live.js
Created August 23, 2012 01:57 — forked from huythang38/live.js
auto refresh browser
/*
Live.js - One script closer to Designing in the Browser
Written for Handcraft.com by Martin Kool (@mrtnkl).
Version 4a.
Recent change: Add time stamp in head requests to circumvent caching.
Recent change: Made stylesheet and mimetype checks case insensitive.
http://livejs.com
http://livejs.com/license (MIT)