Skip to content

Instantly share code, notes, and snippets.

Working from home

Christopher Lake chhhris

Working from home
Block or report user

Report or block chhhris

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
chhhris / mind_games_poem.txt
Last active Mar 15, 2019
"Mind Games" Outline
View mind_games_poem.txt

"If it sounds to you like everything that could go wrong is going wrong, then I would have to agree.
"Do you know what it is? What’s causing all this misery and suffering?
"I know now, but for a long time, I had no idea why my luck had turned. Why my deepest and darkest fears had manifested themselves into real life.
"For a long time, I thought I was alone. Of course by now, I know I am not alone. And other people who thought they were alone, now realize the truth as well.
chhhris /
Last active Jan 5, 2018
Skyscanner flight price discrepancy
# ruby
params = {
chhhris /
Created Jun 2, 2016
Bash script for searching directory with list of file names passed as array
declare -a array=("add-student.png" "assessment-progressbar.png" "blank.gif" "browse.png" "cert-altiusEd.png" "cert-p-completion.png" "cert-p-grat.gif" "cert-p-l.gif""cert-p-r.gif" "cert-signature-b.png" "ckeditor-helix-icons.png" "completion-badge-print.png" "crop.png" "dialog-close.png" "fb-share.png""helix-fb-share-cert.png" "ibc-logo-4c.png" "logo_footer.png" "logo_img.png" "logo_text.png" "online-status.png" "remove-18.png" "share-board.png""sprite-40plus.png" "sprites.png" "stack-large.png" "stack-medium.png" "stack-small.png" "start-date.png" "test/announce.png" "texture.png""ui-bg_flat_0_878787_40x100.png" "ui-bg_flat_0_aaaaaa_40x100.png" "ui-bg_flat_75_ffffff_40x100.png" "ui-bg_glass_55_fbf9ee_1x400.png""ui-bg_glass_65_ffffff_1x400.png" "ui-bg_glass_75_bcdbf0_1x400.png" "ui-bg_glass_75_dadada_1x400.png" "ui-bg_highlight-soft_75_dbdbdb_1x100.png""ui-bg_highlight-soft_95_fad3d1_1x100.png" "ui-icons_222222_256x240.png" "ui-icons_333333_256x240.png" "ui-icons_454545_256x240.png""ui-icons_4f4f4f_256x240.p
View capybara cheat sheet
=Clicking links and buttons=
click_link('Link Text')
click('Link Text') # Click either a link or a button
click('Button Value')
View gist:6c29b9ada4f06d55b507
#!/usr/bin/env ruby
class Solver
B = " "
attr_reader :sudoku_board
def initialize
@sudoku_board = [[B, 4, B, B, B, 5, B, 1, B],
[B, B, B, B, 1, B, 6, B, 9],
[6, B, 1, 9, 3, B, B, B, 4],
View moby_dick.rb
require 'nokogiri'
require 'open-uri'
url = ""
doc = Nokogiri::HTML(open(url))
words = doc.text.downcase
.gsub(/[^\w\s]/,'') # remove non word or space characters
.gsub(/\n/,' ') # remove new lines
.gsub(/\s+/,' ') # normalize spaces (only one space ever)
.split("chapter one").first # remove preamble
View sort_by_note_date :incoming).sort_by do |deal|
(deal.notes.all.present? && deal.notes.all.last[:updated_at]) ||
chhhris / live-emails-dev-mode.rb
Last active Jan 4, 2016
Sending live emails in development mode
View live-emails-dev-mode.rb
# now with Mandrill
# sending emails to your email while in development mode.
# mail_interceptor.rb
if Rails.env.development? = ''
View ios-test.css
// iOS Media Queries
// Goal: capture styles for iPhone, iPhone 3G, iPhone 3GS, iPhone 4, iPhone 4S, iPad, and iPad 2
// Author: Tony Schneider (@tonywok)
// Please tell me where I fail. :)
// iPhone v(4,4S) portrait
// test: black text (overwritten by v* portrait) with blue background
@media all and (-webkit-min-device-pixel-ratio: 2) and (orientation: portrait) {
a {
You can’t perform that action at this time.