Skip to content

Instantly share code, notes, and snippets.

Joel Brandt joelrbrandt

Block or report user

Report or block joelrbrandt

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View trap-ctrl-enter.js
// ==UserScript==
// @name Trap ctrl+enter on git.corp
// @description Stop git.corp from handling ctrl+enter keyboard shortcut (e.g., for submitting issue comment)
// @run-at document-start
// @version 0.1
// @author Joel Brandt <>
// @match*
// @grant none
// @downloadURL
// @updateURL
joelrbrandt / get.js
Last active Aug 29, 2015
getting the contents of a url as a string using node
View get.js
var getURL = function (url, cb) {
var http = require("http");
var result = "",
finished = false;
var finishedHandler = function (err, val) {
if (!finished) {
finished = true;
cb(err, val);
joelrbrandt / drag.html
Created Jul 24, 2014
in-window drag test
View drag.html
<!doctype html>
<html lang="en">
<meta charset="utf-8">
<title>jQuery UI Draggable - Default functionality</title>
<script src=""></script>
<script src=""></script>
#draggable { width: 150px; height: 150px; padding: 0.5em; border: thin solid black; background-color: white;}

Keybase proof

I hereby claim:

  • I am joelrbrandt on github.
  • I am joelrbrandt ( on keybase.
  • I have a public key whose fingerprint is 4180 C780 88D4 FA7E 2C7F A110 2A65 A817 C946 ACE5

To claim this, I am signing this object:

joelrbrandt / main.js
Created Feb 3, 2014
Launch new generator-core from old generator-core
View main.js
(function () {
"use strict";
function startDumping(theGenerator) {
setInterval(function () {
console.log("[UPDATED-LAUNCHER] requesting doc info");
function (info) {
console.log("[UPDATED-LAUNCHER] got doc info: %s", JSON.stringify(info, null, " "));
}, function (err) {
joelrbrandt / examplePluginMain.js
Created Jan 22, 2014
getPixmap Bounds Shim Addresses bug #134 in Adobe Generator core, which is present in core versions prior to 2.0.2: This shim _should_ replace getPixmap with a backwards compatible version. Additionally, if the core is at least as new as 2.0.2 or the shim has already been loaded, it wi…
View examplePluginMain.js
(function () {
"use strict";
var _generator = null,
_config = null;
function init(generator, config) {
_generator = generator;
_config = config;
joelrbrandt /
Created Sep 11, 2013
Send an email through gmail's smtp using python
import smtplib
hostname = ''
port = 587
username = ''
from_address = ''
from_name = 'Someone Doe'
password = '1234'
def send_email(to_address, to_name, subject, message):
Handlebars.registerHelper 'each_with_index', (array, fn) ->
buffer = ''
for i in array
item = i
item.index = _i
buffer += fn(item)
View gist:6189321
"version": "0.2.0",
"timeStamp": 1375921607.634,
"id": 1116,
"file": "Sans titre-1",
"bounds": {
"top": 0,
"left": 0,
"bottom": 340,
"right": 454
joelrbrandt / stream-first-buffer-length-bench.js
Created Jul 14, 2013
Benchmark test for reading from Node.js stream2, with addition of a firstBufferLength property
View stream-first-buffer-length-bench.js
(function () {
"use strict";
var stream = require("stream");
var i, b,
startTime, endTime, totalTime,
readCount, bytesRead, bytesReadThisTest,
You can’t perform that action at this time.