Skip to content

Instantly share code, notes, and snippets.

/ruby.rb Secret

Created December 13, 2015 06:30
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 anonymous/4dcba93d89705cae1b11 to your computer and use it in GitHub Desktop.
Save anonymous/4dcba93d89705cae1b11 to your computer and use it in GitHub Desktop.
desktop = ENV['HOME'] + '/desktop'
Dir.chdir desktop + '/pinGen'
begin
runtill = IO.readlines("settings.txt")[0].to_i
rescue
puts "Error, cannot load data from settings.txt."; sleep 4; exit
end
if !runtill.is_a? Integer || runtill.nil? || runtill.empty? # I also tried if not runtill... didn't work
runtill = 100
puts "\nruntill was edited"
end
puts "END"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment