Skip to content

Instantly share code, notes, and snippets.

@mgibowski
mgibowski / angularjs-console-helpers
Created July 8, 2014 13:25
snippets for inspecting angularjs from browser console
// getting scopes of elements:
angular.element(targetNode).scope()
angular.element(targetNode).isolateScope()
// injecting services:
angular.element('html').injector().get('MyService')
// accessing controller for directive:
angular.element('my-pages').controller()
@mgibowski
mgibowski / gist:5857126
Created June 25, 2013 09:17
debug angular.js in browser javascript console
scope = angular.element($0).scope()
@mgibowski
mgibowski / git-revert-sha-commit
Created August 1, 2012 08:46
[git] revert to a commit by sha hash
# found at:
# http://stackoverflow.com/questions/1895059/git-revert-to-a-commit-by-sha-hash
# reset the index to the desired tree
git reset --hard 56e05fced
# move the branch pointer back to the previous HEAD
git reset --soft HEAD@{1}
git commit -m "Revert to 56e05fced"
@mgibowski
mgibowski / remove_svn.sh
Created February 22, 2012 11:47
[svn] remove all .svn entries
find ./ -name ".svn" -type d | xargs rm -rf