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
<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!!!]
@thomasdunn
thomasdunn / README.md
Last active August 29, 2015 14:16 — forked from mbostock/.block
Throbber
'use strict';
/*jshint esnext: true */
class ToolsService {
constructor($rootScope) {
this.rootScope = $rootScope;
this.brushRadius = 1;
this.brushRadiusSetMessage = 'brushRadiusSetMessage';
}
@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,
@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 / 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 / mp4tomp3.bat
Created February 4, 2016 05:33 — forked from nkmrgk/mp4tomp3.bat
convert mp4 to mp3
@echo off
setlocal
set FFMPEG="C:\tools\ffmpeg\bin\ffmpeg.exe"
set LAME=lame.exe
set touch=touch.exe
if "%1"=="" echo usage: mp4tomp3 {directory} && goto err
if not exist %1 echo %1: Not found. && goto err
pushd %1
@thomasdunn
thomasdunn / Simplify 3D Post processing script.cmd
Created January 24, 2017 15:31
Simplify3D to Octoprint GCODE upload
REM this goes under: Edit Process > Scripts > Post Processing > Additional commands:
cmd /c C:\design\octoprint\gcode.bat "[output_filepath]"
@thomasdunn
thomasdunn / RLE-Grammar.md
Last active March 7, 2019 05:13
Run Length Encoded (RLE) File Format Augmented BNF Style Grammar
@thomasdunn
thomasdunn / GravityBall.js
Created April 1, 2019 02:45
For use in JUDO5
function main() {
var shipX = 50;
var shipY = 100;
var shipMass = 100;
var shipSize = 20;
var shipDirection = Pi * 1.5;
var shipSpeed = 1.8;
var earthX = 210;
var earthY = 140;