Skip to content

Instantly share code, notes, and snippets.

Using GitHub for image storage...

@balanceiskey
balanceiskey / esnextbin.md
Last active February 18, 2016 16:41
esnextbin sketch
@balanceiskey
balanceiskey / esnextbin.md
Created February 12, 2016 14:45
esnextbin sketch
define ( ['somewhere/someFunc'], function (someFunction) {
return someFunction(anotherFunction);
function anotherFunction() {
// stuff
};
});
;;
;; NS CHEATSHEET
;;
;; * :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
balanceiskey / schemeflip.vim
Last active December 20, 2015 04:28
A simple vim function to flip between your preferred dark and light color schemes.
noremap <silent> <leader>l :call FlipScheme()<cr>
function! FlipScheme()
if g:colors_name == 'hemisu'
set background=dark
color jellybeans
else
set background=light
color hemisu
endif
endfunction
@balanceiskey
balanceiskey / ffextension.js
Created January 30, 2013 02:57
An example of how to get Backbone Models and Collections working in a firefox extension.
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){
@balanceiskey
balanceiskey / 0_reuse_code.js
Created November 18, 2015 17:33
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
#-------------------------------------------------------------------------------
# Sunrise theme for oh-my-zsh by Adam Lindberg (eproxus@gmail.com)
# Intended to be used with Solarized: http://ethanschoonover.com/solarized
# (Needs Git plugin for current_branch method)
#-------------------------------------------------------------------------------
# Modified by Sundeep Malladi to include Mercurial (and some other shtuff).
# Color shortcuts
R=$fg[red]
@balanceiskey
balanceiskey / hack.sh
Created April 2, 2012 14:15 — forked from erikh/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#