Skip to content

Instantly share code, notes, and snippets.

@elliottkember
Created August 14, 2010 12:03
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 elliottkember/524238 to your computer and use it in GitHub Desktop.
Save elliottkember/524238 to your computer and use it in GitHub Desktop.
# In your crontab:
* * * * * ruby ~/run.rb
# in ~/run.rb
12.times do
uptime = `uptime`.split(' ')[-3]
user = `whoami`.sub("\n", '')
# Optionally, use the following line to customize your username
# user = "@YOUR-TWITTER-NAME"
`curl http://loadaverages.elliottkember.com/statistics -s -d statistic\\[computer_id\\]=#{user}\\&statistic\\[uptime\\]=#{uptime}`
sleep 5
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment