Skip to content

Instantly share code, notes, and snippets.

View justinxreese's full-sized avatar
:shipit:
hello

Justin Reese justinxreese

:shipit:
hello
View GitHub Profile
#!/bin/bash
#
# Bash script to setup headless Selenium (uses Xvfb and Chrome)
# (Tested on Ubuntu 12.04) trying on ubuntu server 14.04
# Add Google Chrome's repo to sources.list
echo "deb http://dl.google.com/linux/chrome/deb/ stable main" | sudo tee -a /etc/apt/sources.list
# Install Google's public key used for signing packages (e.g. Chrome)
# (Source: http://www.google.com/linuxrepositories/)
😒🙅🙄
$thing for fun and profit
all your $thing are belong to $shutup
honey I $verbed the $thing
$thing demystified
$thing: a deep dive
$verb all the things
make $thing great again
$x and $y and $z, oh my!
@justinxreese
justinxreese / gist:332bd9325134708e3e4ea42206d8462d
Last active June 29, 2017 20:36
Ruby readline characters
➜ rails c
irb(main):001:0> test = 1
=> 1
irb(main):002:0> ^[[A^C
irb(main):002:0> ^D
➜ ruby -v
ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-darwin16]

Keybase proof

I hereby claim:

  • I am justinxreese on github.
  • I am justinxreese (https://keybase.io/justinxreese) on keybase.
  • I have a public key whose fingerprint is E269 FFDE 2D29 1D6A 0731 70B5 4B74 4BCF F914 C8E0

To claim this, I am signing this object:

module ProjectTypes
def self.assignable_types
ProjectTypes.constants.map{|klass|
[ProjectTypes.const_get(klass)::ENGLISH_NAME, klass]
}
end
end
class ProjectTypes::TypeIII
ENGLISH_NAME = 'Type III'
require './roster_management'
set_roster
roster.each do |_, person|
next if person.teacher
person.display
end
@justinxreese
justinxreese / osx.bash
Created January 13, 2016 22:43
My OS X defaults
# Disable the crash reporter
defaults write com.apple.CrashReporter DialogType -string "none"
# Check for software updates daily, not just once per week
defaults write com.apple.SoftwareUpdate ScheduleFrequency -int 1
# Automatically quit printer app once the print jobs complete
defaults write com.apple.print.PrintingPrefs "Quit When Finished" -bool true
# Expand save panel by default
describe World do
it "should return no cell on a new board" do
w = World.new
w.cell_at(2,2).should be_nil
end
it "should allow cell creation" do
w = World.new
w.make_cell(2,2)
w.cell_at(2,2).should be_kind_of(Cell)
end
@justinxreese
justinxreese / example.rb
Created December 27, 2014 16:07
Constants example
module Employees
BASE_SALARY = 4000
class GarbageCollector
def self.salary
BASE_SALARY + 200
end
end
class Marketer
Plugin 'kien/ctrlp.vim'
Plugin 'justinxreese/vim-dandelion'
Plugin 'mattn/gist-vim'
Plugin 'mattn/webapi-vim'
Plugin 'godlygeek/tabular'