Skip to content

Instantly share code, notes, and snippets.

@fixlr
Created June 1, 2009 14:16
Show Gist options
  • Save fixlr/121437 to your computer and use it in GitHub Desktop.
Save fixlr/121437 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
#
# This stupid Braid game completely locks up OSX when the
# campaign file gets corrupted. Rather than restarting over
# and over again while I try to restore from a previous save
# point, I decided to whip up this kill script.
while true do
braid_id = %x[ps auxx | grep "Braid.app" | grep -v auxx | grep -v grep | awk '{print $2}']
if braid_id.empty?
puts "Braid is not running."
else
system("kill -9 #{braid_id}")
puts "Killed!"
end
sleep 20
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment