Created
May 17, 2016 22:27
-
-
Save georgkreimer/5cc6a6214dd3c2f89474c495af2ede9f to your computer and use it in GitHub Desktop.
code for https://twitter.com/speedtest0r
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'rubygems' | |
require 'chatterbot/dsl' | |
require 'speedtest' | |
# debug_mode | |
# remove this to get less output when running your bot | |
verbose | |
speedtest = Speedtest::Test.new( | |
download_runs: 1, | |
upload_runs: 1, | |
download_sizes: [2000, 4000], | |
upload_sizes: [10000, 400000], | |
debug: true | |
) | |
result = speedtest.run | |
tweet "Download: #{result.pretty_download_rate}, Upload: #{result.pretty_upload_rate}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
wget -O speedtester.rb https://gist.github.com/georgkreimer/5cc6a6214dd3c2f89474c495af2ede9f/raw/a906ff68fb86a9d44a55740d8c268fd86893d211/speedtester.rb
gem install speedtest
gem install chatterbot
ruby speedtester.rb
enter twitter api key + secret