Skip to content

Instantly share code, notes, and snippets.

Jesse Shawl jshawl

Block or report user

Report or block jshawl

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
jshawl / docker-compose.yml
Last active Dec 2, 2018
Simplest possible Wordpress + MySql + phpMyAdmin docker-compose.yml
View docker-compose.yml
version: '3.3'
container_name: db
image: mysql:5.7
- db_data:/var/lib/mysql
restart: always
bradymholt / google_calendar_api_example.rb
Last active Feb 25, 2017
Google Calendar API with Ruby Client
View google_calendar_api_example.rb
#gem install 'google-api-client'
require 'google/api_client'
#Setup auth client
client_secrets = Google::APIClient::ClientSecrets.load #client_secrets.json must be present in current directory!
auth_client = client_secrets.to_authorization
:scope => '',
:access_type => "offline", #will make refresh_token available

Mission: Impossible!

We, the Impossible Missions Force, have become aware that Doctor Nefarious is planning on using his Nefarious Computer (a standard Macbook) to initiate a nuclear launch sequence that will destroy the entire world.

Our sources have told us that the nuclear launch sequence is run from a shell script, and have also given us a tree showing the contents of the Doctor's computer (the flash drive has been added to show where in the structure it will appear):

RobertAKARobin /
Last active Aug 29, 2015
w01d01 Homus Workus

Homework, W01D01

Create a function in your .bash_profile that will set up a working directory for a new GA student!

Things it should do:

  • Create a folder called GeneralAssembly
adambray /
Created Feb 28, 2015
Example Lesson Plan - Scaffolding

Domain Modeling and Databases

Learning Objectives

  • Describe the basic parts of an ERD
  • Construct ERDs to model the nouns and relationships in a domain
  • Explain what a database is and why you would use one as opposed to other persistent storage mechanisms
  • Explain the difference between a database management system (R/DBMS) and a database, and name the major DBMSes
JackVCurtis / SHA1
Created Feb 20, 2015
Single block implementation of SHA1 in Ruby. DO NOT USE THIS IN REAL LIFE.
View SHA1
def rot_left(num, count)
bin_string = num.to_s(2)
bin_string = ("0" * (32 - bin_string.length)) + bin_string
shifted_string = bin_string[0..(count-1)]
rotated_string = bin_string[count..31] + shifted_string
return rotated_string.to_i(2)
def lsb_32(num)
s = num.to_s(2)
View gist:cda3a6a1d039398f09ee
class JobSchedule
# External interface for calling the service
def, opts={})
if perform_asynchronously?
Delayed::Job.enqueue(, object_id, opts))
perform(object_id, opts)
adambray /
Created Jan 28, 2015
Lesson Plan Template Markdown

Delivery Tips:

  • Think about how long you're talking
  • Move quicker sooner, slower later
  • Cold Call more often
  • Revisit LOs
  • Defer questions when appropriate



Programming Cocktails

The Best Ideas (All have been served 'in production')

  • Prototype - An Old Fashioned
  • Gem and Tonic - Gin & Tonic + Grenadine
  • Solarized Light - A Tequila Sunrise, name is a play on a terminal theme.
  • Ruby red - red wine with coke (aka Kalimotxo)
  • Bourbon.css - Bourbon on the rocks
adambray /
Last active Feb 21, 2019
Pair Programming Exercises

Number to Ordinal

See full kata at codewars

Finish the function numberToOrdinal, which should take a number and return it as a string with the correct ordinal indicator suffix (in English). That is:

  • numberToOrdinal(1) ==> '1st'
  • numberToOrdinal(2) ==> '2nd'
  • numberToOrdinal(3) ==> '3rd'
  • numberToOrdinal(4) ==> '4th'
You can’t perform that action at this time.