Skip to content

Instantly share code, notes, and snippets.

View richievos's full-sized avatar

Richie Vos richievos

View GitHub Profile

Disable Device Enrollment Notification on MacOS Catalina

Restart the Mac in Recovery Mode by holding Command-R during restart

Open Terminal in the recovery screen and type:

csrutil disable

Restart Computer Normally

# Proposed benefits:
# * more verbose, but you can see more clearly all the "stuff" your method is using
# * easier to re-use methods, since they're not coupled to instance var names
# * less room for concurrency issues, since all state transforms would be in the top methods
class User
def gender
infer_gender
@gender
end
@richievos
richievos / 1-before_spec.rb
Created November 21, 2011 05:33 — forked from ragaskar/1-before_spec.rb
Spectastrophe #1
require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
describe "Something doppelganger" do
describe "RailCar" do
let(:gateway) { RailCar.new :login => "a", :password => "b" }
describe "#commit" do
let(:response) { railcar.send :commit, request, {} }
describe "response" do
require 'spec_helper'
require 'parslet/rig/rspec'
require 'tv_show_parslet'
describe TvShowParslet do
let(:parser) { described_class.new }
def p(string)
parse(string, :trace => true)
@thinkerbot
thinkerbot / gem_env.sh
Created November 8, 2010 18:28
Illustrates GEM_HOME vs GEM_PATH
# Two ENV variables control the 'gem' command:
#
# GEM_HOME: the single path to a gem dir where gems are installed
# GEM_PATH: a standard PATH to gem dirs where gems are found
#
# A gem directory is a directory that holds gems. The 'gem' command will lay
# out and utilize the following structure:
#
# bin # installed bin scripts
# cache # .gem files ex: cache/gem_name.gem