Skip to content

Instantly share code, notes, and snippets.

@eagereyes
eagereyes / spi-shiftout-test.ino
Created August 16, 2017 03:58
Simple test program to shift out some bits to measure the difference between different Atmel chips and SPI vs. shiftOut()
// Simple test program to shift out some bits to measure the difference between
// different Atmel chips and SPI vs. shiftOut()
#include <SPI.h>
/* for Feather and Arduino Uno
#define RCLK_PIN 9 // latching pin for the shift registers to show values at their outputs
#define DATA_PIN MOSI
#define CLK_PIN SCK

Keybase proof

I hereby claim:

  • I am eagereyes on github.
  • I am eagereyes (https://keybase.io/eagereyes) on keybase.
  • I have a public key whose fingerprint is 2B70 D328 1EB5 B64D 2976 9D42 255F A76E A0BC 3AC1

To claim this, I am signing this object:

@eagereyes
eagereyes / index.html
Last active June 7, 2016 21:09
Multiples chart in D3 to show how much more CEOs make than average workers.
<!DOCTYPE html>
<html>
<head>
<title>Large Multiples</title>
<script src="http://d3js.org/d3.v3.min.js" charset="utf-8"></script>
<style>
rect {
fill: #ddd;
stroke: none;
}
var numOnRow = 6;
var width = 750;
var height = 600;
var padding = 67
var format = d3.format("1s");
var svg;
var data = {};
var circles = [];
@eagereyes
eagereyes / Unemployment-MSA.csv
Created July 17, 2013 18:42
Unemployment data for 380 metro areas (MSAs) in the U.S. from http://www.bls.gov/lau/home.htm in a cleaned-up and reformatted CSV. Data from January 2000 to December 2012. Note that the metro areas don't sum up to states, that's a different dataset.
We can't make this file beautiful and searchable because it's too large.
Area State,Area Type,Area,City,Date,LAUS Code,State,Area FIPS Code,Employed,Labor Force,Month,State FIPS Code,Unemployed,Unemployment Rate,Year
ME,Met NECTA,Portland-South Portland-Biddeford,Portland,1/1/2000,MT237675,ME,76750,184223,189622,1,23,5399,2.8,2000
ME,Met NECTA,Bangor,Bangor,1/1/2000,MT237075,ME,70750,64191,66618,1,23,2427,3.6,2000
ME,Met NECTA,Lewiston-Auburn,Lewiston,1/1/2000,MT237465,ME,74650,52934,54950,1,23,2016,3.7,2000
MA,Met NECTA,Pittsfield,Pittsfield,1/1/2000,MT257660,MA,76600,37117,38301,1,25,1184,3.1,2000
MA,Met NECTA,Leominster-Fitchburg-Gardner,Leominster,1/1/2000,MT257450,MA,74500,71032,73398,1,25,2366,3.2,2000
MA,Met NECTA,Barnstable Town,Barnstable Town,1/1/2000,MT257090,MA,70900,121657,125999,1,25,4342,3.4,2000
MA,Met NECTA,New Bedford,New Bedford,1/1/2000,MT257555,MA,75550,79221,82833,1,25,3612,4.4,2000
MA-CT,Met NECTA,Worcester,Worcester,1/1/2000,MT257960,MA,79600,273295,281124,1,25,7829,2.8,2000
@eagereyes
eagereyes / gist:98826
Created April 20, 2009 23:00 — forked from AlanQuatermain/gist:98622
Finds the project name if file in subdir "Classes". Also tried to get file's creation time, but need some more Mac-specific Ruby-fu, it seems (creation time is not POSIX standard)
#!/usr/bin/ruby
require 'osx/cocoa'
require 'date'
OSX.require_framework "AddressBook"
filePath = "%%%{PBXFilePath}%%%"
fileName = File.basename(filePath)
projName = File.basename(File.dirname(filePath))