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
jshawl / docker-compose.yml
Last active Dec 2, 2018
Simplest possible Wordpress + MySql + phpMyAdmin docker-compose.yml
View docker-compose.yml
version: '3.3'
services:
db:
container_name: db
image: mysql:5.7
volumes:
- db_data:/var/lib/mysql
restart: always
environment:
@bradymholt
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
auth_client.update!(
:scope => 'https://www.googleapis.com/auth/calendar',
:access_type => "offline", #will make refresh_token available
View warmupw01d02.md

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):

NO_NUCLEAR_LAUNCH_SEQUENCES_HERE/
	nopeNotALaunchSequence.sh
TOP_SECRET/
	SERIOUSLY_TOP_SECRET/
@RobertAKARobin
RobertAKARobin / w01d01homework.md
Last active Aug 29, 2015
w01d01 Homus Workus
View w01d01homework.md

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
adambray / example_lesson.md
Created Feb 28, 2015
Example Lesson Plan - Scaffolding
View example_lesson.md

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
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)
end
def lsb_32(num)
s = num.to_s(2)
View gist:cda3a6a1d039398f09ee
class JobSchedule
# External interface for calling the service
def self.call(object_id, opts={})
if perform_asynchronously?
Delayed::Job.enqueue(EnqueuedJob.new(name, object_id, opts))
else
perform(object_id, opts)
end
end
@adambray
adambray / ga_lesson_plan_template.md
Created Jan 28, 2015
Lesson Plan Template Markdown
View ga_lesson_plan_template.md

Delivery Tips:

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

LESSON TITLE

View programming_cockatils.md

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
adambray / pair_programming_exercises.md
Last active Feb 21, 2019
Pair Programming Exercises
View pair_programming_exercises.md

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.