Skip to content

Instantly share code, notes, and snippets.

View bonsaiben's full-sized avatar

Ben Sullivan bonsaiben

View GitHub Profile

Keybase proof

I hereby claim:

  • I am bonsaiben on github.
  • I am bnjs (https://keybase.io/bnjs) on keybase.
  • I have a public key whose fingerprint is 8C8B 4D56 374B 2561 8E66 5539 165B 6FBD B65F 5095

To claim this, I am signing this object:

@bonsaiben
bonsaiben / gist:01fe0c9ef422c75a29a9
Last active August 29, 2015 14:15
Browser bookmark for Google Image search from a Wikipedia article
javascript:var title=$('head title').html().split(' - ')[0].split(' ').join('+');var url = "https://www.google.com/search?q="+title+"&tbm=isch";window.location = url;
@bonsaiben
bonsaiben / keybase.md
Created August 15, 2014 04:11
keybase.md

Keybase proof

I hereby claim:

  • I am bonsaiben on github.
  • I am bnjs (https://keybase.io/bnjs) on keybase.
  • I have a public key whose fingerprint is 8C8B 4D56 374B 2561 8E66 5539 165B 6FBD B65F 5095

To claim this, I am signing this object:

@bonsaiben
bonsaiben / gist:3847844
Created October 7, 2012 10:49
Vim seamless splitting and movement
" if there is no split in the direction of movement, split and then move to it
function! MoveOrSplit(direction)
" the width of an unsplit window on your display
let maxwidth = 181
" the height of an unsplit window on your display
let maxheight = 49
let has_no_vsplit = winnr('$') < 2 || winwidth(0) == maxwidth
let has_no_split = winnr('$') < 2 || winheight(0) == maxheight
if a:direction == 'j' || a:direction == 'k'
if has_no_split
@bonsaiben
bonsaiben / bundle readme
Created April 28, 2012 05:19
a bash function to output a gem's README from the command line using bundler
function readme { cat `bundle show $1`/README.md; }