Skip to content

Instantly share code, notes, and snippets.

View kingbin's full-sized avatar
🎯
Focusing

Chris Blazek kingbin

🎯
Focusing
View GitHub Profile

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@kingbin
kingbin / gist:7440442
Created November 12, 2013 23:04
Attach to tmux session named the same as current directory. thanks thoughtbot!
#!/bin/sh
#
# Attach to tmux session named the same as current directory.
#
tmux attach -t `basename $PWD`
@kingbin
kingbin / jsbin.eqokiw.js
Last active December 20, 2015 21:09
Dynamic parameters by converting all the parameters passed to fxn into an array using Array.prototype.slice.call(arguments, 0) and then applying the array to the function.
var numberEval = function(value){ return (typeof value === 'number') ? value : parseInt(value,10); };
var p = [
{"paramName":"reinYear","val":numberEval},
{"paramName":"stateCode","val":numberEval},
{"paramName":"countyCode","val":numberEval},
{"paramName":"commodityCode","val":numberEval},
{"paramName":"insurancePlanCode","val":numberEval},
{"paramName":"practiceCode","val":numberEval},
{"paramName":"typeCode","val":numberEval}

Sublime Text 2 - Useful Shortcuts

Tested in Mac OS X: super == command

Open/Goto


  • super+t: go to file
  • super+ctrl+p: go to project
  • super+r: go to methods
vendor/
.bundle/
node_modules/
Gemfile.lock
@kingbin
kingbin / vcvarsall.bat
Created April 17, 2013 19:16
vcvarsall.bat
@echo off
if "%1" == "" goto x86
if not "%2" == "" goto usage
@set IE_BIN=%ProgramFiles%\Internet Explorer\iexplore.exe
@set PHANTOMJS_BIN=%APPDATA%\npm\node_modules\phantomjs\lib\phantom\phantomjs.exe
@doskey subl="C:\Program Files\Sublime Text 2\sublime_text.exe" $*
if /i %1 == x86 goto x86
got gist.vim auth probs?
try git://github.com/mattn/webapi-vim.git
It's soo good for you!
@kingbin
kingbin / gist:4542827
Created January 15, 2013 22:36
Execute exe as a different user
C:\Windows\System32\runas.exe /user:domain\user "C:\Program Files\Internet Explorer\iexplore.exe"
@kingbin
kingbin / gist:4091294
Created November 16, 2012 22:01
Backbone - Forcing IE to not cache collections
var myUnicorns = Backbone.Collection.extend({
...
fetch: function (options) {
options.cache = false;
return Backbone.Collection.prototype.fetch.call(this, options);
}
...
})
#define TESTA
#define TESTB
#define TESTC
#define TESTD
#define TESTE
#define TESTF
#define TESTG
#define TESTH
#define TESTI
#define TESTJ