Skip to content

Instantly share code, notes, and snippets.

View brycethornton's full-sized avatar

Bryce Thornton brycethornton

View GitHub Profile
@brycethornton
brycethornton / Brewfile
Created July 11, 2014 14:54
Brewfile using cask (http://caskroom.io/)
# basic brews
install brew-cask
install wget
install git
# casks
cask install appcleaner
cask install cleanmymac
cask install dropbox
cask install firefox
@brycethornton
brycethornton / guard-error.txt
Created March 3, 2012 17:44
Running Guard For fill-all-the-things
/Users/bryce/development/fill-all-the-things>bundle exec guard
Guard uses Growl to send notifications.
Guard is now watching at '/Users/bryce/Dropbox/development/fill-all-the-things'
Guard::JasmineHeadlessWebkit is running.
Guard::JasmineHeadlessWebkit running all specs...
Can't load , the file may be broken.
Out of curiosity, did your tests try to submit a form and you haven't prevented that?
Try running your tests in your browser with the Jasmine server and see what happens.
Test ordering seed: --seed 7986
class BenfordCounter
def initialize
@num_count = {}
# Set all values to zero
(1..9).each {|num| @num_count[num] = 0 }
@total_records = 0
@min_value = 9999999999
@max_value = 0
@brycethornton
brycethornton / liquid_hash_confusion.rb
Created March 27, 2011 18:52
I'm pretty confused about how liquid treats hashes in a template.
# Controller (simplified):
def show
vars = {}
vars['status_dates'] = @system.get_statuses_by_date
@template = Liquid::Template.parse(@system.theme.source)
render :text => @template.render( vars )
end
# status_dates is a hash formatted like so:
/Users/bryce/development/offsitestatus>bundle install
Fetching source index for http://rubygems.org/
Using rake (0.8.7)
Using abstract (1.0.0)
Using activesupport (3.0.0.rc)
Using builder (2.1.2)
Using i18n (0.4.1)
Using activemodel (3.0.0.rc)
Using erubis (2.6.6)
Using rack (1.2.1)
/Library/Ruby/Gems/1.8/gems/rubyosa-0.4.0/lib/rbosa.rb:470: warning: Passing no parameters to XML::Parser.new is deprecated. Pass an instance of XML::Parser::Context instead.
XML::Parser#string is deprecated. Use XML::Parser.string instead
pomodoro at 07/30/10 11:39:18
/Users/bryce/.gem/ruby/1.8/gems/ruby-growl-2.0/lib/ruby-growl.rb:355:in `send': Connection refused - send(2) (Errno::ECONNREFUSED)
from /Users/bryce/.gem/ruby/1.8/gems/ruby-growl-2.0/lib/ruby-growl.rb:355:in `send'
from /Users/bryce/.gem/ruby/1.8/gems/ruby-growl-2.0/lib/ruby-growl.rb:340:in `notify'
from /Library/Ruby/Gems/1.8/gems/primadoro-0.0.0/bin/../lib/primadoro.rb:51:in `pomodoro'
from /Library/Ruby/Gems/1.8/gems/primadoro-0.0.0/bin/../lib/primadoro.rb:23:in `send'
from /Library/Ruby/Gems/1.8/gems/primadoro-0.0.0/bin/../lib/primadoro.rb:23:in `action'
from /Library/Ruby/Gems/1.8/gems/primadoro-0.0.0/bin/../lib/primadoro.rb:23:in `each'
@brycethornton
brycethornton / README
Created December 2, 2009 00:48
Simple Applescripts To Control iTunes
Copy the code and paste it into "Script Editor". You can find this in "/Applications/AppleScript/". Save the script.
To run the script from the command line just type "osascript /path/to/your/script.scpt".
C-f Move forward a character
C-b Move backward a character
M-f Move forward a word
M-b Move backward a word
C-n Move to next line
C-p Move to previous line
C-a Move to beginning of line
C-e Move to end of line
M-a Move back to beginning of sentence
M-e Move forward to end of sentence