Skip to content

Instantly share code, notes, and snippets.

View dansimpson's full-sized avatar

Dan Simpson dansimpson

View GitHub Profile
#include <stdint.h>
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <getopt.h>
#include <fcntl.h>
#include <sys/ioctl.h>
#include <linux/types.h>
#include <linux/spi/spidev.h>
@dansimpson
dansimpson / twilight_pygments.css
Created January 30, 2011 16:57
Pygments stylesheet based on Textmates's Twilight theme
pre.code { background: #181818; padding: 16px; color: #F8F8F8; font-family: Consolas, Monaco,"Lucida Console"; }
pre.code * { font-family: Consolas, Monaco,"Lucida Console"; }
pre.code .hll { background-color: #ffffcc }
pre.code .c { color: #5F5A60; font-style: italic } /* Comment */
pre.code .err { border:#B22518; } /* Error */
pre.code .k { color: #CDA869 } /* Keyword */
pre.code .cm { color: #5F5A60; font-style: italic } /* Comment.Multiline */
pre.code .cp { color: #5F5A60 } /* Comment.Preproc */
pre.code .c1 { color: #5F5A60; font-style: italic } /* Comment.Single */
pre.code .cs { color: #5F5A60; font-style: italic } /* Comment.Special */
UrlEncoder = {
/**
* Encode a [deeply] nested object for use in a url
* Assumes Array.each is defined
*/
encode: function(params, prefix) {
var items = [];
@dansimpson
dansimpson / ac_stream.rb
Created March 1, 2017 03:43
Aircraft position streaming
require 'socket'
require 'json'
class AircraftPositionStream
def initialize host, port
@host = host
@port = port
end