Skip to content

Instantly share code, notes, and snippets.

View jkeefe's full-sized avatar

John Keefe jkeefe

View GitHub Profile
@jkeefe
jkeefe / index.html
Created December 10, 2015 15:52
Mapbox GL Earthquake Test2
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8' />
<title>Earthquakes Map: Last month</title>
<meta name='viewport' content='initial-scale=1,maximum-scale=1,user-scalable=no' />
<script src='https://api.tiles.mapbox.com/mapbox-gl-js/v0.12.1/mapbox-gl.js'></script>
<link href='https://api.tiles.mapbox.com/mapbox-gl-js/v0.12.1/mapbox-gl.css' rel='stylesheet' />
<style>
body { margin:0; padding:0; }
@jkeefe
jkeefe / index.html
Last active December 10, 2015 15:49
Mapbox Earthquake Vector Tiles Test
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8' />
<title>Earthquakes Map: Last month</title>
<meta name='viewport' content='initial-scale=1,maximum-scale=1,user-scalable=no' />
<script src='https://api.tiles.mapbox.com/mapbox-gl-js/v0.12.1/mapbox-gl.js'></script>
<link href='https://api.tiles.mapbox.com/mapbox-gl-js/v0.12.1/mapbox-gl.css' rel='stylesheet' />
<style>
body { margin:0; padding:0; }
<iframe frameborder="0" scrolling ="no" src="http://project.wnyc.org/toxic-nj/" width="100%" height="900" ></iframe>
<iframe frameborder="0" scrolling ="no" src="http://project.wnyc.org/subway-exits/" width="100%" height="900" ></iframe>
<iframe frameborder="0" scrolling ="no" src="http://project.wnyc.org/bike-lane-blockers/" width="100%" height="900" ></iframe>
@jkeefe
jkeefe / touch_sensing.ino
Created September 5, 2015 18:39
Simple code for detecting touch (with capactive sensing) using Arduino
#include <CapacitiveSensor.h>
/*
* CapitiveSense Library Demo Sketch
* Paul Badger 2008
* Uses a high value resistor e.g. 10M between send pin and receive pin
* Resistor effects sensitivity, experiment with values, 50K - 50M. Larger resistor values yield larger sensor values.
* Receive pin is the sensor pin - try different amounts of foil/metal on this pin
*/
@jkeefe
jkeefe / sparkfun_key_example.js
Created August 11, 2015 04:07
Example of a key-holding file I keep outside my github repositories
var PRIVATE_KEY = 'aBcDEFgHiJKlmnoPqRsTuV';
module.exports.PRIVATE_KEY = PRIVATE_KEY;
@jkeefe
jkeefe / blink.js
Created August 8, 2015 03:39
This uses Johnny-Five for "hello world" blink function on an Arduino.
@jkeefe
jkeefe / button-hold.js
Created August 8, 2015 03:25
This uses Johnny-Five to monitor a button and drive an LED using an Arduino
var five = require("johnny-five");
var board = new five.Board();
board.on("ready", function(){
// establish button
var button = new five.Button(2);
// establish led
var led = new five.Led(11);
@jkeefe
jkeefe / raspberry-pi-ble-sniffer.md
Last active November 14, 2025 11:32
Notes on using Adafruit's "Bluefruit" BLE sniffer with a Raspberry Pi

BLUETOOTH SNIFFER

Working to sniff Bluetooth Low Energy with the adafruit sniffer

For more information, see this blog post

Going the python route, as described here

before installing pySerial, did ...