Skip to content

Instantly share code, notes, and snippets.

balanceiskey / 0_reuse_code.js
Created Nov 18, 2015
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
balanceiskey / keybindings.js
Last active Aug 29, 2015
Sublime Keybindings
View keybindings.js
{ "keys": ["ctrl+s"], "command": "toggle_side_bar" },
{ "keys": ["super+shift+w"], "command": "close_all" },
{ "keys": ["super+alt+w"], "command": "close_others" },
// Pane jumping for adults (via origami)
{ "keys": ["L"], "command": "travel_to_pane", "args": {"direction": "right"}, "context": [{"key": "setting.command_mode", "operand": true}]},
{ "keys": ["H"], "command": "travel_to_pane", "args": {"direction": "left"}, "context": [{"key": "setting.command_mode", "operand": true}]},
{ "keys": ["J"], "command": "travel_to_pane", "args": {"direction": "down"}, "context": [{"key": "setting.command_mode", "operand": true}]},
{ "keys": ["K"], "command": "travel_to_pane", "args": {"direction": "up"}, "context": [{"key": "setting.command_mode", "operand": true}]},
balanceiskey / twitterbookmarklet
Created Feb 19, 2014
Bookmarklet for revealing twitter id while on twitter page
View twitterbookmarklet
javascript:(function()%7Bvar profileCardInner%3Ddocument.getElementsByClassName(%27profile-card-inner%27),jsTopbar,userId,div%3Bif(profileCardInner%26%26profileCardInner.length)%7BprofileCardInner%3DprofileCardInner%5B0%5D%3BuserId%3DprofileCardInner.dataset.userId%3Bdiv%3Ddocument.createElement(%27div%27)"0.8""33px""100%25""fixed""0""0""999""20px""white""13px""center"%3BjsTopbar%3Ddocument.getElementsByClassName(%27js-topbar%27)%3Bif(jsTopbar.length)%7BjsTopbar%3DjsTopbar%5B0%5D%3BjsTopbar.insertBefore(div,jsTopbar.firstChild)%3B%7D%7D%7D)()%3B
View subtle.js
define ( ['somewhere/someFunc'], function (someFunction) {
return someFunction(anotherFunction);
function anotherFunction() {
// stuff
View ns-cheatsheet.clj
;; * :require makes functions available with a namespace prefix.
;; * :use makes functions available without a namespace prefix
;; (i.e., refers functions to the current namespace).
;; * :import refers Java classes to the current namespace.
balanceiskey / schemeflip.vim
Last active Dec 20, 2015
A simple vim function to flip between your preferred dark and light color schemes.
View schemeflip.vim
noremap <silent> <leader>l :call FlipScheme()<cr>
function! FlipScheme()
if g:colors_name == 'hemisu'
set background=dark
color jellybeans
set background=light
color hemisu
balanceiskey / ffextension.js
Created Jan 30, 2013
An example of how to get Backbone Models and Collections working in a firefox extension.
View ffextension.js
var Request = require('request').Request,
_ = require('./underscore'),
Backbone = require('./backbone'),
// Firefox Add-Ons cannot use jQuery in the background
// script, but there are instances where we need some
// jquery functionality, paricularly $.ajax, which
// is defined later.
$ = {
ajax: function (params) {
if (!params.url){