vi `gem which lolcommits`
1行目に magic comment 追加
# coding: utf-8
該当のリポジトリの .git/hook/post-commit を編集
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
function countCSSRules() { | |
var results = '', | |
log = ''; | |
if (!document.styleSheets) { | |
return; | |
} | |
for (var i = 0; i < document.styleSheets.length; i++) { | |
countSheet(document.styleSheets[i]); | |
} | |
function countSheet(sheet) { |
namespace :private_pub do | |
desc "Start private_pub server" | |
task :start do | |
run "cd #{current_path};RAILS_ENV=production bundle exec rackup private_pub.ru -s thin -E production -D -P tmp/pids/private_pub.pid" | |
end | |
desc "Stop private_pub server" | |
task :stop do | |
run "cd #{current_path};if [ -f tmp/pids/private_pub.pid ] && [ -e /proc/$(cat tmp/pids/private_pub.pid) ]; then kill -9 `cat tmp/pids/private_pub.pid`; fi" | |
end |