Skip to content

Instantly share code, notes, and snippets.

View jwasham's full-sized avatar

John Washam jwasham

View GitHub Profile
@jwasham
jwasham / watcher.rb
Last active December 28, 2015 11:49 — forked from mpj/watcher.rb
Watches local directory (and subdirectories) and does rsync to remote server when a file is added, modified, or deleted.
#!/usr/bin/env ruby
require 'rubygems'
require 'rb-fsevent'
def sync(local, host, remote)
timehack = Time.now;
print "syncing... #{timehack}\n";