Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am btleffler on github.
  • I am btleffler (https://keybase.io/btleffler) on keybase.
  • I have a public key whose fingerprint is F677 34E0 3EC2 1AAD 08F2 E37D D11E 1C72 1140 F62D

To claim this, I am signing this object:

@btleffler
btleffler / github.css
Last active October 21, 2015 13:16
Github Code Style Overrides
.tab-size-3, .tab-size-4, .tab-size-5, .tab-size-6, .tab-size-7, .tab-size-8,
.tab-size-9, .tab-size-10, .tab-size-11, .tab-size-12 {
tab-size: 2 !important;
}
.line-numbers, .file-content.code .line-numbers a, .file-data, .data,
.diff-line-code, .blob-line-num, .blob-line-code, .blob-num, .blob-code,
pre, code {
font-family: "Hack", "Menlo", "Liberation Mono", "Consolas", "DejaVu Sans Mono", "Ubuntu Mono", "Courier New", "andale mono", "lucida console", monospace !important;
font-size: 12pt !important;
@btleffler
btleffler / output.text
Created July 22, 2014 15:20
ParallelCurl test.php Output
$ php test.php
********
"Anna is a":
********
<b>Anna</b> (2013) - IMDb
<b>American Nephrology Nurses Association</b>
<b>Anna</b> - DisneyWiki
<b>Anna&#39;s</b> Linens - Save on Bedding, Bath, Window and More!
<b>Anna</b>, Texas - Wikipedia, the free encyclopedia
<b>Anna</b> - Wikipedia, the free encyclopedia
@btleffler
btleffler / rapidMine.js
Last active August 29, 2015 13:57
Mine them unicoins
// Hold mouse down to rapidfire mine unicoins
$("#uc-rockcanvas")
.on("mousedown", function (oEvt) {
if (window.Hax0rInterval)
return;
var self = $(this);
window.Hax0rInterval = setInterval(function () {
var e = new $.Event("mousedown");
e.pageX = oEvt.pageX;
@btleffler
btleffler / f-links-be-gone.js
Last active December 14, 2015 22:59
Feedly Mobile Links be Gone
@btleffler
btleffler / load.js
Created October 19, 2012 15:40
Make sure images are loaded with the "load" event
var img = jQuery("<img>")
.attr("src", "img.png")
.bind("load", function () {
var interval = setInterval(function () {
if (img[0].complete) {
doTheRestOfYourStuffThatUsesThisImgButDontForgetToClearThisInterval();
}
}, 100);
});
@btleffler
btleffler / output
Created August 2, 2012 20:08
PHP: The Programming Language of Choice ™
PHP Parse error: syntax error, unexpected ')', expecting T_PAAMAYIM_NEKUDOTAYIM in ...
@btleffler
btleffler / c9-inconsolata.js
Created June 28, 2012 20:20
Cloud 9 Inconsolata Font
/*
* Because I love inconsolata
* Author: Benjamin Leffler
* Date: 06/28/12
*/
// ==UserScript==
// @match http://c9.io/*
// @match https://c9.io/*
// ==/UserScript==
@btleffler
btleffler / basecamp-link-fix.js
Created March 16, 2012 13:20
Basecamp Links Open in New Window/Tap
function (terrible, parameters) {
// Blah blah useless comment
COAD
}
function ( the, spaces, make, the, difference ) {
// Informative post, you can tell by the extra linebreak ^
elegant.coad[ "means-add-a-ton-of-whitespace" ];