Skip to content

Instantly share code, notes, and snippets.

View iwehrman's full-sized avatar

Ian Wehrman iwehrman

View GitHub Profile
/**
* Constructor for an absolutely positioned line segment.
*/
var LineSegment = Immutable.Record({
left: 0,
right: 0
});
/**
* Derives the length of the line segment from its coordinates.
Adult Jazz - Gist Is
Sun Kil Moon - Benji
Dirty Beaches - Stateless
Giant Claw - Dark Web
Thug Entrancer - Death After Life
function FindProxyForURL(url, host)
{
return "SOCKS 10.0.1.5:2021";
}
(function () {
var descriptor = require("adapter/ps/descriptor");
logModule = require("js/util/log");
window.__PG_DEBUG__ = true;
logModule.enableAll();
descriptor.on("all", function (eventID, obj) {
var str = "('" + eventID + "', " + JSON.stringify(obj, null, " ") + ");";
logModule.debug(str);

git/bower behind firewalls

To make bower work in places where git:// URLs don't work (e.g. inside a corporate firewall), run this git command:

git config --global url."https://".insteadOf git://

To undo that after you've quit your job at a large corporate institution, run:

javascript:xhr=new XMLHttpRequest;xhr.open("POST","http://10.0.1.200/MainZone/index.put.asp",true);xhr.send("cmd0=PutZone_OnOff%2FON&cmd1=PutZone_InputFunction%2FDVD&cmd2=PutMasterVolumeSet%2F-45.0")
@iwehrman
iwehrman / traverse.js
Last active August 29, 2015 14:02
Asynchronously recursively traverse directories with callbacks
/*jslint node:true*/
(function () {
"use strict";
var fs = require("fs"),
path = require("path");
var traverse = function (visit, fullPath, callback) {
fs.stat(fullPath, function (err, stats) {

Keybase proof

I hereby claim:

  • I am iwehrman on github.
  • I am iwehrman (https://keybase.io/iwehrman) on keybase.
  • I have a public key whose fingerprint is AB76 2652 8CE3 27C0 2840 9B21 CB22 3BF6 AA45 4B45

To claim this, I am signing this object:

javascript:for(i=0;i<10;i++){setTimeout(function(){xhr=new XMLHttpRequest;xhr.open("POST","http://10.0.1.200/MainZone/index.put.asp",true);xhr.send("cmd0=PutMasterVolumeBtn%2F<")},i*25)}
javascript:for(i=0;i<10;i++){setTimeout(function(){xhr=new XMLHttpRequest;xhr.open("POST","http://10.0.1.200/MainZone/index.put.asp",true);xhr.send("cmd0=PutMasterVolumeBtn%2F>")},i*25)}