Skip to content

Instantly share code, notes, and snippets.

View elenatanasoiu's full-sized avatar
:octocat:

Elena Tanasoiu elenatanasoiu

:octocat:
View GitHub Profile
@elenatanasoiu
elenatanasoiu / decode_session_cookie.rb
Created March 28, 2017 10:53 — forked from profh/decode_session_cookie.rb
A simple script to decode Rails 4 session cookies
@elenatanasoiu
elenatanasoiu / mechanize-cheat-sheet.rb
Created March 27, 2017 22:33 — forked from Najaf/mechanize-cheat-sheet.rb
Mechanize Cheat Sheet, take a look at the real documentation here: http://mechanize.rubyforge.org/
# Initialize Mechanize Agent
agent = Mechanize.new
# Visit a web page
agent.get 'http://localhost:3000/'
# get the url of the current page
agent.page.uri #=> http://localhost:3000
# agent remembers the scheme + host, so no need to supply it when navigating somewhere else