Skip to content

Instantly share code, notes, and snippets.

View gliese1337's full-sized avatar

Logan Kearsley gliese1337

View GitHub Profile
@jussi-kalliokoski
jussi-kalliokoski / draw-waveform.js
Created September 24, 2014 06:41
Waveform drawing
function getAudioData (url, time) {
return new Promise(function (resolve, reject) {
var context = new AudioContext();
var track = new Audio(url);
var bufferLength = time * context.sampleRate;
var buffer = new Float32Array(bufferLength);
var collector = context.createScriptProcessor(0, 1);
var audioSource = context.createMediaElementSource(track);
var samplesCollected = 0;
@aktau
aktau / symp.c
Created February 24, 2014 19:30
higher order symplectic integrators
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
/*
* symp.cpp
* Symplectic integration routines to 4th, 6th, and 8th order.
* Copyright (c) 1998 David Whysong, with alterations by Bill Gray.
* (Further revised 2013 April 26 by Bill Gray: comments added,
* 'const' declarations added, more digits shown in results, revised
@danparsons
danparsons / gist:3195652
Created July 29, 2012 01:46
How to stream the London 2012 Olympics

How to stream the London 2012 Olympics

There have been several HOWTOs posted regarding streaming the 2012 Olympics using HTTP / SOCKS proxies via SSH and other similar methods. None of these actually work using the latest Flash on Mountain Lion (with Firefox, Chrome or Safari). Additionally, the third-party streaming sites don't provide BBC's amazing interface, which lets you quickly skip to individual competitors and events. However, setting up an OpenVPN server does work, with some tweaks. You'll get the exact same UX that people in England receive.