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
delegate = Object.new | |
def delegate.netServiceBrowserWillSearch(browser) | |
puts "search commencing!" | |
end | |
def delegate.netServiceBrowser(browser, didFindService:service, moreComing:more) | |
# this never calls regardless of the services on the network. | |
puts "Found service #{service.name}." | |
end |
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
#!/usr/bin/env ruby | |
# | |
# grab a full copy of all my github code. | |
# | |
# assumptions: github.user and github.token are set in git | |
# | |
require 'yaml' | |
user = `git config --get github.username`.strip |
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
#!/usr/bin/env ruby | |
# | |
# Throw this into a cron job to notify us when our chef clients | |
# have gone AWOL. | |
# | |
# [email protected] | |
# | |
require 'rubygems' | |
require 'chef' | |
require 'ruby-units' |
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
# | |
# Forked from http://gist.github.com/90062 | |
# | |
# Drop this into ~/.bash_profile: | |
# Usage: httpdump <interface> | |
# Example: httpdump en0 | |
# | |
function httpdump() { sudo tcpdump -i $1 -n -s 0 -w - | grep -a -o -E "Host\: .*|GET \/.*|POST \/.*";} | |
# All the above tested only on OS X. |
NewerOlder