Skip to content

Instantly share code, notes, and snippets.

View johnbender's full-sized avatar

John Bender johnbender

View GitHub Profile
@johnbender
johnbender / prefs.js
Created February 23, 2013 06:20
Set up Chrome Secure Shell to handle solarized terminal colors
// Disable bold.
term_.prefs_.set('enable-bold', false)
// Use this for Solarized Dark
term_.prefs_.set('background-color', "#002b36");
term_.prefs_.set('foreground-color', "#839496");
term_.prefs_.set('color-palette-overrides', [
'#073642',
'#dc322f',
@johnbender
johnbender / foo.sh
Last active December 13, 2015 23:09
Replace a sed match with file contents.
replace=foo
replace_with=bar.txt
replace_in=baz.txt
sed -i.bkp "/$replace/{
s/$replace//g
r $replace_with
}" $replace_in
800m Run/Row
3 Rounds:
12 KB Swings
10 No Push-up Burpee
800m Run/Row
3 Rounds:
5 Pull-ups
@johnbender
johnbender / resolution.md
Last active December 10, 2015 10:38
New Year's resolutions

New Year's Resolutions

A list of nest years resolutions and an accounting of this years success/failures

2014

  1. Publish
  2. Pass 281a
  3. Be more patient
@johnbender
johnbender / cutycapt-showoff.sh
Created September 27, 2012 17:26
Cuty Capt and Showoff
# Requires that you download and build cutycapt http://cutycapt.sourceforge.net/
# Once that's done all you have to do is reference each of your slides in some fashion or
# another. With Showoff it actually crops right to the slide dimensions (added bonus)
# NOTE replace slide count used to sequence the images, in this case 100
for i in $(seq 1 100); do
$(./path/to/Cuty/Capt/Binary --url=http://example.com/#$i --out=$i.png)
done
09:11 < xplat> > map (\x -> if x > 0 then 'o' else 'n') [0..]
09:11 < lambdabot> "nooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo...
09:11 -!- cscorley [~cscorley@0x1f0.net] has joined #haskell-blah
09:11 < tac-tics> > 'n' : fix ('o':)
09:11 < lambdabot> "nooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo...
09:12 < xplat> > 'n':['o','o'..]
09:12 < lambdabot> "nooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo...
09:12 < tac-tics> > 'n' : ['o' ..]
09:12 < lambdabot> "nopqrstuvwxyz{|}~\DEL\128\129\130\131\132\133\134\135\136\137\138\139\140\...
09:12 < tac-tics> :P
@johnbender
johnbender / xmonad.hs
Created October 15, 2011 06:49
my super simple xmonad config, works with unity2d (eg 11.10)
import XMonad
import XMonad.Config.Gnome
import XMonad.Layout.NoBorders
import XMonad.Layout.Gaps
import XMonad.Util.EZConfig
import XMonad.Hooks.ManageDocks
import XMonad.Hooks.ManageHelpers
import qualified XMonad.StackSet as W
main = xmonad $ gnomeConfig { terminal = "gnome-terminal"
@johnbender
johnbender / deleteNotifications.js
Created July 8, 2011 03:42
delete notification in github bookmarklet
javascript:void((function(){ $(".del a").click(); })())
@johnbender
johnbender / window.el
Created June 25, 2011 21:16
hook for switch to or creating windows in emacs
;; advise the other-window function as a hook into switching windows
;; with C-x o
(defadvice other-window (after my-test-advice activate)
(my-super-awesome-function))
;; when creating or adding a window fire the hook
(add-hook 'window-configuration-change-hook 'my-super-awesome-function)
// THE BAD
public class Lamp
{
private int bulbAge;
private String bulbType;
private int shadeAge;
public Lamp(int bulbAge, String bulbType, int shadeAge)
{
this.bulbAge = bulbAge;