Skip to content

Instantly share code, notes, and snippets.

View cahrehn's full-sized avatar

Kenny Linsky cahrehn

View GitHub Profile
importPackage(java.io);
(function(args) {
var output = [],
console = {
log: print
},
showUsage = function() {
console.log('Usage: java -jar <rhino.jar> rhino-handlebars-compiler.js --handlebars <handlebars library path> --template <template file> --output <output file>');
},
@cahrehn
cahrehn / haml_watch.rb
Created October 17, 2012 19:18 — forked from fin/haml_watch.rb
haml directory watcher
#!/usr/bin/ruby1.8
# Script to watch a directory for any changes to a haml file and compile it.
#
# Changes to a file named like _partial.haml will compile any haml files that
# reference the partial i.e. any that contain
# =Haml::Engine.new(File.read("/path/to/_partial.haml")).render
#
# USAGE: ruby haml_watch.rb <directory_to_watch>
#
# Original by Blake Smith / http://blakesmith.github.com/2010/09/05/haml-directory-watcher.html