Skip to content

Instantly share code, notes, and snippets.

View willgm's full-sized avatar

William Grasel willgm

View GitHub Profile
@willgm
willgm / .zshrc
Created October 28, 2015 13:05
svn git integration
function runCmd {
echo "\e[42m\e[30m>> $1 \e[49m\e[39m" ; bash -c $1
}
function svnup {
runCmd 'git pull' &&
runCmd 'svn up --accept tc' ;
runCmd 'svn revert -R .' ;
runCmd 'git status' ;
runCmd 'svn status'
@willgm
willgm / index.html
Created July 10, 2014 00:49
A Pen by William Grasel.
<section ng-app="selectableApp"
ng-controller="exampleController">
<label>
<input type="checkbox" ng-model="selection" /> Toggle Selection
</label>
<p>
You've selected:
<span ng-hide="selected">none</span>
@willgm
willgm / findKeyByValue.coffee
Created August 29, 2013 02:10
Find key by value, with underscore.js in CoffeeScript
findKeyByValue = (obj, value) ->
key = null
_.find obj, (v, k) ->
if v is value
key = k
true
key