Skip to content

Instantly share code, notes, and snippets.

View rgpass's full-sized avatar

Gerry Pass rgpass

View GitHub Profile

Keybase proof

I hereby claim:

  • I am rgpass on github.
  • I am rgpass (https://keybase.io/rgpass) on keybase.
  • I have a public key ASAMfOIaKNxZUH_fvT402Cqfh_XiI5cniUgNB0hRvtNkAwo

To claim this, I am signing this object:

@rgpass
rgpass / devise_add_column.md
Last active April 26, 2017 19:18
Devise - Adding a Column to Users

Devise - Adding a Column to Users

To add a field for new users to fill out, we need to do a couple of steps. The big picture is:

  • [Pre-Req] Add the column to the users table
  • Generate controllers so that we can take control of what gets called
  • Whitelist the new field names so that we only pass through what we want
  • Create the new fields in the user_registrations#new view

This example adds a phone_number field.

@rgpass
rgpass / har_script.rb
Created December 18, 2013 16:30
Gerry Pass - Rigor - Writing and Programming Assessment
# Problem Statement:
# Using Ruby, create a script that opens a HAR file from a URL (example HAR file URL) and prints
# both the fastest and slowest resources from the file along with their total response times.
# command:
# $ ruby har_script.rb <given_har_url>
# output:
# fastest: <fastest_file_name> <slowest_response_time> seconds
# slowest: <slowest_file_name> <slowest_response_time> seconds
require 'uri'