Skip to content

Instantly share code, notes, and snippets.

View jonathansimmons's full-sized avatar

Jonathan Simmons jonathansimmons

View GitHub Profile
@jonathansimmons
jonathansimmons / # openssl - 2018-06-08_08-18-28.txt
Created June 8, 2018 14:12
openssl on macOS 10.14 - Homebrew build logs
Homebrew build logs for openssl on macOS 10.14
Build date: 2018-06-08 08:18:28
@jonathansimmons
jonathansimmons / # makedepend - 2018-06-05_09-33-34.txt
Created June 5, 2018 14:36
makedepend on macOS 10.14 - Homebrew build logs
Homebrew build logs for makedepend on macOS 10.14
Build date: 2018-06-05 09:33:34
@jonathansimmons
jonathansimmons / results_query.sql
Created December 17, 2016 16:25
Results query
-- Assessment - The actual test, it has_many pages
-- page - A page of questions, has_many questions
-- Question - the question the user is being asked, has_many_choices
-- choice - The choice the user selected
-- Instance - an object that represents the users results. It has_many answers
-- answer - a join table to link the user's choice on a given question. belongs_to instance & choice
WITH
-- Page List
page_list AS (
@jonathansimmons
jonathansimmons / check-in-user-stories.md
Last active July 6, 2016 14:09
Check-in Kiosk user stories

Facts:

  • My wife and I have two children and are both primary guardians over them
  • My wife and I have secondary guardianship over Josh's son
  • Josh and his wife have primary guardianship of their son Luca
  • Josh has secondary guardianship of my son Cohen

Standard Check in Flow:

  • Guardian scans barcode to begin session
  • Selects one or more children to check in
  • Selects a service to check the child in to
@jonathansimmons
jonathansimmons / keybase.md
Last active January 27, 2020 18:27
keybase.md

Keybase proof

I hereby claim:

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

To claim this, I am signing this object:

@jonathansimmons
jonathansimmons / calculate.rb
Last active September 24, 2015 16:18
A module to calculate human seconds with accuracy.
module WMUtility
class Calculate
# modified from http://stackoverflow.com/questions/4136248/how-to-generate-a-human-readable-time-range-using-ruby-on-rails#answer-4136485
def self.human_seconds(secs, options={})
options = {
seconds: false,
minutes: true,
hours: true,
days: true,
}.merge(options)
@jonathansimmons
jonathansimmons / gist:b09b6ab4733a1eb90b84
Created August 31, 2015 22:10
tendays exec perf:objects
jonathan@Jonathan 10days (develop) $ TEST_COUNT=10 derailed exec perf:objects
Booting: production
I, [2015-08-31T15:40:47.601331 #84274] INFO -- : Celluloid 0.17.1.2 is running in BACKPORTED mode. [ http://git.io/vJf3J ]
tendays_production already exists
Endpoint: "/"
/Users/jonathan/.rvm/gems/ruby-2.2.2/gems/derailed_benchmarks-1.0.1/lib/derailed_benchmarks/tasks.rb:72: warning: already initialized constant DERAILED_APP
/Users/jonathan/.rvm/gems/ruby-2.2.2/gems/derailed_benchmarks-1.0.1/lib/derailed_benchmarks/tasks.rb:23: warning: previous definition of DERAILED_APP was here
Running 10 times
Total allocated: 19015426 bytes (105609 objects)
Total retained: 5759 bytes (27 objects)
@jonathansimmons
jonathansimmons / gist:8ca435519c0f9862327a
Created August 31, 2015 22:09
tendays ram_over_time
jonathan@Jonathan 10days (develop) $ TEST_COUNT=50_000 derailed exec perf:ram_over_time
Booting: production
I, [2015-08-31T15:32:41.465564 #77437] INFO -- : Celluloid 0.17.1.2 is running in BACKPORTED mode. [ http://git.io/vJf3J ]
tendays_production already exists
Endpoint: "/"
/Users/jonathan/.rvm/gems/ruby-2.2.2/gems/derailed_benchmarks-1.0.1/lib/derailed_benchmarks/tasks.rb:72: warning: already initialized constant DERAILED_APP
/Users/jonathan/.rvm/gems/ruby-2.2.2/gems/derailed_benchmarks-1.0.1/lib/derailed_benchmarks/tasks.rb:23: warning: previous definition of DERAILED_APP was here
PID: 77437
136.36328125
151.09375
@jonathansimmons
jonathansimmons / base16.css
Last active February 3, 2020 08:36
Base 16 Ocean Dark Slack Theme
/* Not perfect but looks good considering slack limitations */
#2B2F3A,#1F232C,#1F232C,#DFE1E8,#4F5C65,#90A2B2,#A1C088,#C36069
@jonathansimmons
jonathansimmons / dual-login-devise.rb
Created September 8, 2014 00:49
A share login setup for two devise models.
Rails.application.routes.draw do
constraints subdomain: "admin" do
devise_for :admins, skip: [:sessions]
devise_scope :admin do
get '/login' => 'admins/sessions#new', as: :new_admin_session
post '/login' => 'admins/sessions#create', as: :admin_session
get '/logout' => 'admins/sessions#destroy', as: :destroy_admin_session
unauthenticated do
devise_scope :admin do