Skip to content

Instantly share code, notes, and snippets.

View eblahm's full-sized avatar

Matthew Halbe eblahm

View GitHub Profile
@eblahm
eblahm / cheater-pick.sh
Created March 21, 2017 00:59
cheater-pick, when you want the code... but not the commit
cheater-pick() {
git cherry-pick $1 && git reset HEAD^ --soft
}
@eblahm
eblahm / fishyTitle.js
Created October 20, 2015 12:55
Make a 🐟 Swim Across Your Browser Tab
var renderIntervalInMillis = 50;
var characterWidth = 80;
var i = 0;
var whitespace = (new Array(characterWidth)).join('\u205f');
setInterval(function() {
var position = whitespace.length - (i++ % whitespace.length);
document.title = whitespace.substring(0, position) + '🐟' + whitespace.substring(position + 1);
}, renderIntervalInMillis);
@eblahm
eblahm / gist:cf727aca7a5503acea75
Created December 2, 2014 20:22
callbackStyle.js
var userTable = {
'123': {
id: '123',
name: 'Elon',
usage: 5000
}
};
var getUser = function(userId, callback) {
callback(null, {
@eblahm
eblahm / index.js
Created December 2, 2014 19:58
requirebin sketch
'use strict';
var bluebird = require('bluebird');
var userTable = {
"123": {
id: "123",
name: 'Elon',
usage: 5000
}
};
@eblahm
eblahm / index.js
Created December 2, 2014 19:01
requirebin sketch
var bluebird = require('bluebird');
function expensiveAndCoplicated(user) {
bluebird.resolve('awesome');
}
@eblahm
eblahm / index.js
Last active August 29, 2015 14:10
requirebin sketch
var bluebird = require('bluebird');
var usageTable = {123: 5000};
var getUser = function(userId) {
return bluebird.resolve({
id: userId,
name: "Elon",
usage: usageTable[userId]
});
}
@eblahm
eblahm / vim.xml
Created April 16, 2014 15:17
~/Library/Preferences/WebStorm8/keymaps/Vim.xml
<?xml version="1.0" encoding="UTF-8"?>
<keymap version="1" name="Vim" parent="Mac OS X 10.5+">
<action id="ClassNameCompletion">
<keyboard-shortcut first-keystroke="shift control alt SPACE" />
</action>
<action id="CodeCompletion">
<keyboard-shortcut first-keystroke="control meta SPACE" />
</action>
<action id="Debug">
<keyboard-shortcut first-keystroke="control meta D" />