Skip to content

Instantly share code, notes, and snippets.

@atmin
atmin / app.js
Last active August 29, 2015 13:56
http://ihi.im/app.js rewrite using jtmpl
// This is a remake concept of http://ihi.im/app.js using [jtmpl](http://jtmpl.com) as only dependency
(function () {
var model = {
// Route: share
'#share': function () {
this.route = '#share-template'
@atmin
atmin / gist:9118764
Created February 20, 2014 17:17
Git precommit hook: lint Python files, check for debugger statements
py_files=`git diff --name-only HEAD|grep '.py$'`
grep -n 'pdb.set_trace()' $py_files && echo -e "\033[1;31m Debugger statements!!!\033[0m" && exit 1
pyflakes $py_files && exit || echo -e "\033[1;31m Lint error!\033[0m"
exit 1