Skip to content

Instantly share code, notes, and snippets.

View adunkman's full-sized avatar

Andrew Dunkman (he/him) adunkman

View GitHub Profile
@adunkman
adunkman / kill-core-audio-osx.sh
Created February 1, 2013 19:37
Select an Airplay device for sound output from OS X and have it immediately reset to the default device? Kill coreaudiod.
sudo kill `ps -ax | grep 'coreaudiod' | grep 'sbin' |awk '{print $1}'`
@adunkman
adunkman / topics
Created March 20, 2013 00:15 — forked from dynajoe/topics
# Next Meetup: Tuesday, january 15
# Topics:
- connect/express middleware - 3
- non-http networks - 8 - DUN DUN DUN
- Torrent
- UDP
- Multicast (Frank)
- XMPP (XTENSIBLE MESSAGING AND PRESENCE PROTOCOL)
- Serial
@adunkman
adunkman / nodekc.md
Last active December 16, 2015 07:49

Next Meetup: Tuesday, June 18

Topics:

  • Cross-meetup meeting (game group?) - 6
  • Debugging issues with node.js (including benchmarking) - 6
  • gotcha's in node.js - 7
  • native bindings - 1
  • Socket frameworks (socket stream / meteor / derby) - 5
  • node.js require("domain") and so can you - 4
  • Typescript - 0
@adunkman
adunkman / gist:5631298
Last active December 17, 2015 15:19
Execute git status on each directory that is a git repository in the current directory.
ls -dx1 */.git/ | sed 's/\(.*\)\/\.git\//echo \1: \&\& cd \1 \&\& git status --porcelain \&\& cd ..; /' | bash

Taken from element.getBoundingClientRect MDN documentation:

For cross-browser compatibility, use window.pageXOffset and window.pageYOffset instead of window.scrollX and window.scrollY, except use (((t = document.documentElement) || (t = document.body.parentNode)) && typeof t.ScrollLeft == 'number' ? t : document.body).ScrollLeft and (((t = document.documentElement) || (t = document.body.parentNode)) && typeof t.ScrollTop == 'number' ? t : document.body).ScrollTop when window.pageXOffset and window.pageYOffset (and window.pageXOffset and window.pageYOffset) are undefined.

Oye.

Ward 1

  • Adams Morgan
    • Named after two schools, Adams (a segregated black school) and Morgan (a segregated white school)
    • Main commercial district is along 18th St NW
    • Adams Morgan Day Festival is held annually on the Second Sunday of September
    • Farmer's market on Saturdays
  • Columbia Heights
  • Howard University
  • Kalorama
@adunkman
adunkman / bundle.js
Created September 18, 2014 14:58
Sample of using connect-assets (mincer/sprockets-style concatenation) without globals.
//= require closure_start
//= require jQuery
//= require the_rest_of_your_dependencies
//= require_self
//= require closure_end
var something = function () {
return "this also gets included in the closure, since require_self is defined".
};

Keybase proof

I hereby claim:

  • I am adunkman on github.
  • I am adunkman (https://keybase.io/adunkman) on keybase.
  • I have a public key whose fingerprint is 6DD1 FC34 52A3 B4D7 39F6 C092 1AF3 8D02 5A7B 51A9

To claim this, I am signing this object:

@adunkman
adunkman / hacked-together.js
Created April 9, 2015 19:11
A quick program thrown together to run some stats on an export of Bugsnag errors.
var _ = require("./vendor/assets/javascripts/vendor/underscore.js");
var parts = [
require("/Users/adunkman/Downloads/arc-response-2015 Apr 9 11-21-29.json"),
require("/Users/adunkman/Downloads/arc-response-2015 Apr 9 11-23-02.json")
];
var complete = parts.reduce(function (a, b) { return a.concat(b); });
var reportBy = function (name, grouper) {
@adunkman
adunkman / README.md
Created May 5, 2015 14:56
Platform bookmarklet