Skip to content

Instantly share code, notes, and snippets.

View zmariscal's full-sized avatar
Drinking coffee

Zack Mariscal zmariscal

Drinking coffee
View GitHub Profile
@zmariscal
zmariscal / stuff.rb
Created July 20, 2019 19:18
Optional org_admin
## user within a shared context
let(:options) { opts || {} }
let(:access) { options[:access] || {} }
let(:role) { options.fetch(:role, "standard") }
let(:org_admin) { options.fetch(:org_admin, false) }
let!(:membership) { current_user.account_memberships.create!(account: account, role: role, organization_administrator: access[:org_admin]) }
## shared context in spec

Keybase proof

I hereby claim:

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

To claim this, I am signing this object:

@zmariscal
zmariscal / grateful.py
Last active August 29, 2015 14:16
make a list of 5 things you're grateful for
from sys import argv
from os.path import exists
script, filename = argv
print "What are five things you're grateful for today?"
print "First:"
First = raw_input("> ")