Skip to content

Instantly share code, notes, and snippets.

@scsmith
Created February 7, 2011 14:41
Show Gist options
  • Save scsmith/814456 to your computer and use it in GitHub Desktop.
Save scsmith/814456 to your computer and use it in GitHub Desktop.
(I only added the .rb for syntax highlighting)
watch (/(.*)(?:\.sass$|\.haml$|\.erb$)/) do |filename|
puts "Changed: #{filename}"
system %q{osascript -e "tell application \"Google Chrome\"
tell active tab of first window
execute javascript \"window.location.reload()\"
end tell
end tell"}
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment