Skip to content

Instantly share code, notes, and snippets.

@albus522
Created June 21, 2013 21:36
Show Gist options
  • Save albus522/5834520 to your computer and use it in GitHub Desktop.
Save albus522/5834520 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
require 'net/http'
orig_content = File.read(ARGV[0])
msg = Net::HTTP.get_response(URI.parse('http://www.commitlogsfromlastnight.com/')).body.scan(%r{<a class="commit" href=[^>]+>(.+?)</a>}m).flatten.sample(1)
File.open(ARGV[0], 'w') {|f| f.puts msg; f << orig_content }
@danielmorrison
Copy link

Wow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment