Skip to content

Instantly share code, notes, and snippets.

@tomlea
Created December 17, 2008 13:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tomlea/37053 to your computer and use it in GitHub Desktop.
Save tomlea/37053 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
require "rubygems"
gem "beanstalk-client"
require "beanstalk-client"
port = ARGV.last or raise "GIVE ME A PORT NEXT TIME!"
beanstalk = Beanstalk::Pool.new(["0.0.0.0:#{port}"])
job = beanstalk.reserve
puts "Here is your target:\n==============="
puts job.body
puts "===============\nAre you sure you want him dead?"
if STDIN.gets =~ /^y/i
job.delete
puts "The deed has been done. Happy now?"
else
puts "Wimp!"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment