Last active
December 16, 2015 16:19
-
-
Save chrishunt/5462643 to your computer and use it in GitHub Desktop.
Revisions
-
chrishunt revised this gist
Apr 25, 2013 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,5 @@ # Be notified when a new house matching your criteria is posted to Craigslist require 'snoop' MAX_RENT = 1900 -
chrishunt revised this gist
Apr 25, 2013 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -18,6 +18,6 @@ url += "&addThree=wooof" if DOGS end snoop.notify while: -> { true }, delay: 300 do `terminal-notifier -message "New listing!"` end -
chrishunt revised this gist
Apr 25, 2013 . 1 changed file with 2 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -6,20 +6,18 @@ CATS = true DOGS = true snoop = Snoop::HttpNotifier.new url: begin url = [ "http://#{CITY}.craigslist.org/search", "/apa?zoomToPosting=&query=&srchType=A", "&maxAsk=#{RENT}", "&bedrooms=#{BEDROOMS}" ].join url += "&addTwo=purrr" if CATS url += "&addThree=wooof" if DOGS end snoop.notify while: -> { true }, delay: 5 do `terminal-notifier -message "New listing!"` end -
chrishunt revised this gist
Apr 25, 2013 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -20,6 +20,6 @@ def url snoop = Snoop::HttpNotifier.new url: url snoop.notify while: -> { true }, delay: 5 do `terminal-notifier -message "New listing!"` end -
chrishunt revised this gist
Apr 25, 2013 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,7 @@ require 'snoop' MAX_RENT = 1900 BEDROOMS = 2 CITY = 'portland' CATS = true DOGS = true -
chrishunt revised this gist
Apr 25, 2013 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,16 +1,16 @@ require 'snoop' BEDROOMS = 2 MAX_RENT = 1900 CITY = 'portland' CATS = true DOGS = true def url url = [ "http://#{CITY}.craigslist.org/search", "/apa?zoomToPosting=&query=&srchType=A", "&maxAsk=#{MAX_RENT}", "&bedrooms=#{BEDROOMS}" ].join -
chrishunt renamed this gist
Apr 25, 2013 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
chrishunt created this gist
Apr 25, 2013 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,25 @@ require 'snoop' BEDROOMS = 2 CITY = 'portland' RENT = 1900 CATS = true DOGS = true def url url = [ "http://#{CITY}.craigslist.org/search", "/apa?zoomToPosting=&query=&srchType=A", "&maxAsk=#{RENT}", "&bedrooms=#{BEDROOMS}" ].join url += "&addTwo=purrr" if CATS url += "&addThree=wooof" if DOGS end snoop = Snoop::HttpNotifier.new url: url snoop.notify while: -> { true }, delay: 5 do |content| `terminal-notifier -message "New listing!"` end