Skip to content

Instantly share code, notes, and snippets.

View bsterno's full-sized avatar

Brian Stern bsterno

View GitHub Profile

Keybase proof

I hereby claim:

  • I am bsterno on github.
  • I am bstern (https://keybase.io/bstern) on keybase.
  • I have a public key ASA9DhQNWoTKQDcQv9qMIINlBgzcrZo8_z_FHK0wNzWF7wo

To claim this, I am signing this object:

require "uri"
require "openssl"
encoded_session = "BAh7BkkiD3Nlc3Npb25faWQGOgZFVEkiRTY4ODMzYjA1ZDNlOGY1NWYyZjhm%0ANDA1YjU4NTA0N2VhODNmMDliMDA1Zjk0MmNiMTRjNTFlZDliY2Q3MTI1ZjQG%0AOwBG%0A--b21b026936ebb96a5c113898a084affc893608d2"
str = "nobody_will_ever_find_me"
data = "BAh7BkkiD3Nlc3Npb25faWQGOgZFVEkiRTY4ODMzYjA1ZDNlOGY1NWYyZjhm%0ANDA1YjU4NTA0N2VhODNmMDliMDA1Zjk0MmNiMTRjNTFlZDliY2Q3MTI1ZjQG%0AOwBG%0A"
def decode_session(str)
Marshal.load(URI.decode_www_form_component(str).unpack("m").first)
end
<!DOCTYPE html>
<html>
<head>
<title>Brian's To-Do List</title>
</head>
<body>
<h3>Human: <%= human_score %></h3>
<h3>Computer: <%= computer_score %></h3>