Skip to content

Instantly share code, notes, and snippets.

@ACUVE

ACUVE/main.rb Secret

Created January 22, 2016 04: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 ACUVE/eda9d3571215ff123155 to your computer and use it in GitHub Desktop.
Save ACUVE/eda9d3571215ff123155 to your computer and use it in GitHub Desktop.
#!/usr/bin/ruby
require 'shellwords'
require 'fileutils'
urls = %w(
)
urls.size.times do |i|
FileUtils.mkdir_p(i.to_s)
end
loop do
now = Time.now
urls.each_with_index do |url, i|
filename = i.to_s + '/' + now.strftime('%F_%T.jpg')
cmd = Shellwords.join(%W|wget -nv -O #{filename} #{url}|)
spawn(cmd)
end
sleep 1
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment