Skip to content

Instantly share code, notes, and snippets.

@dougnukem
dougnukem / README.md
Created September 19, 2013 15:59 — forked from mbostock/.block

From Wikipedia:

Epicyclic gearing or planetary gearing is a gear system consisting of one or more outer gears, or planet gears, revolving about a central, or sun gear. … Epicyclic gearing systems also incorporate the use of an outer ring gear or annulus, which meshes with the planet gears.

Use the menu in the top-left to change the frame of reference, fixing the specified gear in-place.

Example TogetherJS App

Just testing it out.

@dougnukem
dougnukem / 0_reuse_code.js
Created October 8, 2013 18:40
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
[@ddaniels-mbp:~/Desktop]$ /usr/local/bin/swfdump testExportSound.swf -D | more
[HEADER] File version: 15
[HEADER] File is zlib compressed. Ratio: 96%
[HEADER] File size: 67242
[HEADER] Frame rate: 24.000000
[HEADER] Frame count: 1
[HEADER] Movie width: 550.00
[HEADER] Movie height: 400.00
[045] 4 FILEATTRIBUTES as3 symbolclass
[04d] 1296 METADATA
@dougnukem
dougnukem / gist:8608131
Created January 24, 2014 22:31
cleanup actionscript line endings from Flash Professional CS6
#!/bin/bash
CARRIAGE_RETURN=$'\r'
LINE_FEED=$'\n'
find . -name "*.as" | xargs grep -l $CARRIAGE_RETURN | xargs -n 1 sed -i "" 's/'$CARRIAGE_RETURN'/\'$'\n/g'

Keybase proof

I hereby claim:

  • I am dougnukem on github.
  • I am dougnukem (https://keybase.io/dougnukem) on keybase.
  • I have a public key whose fingerprint is 5612 B839 FC65 24B5 A87B 99F5 0ED4 F39E A73F 5091

To claim this, I am signing this object:

@dougnukem
dougnukem / facebook_msg_webhook_inconsistency.md
Created May 18, 2016 03:36
Facebook Messenger Webhook Payload inconsistency

Facebook Messenger Webhook Payload inconsistency

  • Facebook Messenger Webhook Docs: describes the Entry[] payload as having an ID field that is a Number, but it appears that occasionally it'll be sent as a quoted string?
    • I'd expect ID to be consistent one way or the other.
 {
     "object": "page",
     "entry": [{
         "id": "126782477734654",
@dougnukem
dougnukem / config.js
Last active August 24, 2017 01:56
Ghost config.js for Heroku
// # Ghost Configuration
// Setup your Ghost install for various environments
var path = require('path'),
url = require('url'),
config;
config = {
// ### Development **(default)**
development: {
@dougnukem
dougnukem / BlockingQueue.java
Created September 25, 2011 23:32
Example Threadsafe BlockingQueue implementation in Java
public class BlockingQueue implements Queue {
private java.util.Queue queue = new java.util.LinkedList();
/**
* Make a blocking Dequeue call so that we'll only return when the queue has
* something on it, otherwise we'll wait until something is put on it.
*
* @returns This will return null if the thread wait() call is interrupted.
*/