Skip to content

Instantly share code, notes, and snippets.

@kitlangton
Created January 9, 2016 22:25
Show Gist options
  • Save kitlangton/1e37354a4386c5f691fe to your computer and use it in GitHub Desktop.
Save kitlangton/1e37354a4386c5f691fe to your computer and use it in GitHub Desktop.
require 'timers'
timers = Timers::Group.new
@count = 10
def message_slack_test
`curl --data ":pomodoro: #{@count}" $'https://vikingcodeschool.slack.com/services/hooks/slackbot?token=bii9bJoHe1mbns9bBm5lTpb6&channel=%23test'`
@count -= 1
end
now_and_every_five_seconds = timers.now_and_every(5) { message_slack_test }
until @count == 0
timers.wait
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment