Skip to content

Instantly share code, notes, and snippets.

View thomasdunn's full-sized avatar
🏠
Working from home

Tom Dunn thomasdunn

🏠
Working from home
  • Art of Context
  • Boston, MA, USA
View GitHub Profile
@thomasdunn
thomasdunn / leak-detector.ino
Created December 12, 2015 07:42
Particle Photon leak detector
String _version = "0.01";
#define FLOOD_NOTIF "FLOOD"
int LED = D7;
void setup() {
pinMode(LED, OUTPUT);
Spark.publish("device starting", "Firmware version: " + _version, 60, PRIVATE);
@thomasdunn
thomasdunn / index.html
Last active April 26, 2019 04:44
xhr pinger
<!DOCTYPE html>
<html>
<head>
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="viewport" content="initial-scale=1">
<style type="text/css">
body {
background: black;
@thomasdunn
thomasdunn / index.html
Last active August 29, 2015 14:18 — forked from couchand/index.html
Voronoi-based item selection
<html>
<head>
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.js"></script>
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.geom.js"></script>
</head>
<body>
<div id="chart">
</div>
<script type="text/javascript">
var w = 960,
'use strict';
/*jshint esnext: true */
class ToolsService {
constructor($rootScope) {
this.rootScope = $rootScope;
this.brushRadius = 1;
this.brushRadiusSetMessage = 'brushRadiusSetMessage';
}
@thomasdunn
thomasdunn / README.md
Last active August 29, 2015 14:16 — forked from mbostock/.block
Throbber
<html>
<head>
<script src="http://code.jquery.com/jquery-1.10.1.min.js"></script>
<script language="javascript" src="http://d3js.org/d3.v3.min.js?3.0.0rc1"></script>
<body>
<h1>D3 Demo 1</h1>
<!-- layout with twitter bootstrap or other layout project? -->
Random colored balls from 20-color series, drawn at random position,
drop off of the screen and fade. [STILL IN THE WORKS!!!]