Skip to content

Instantly share code, notes, and snippets.

Dan Simpson dansimpson

  • San Diego CA
Block or report user

Report or block dansimpson

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@dansimpson
dansimpson / ac_stream.rb
Created Mar 1, 2017
Aircraft position streaming
View ac_stream.rb
require 'socket'
require 'json'
class AircraftPositionStream
def initialize host, port
@host = host
@port = port
end
View keybase.md

Keybase proof

I hereby claim:

  • I am dansimpson on github.
  • I am simpsond (https://keybase.io/simpsond) on keybase.
  • I have a public key whose fingerprint is A067 FB38 9FD4 D771 45E2 941E F74A BCB2 2BA7 9014

To claim this, I am signing this object:

View max31855_json.c
#include <stdint.h>
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <getopt.h>
#include <string.h>
#include <fcntl.h>
#include <sys/ioctl.h>
#include <linux/types.h>
#include <linux/spi/spidev.h>
View mcp3008.c
#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 / ifind
Last active Dec 19, 2015
Small command line utility for fetching GPS coordinates of you iPhone, iPad, or iPod.
View ifind
#!/usr/bin/env ruby
require "optparse"
require "json"
require "findi"
def report device, mode=:text
name = device.name
@dansimpson
dansimpson / gist:1339595
Created Nov 4, 2011
essential packages for rvm on ubuntu
View gist:1339595
sudo apt-get -y install aptitude git-core curl build-essential openssl libreadline6 libreadline6-dev zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-0 libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev automake libtool bison
@dansimpson
dansimpson / twilight_pygments.css
Created Jan 30, 2011
Pygments stylesheet based on Textmates's Twilight theme
View twilight_pygments.css
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 */
View gist:615565
class ConversationsController < ApplicationController
before_filter :load_board
def index
@conversations = Conversation.all
respond_to do |format|
format.html # index.html.erb
format.xml { render :xml => @conversations }
View http.rb
require "rubygems"
require "eventmachine"
class HttpHandler < EM::Connection
def initialize *args
super
@header = ""
@status = 200
end
View js1k.html
<!doctype html>
<html>
<head>
<title>JS1k, 1k demo submission</title>
<meta charset="utf-8" />
</head>
<body>
<canvas id="c"></canvas>
<script>
You can’t perform that action at this time.