Created
November 6, 2008 21:04
-
-
Save tommorris/22703 to your computer and use it in GitHub Desktop.
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 characters
require 'ping' | |
fe_rules = Array.new | |
fe_rules << Proc.new do | |
`wlanconfig ath0 list ap`.split("\n")[1..-1].map {|i| i.split}.each {|net| | |
if net[1] == "00:1c:10:87:57:eb" | |
true | |
elsif net[0] == "GRANGE" | |
[true, "Kensington Square, London"] | |
elsif net[0] == "BritishLibrary" | |
[true, "British Library, London"] | |
end | |
} | |
end | |
fe_rules << Proc.new do | |
true if Ping.pingecho("imac.local", 2) || Ping.pingecho("darwin.local", 2) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment