Skip to content

Instantly share code, notes, and snippets.

Avatar

Jonathan Simmons jonathansimmons

View GitHub Profile
@jonathansimmons
jonathansimmons / # openssl - 2018-06-08_08-18-28.txt
Created Jun 8, 2018
openssl on macOS 10.14 - Homebrew build logs
View # openssl - 2018-06-08_08-18-28.txt
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 Jun 5, 2018
makedepend on macOS 10.14 - Homebrew build logs
View # makedepend - 2018-06-05_09-33-34.txt
Homebrew build logs for makedepend on macOS 10.14
Build date: 2018-06-05 09:33:34
View results_query.sql
-- 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 Jul 6, 2016
Check-in Kiosk user stories
View check-in-user-stories.md

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
View 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 Sep 24, 2015
A module to calculate human seconds with accuracy.
View calculate.rb
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)
View gist:b09b6ab4733a1eb90b84
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)
View gist:8ca435519c0f9862327a
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 Feb 3, 2020
Base 16 Ocean Dark Slack Theme
View base16.css
/* Not perfect but looks good considering slack limitations */
#2B2F3A,#1F232C,#1F232C,#DFE1E8,#4F5C65,#90A2B2,#A1C088,#C36069
@jonathansimmons
jonathansimmons / dual-login-devise.rb
Created Sep 8, 2014
A share login setup for two devise models.
View dual-login-devise.rb
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