daily pastebin goal
39%
SHARE
TWEET

Untitled

a guest Feb 21st, 2018 62 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
 
  1. require 'rubygems'
  2. require 'sinatra'
  3.  
  4. $cheats_list = (`cheat sheets`).split("\n")
  5.  
  6. # Sinatra::Application.default_options.merge!(
  7. #   :run => true,
  8. #   :env => :production,
  9. #   :raise_errors => true
  10. # )
  11.  
  12.  
  13. get "/" do
  14.   cheats_size = $cheats_list.size
  15.   @cheats =  (`cheat #{$cheats_list[rand(cheats_size)]}`).split("\n")
  16.   erb :index
  17. end
  18.  
  19.  
  20. use Rack::Auth::Basic do |username, password|
  21.     username == 'admin' && password == 'secret'
  22. end
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top