This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def deeply_sort_hash(object) | |
return object unless object.is_a?(Hash) | |
hash = RUBY_VERSION >= '1.9' ? Hash.new : ActiveSupport::OrderedHash.new | |
object.each { |k, v| hash[k] = deeply_sort_hash(v) } | |
sorted = hash.sort { |a, b| a[0].to_s <=> b[0].to_s } | |
hash.class[sorted] | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# sets sublime to single column, | |
# moves the terminal to right half of 27" iMac | |
# this helps script work with quicksilver triggers | |
delay 0.01 | |
# make sublime single column | |
tell application "System Events" | |
keystroke "1" using {command down, option down} | |
end tell |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# config yml | |
tunnels: | |
client: | |
hostname: foo | |
proto: | |
https: 443 | |
# POST gives => 400 - The plain HTTP request was sent to HTTPS port |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17:30:51 - ERROR - Guard::Brakeman failed to achieve its <run_all>, exception was: | |
> [#05AB2BAC888F] NoMethodError: undefined method `run_checks' for nil:NilClass | |
> [#05AB2BAC888F] /Users/jaredmoody/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/guard-brakeman-0.8.1/lib/guard/brakeman.rb:58:in `run_all' | |
> [#05AB2BAC888F] /Users/jaredmoody/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/guard-1.8.3/lib/guard/runner.rb:99:in `block in run_supervised_task' | |
> [#05AB2BAC888F] /Users/jaredmoody/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/guard-1.8.3/lib/guard/runner.rb:97:in `catch' | |
> [#05AB2BAC888F] /Users/jaredmoody/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/guard-1.8.3/lib/guard/runner.rb:97:in `run_supervised_task' | |
> [#05AB2BAC888F] /Users/jaredmoody/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/guard-1.8.3/lib/guard/runner.rb:54:in `block (2 levels) in run' | |
> [#05AB2BAC888F] /Users/jaredmoody/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/guard-1.8.3/lib/guard/runner.rb:175 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copyright (c) 2010, Nathaniel Ritmeyer. All rights reserved. | |
# | |
# http://www.natontesting.com | |
# | |
# Save this in a file called 'unused_progress.rb' in your 'features/support' directory. Then, to list | |
# all the unused steps in your project, run the following command: | |
# | |
# cucumber -d -f Cucumber::Formatter::UnusedProgress | |
# | |
# or... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
guard 'cucumber', :cli => "-f UnusedProgress" do | |
watch(%r{^features/.+\.feature$}) | |
watch(%r{^features/support/.+$}) { 'features' } | |
watch(%r{^features/step_definitions/(.+)_steps\.rb$}) { |m| Dir[File.join("**/#{m[1]}.feature")][0] || 'features' } | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Reed Sensor | |
function changed() | |
{ | |
local result = hardware.pin1.read(); | |
server.show(result?"On":"Off"); | |
hardware.pin9.write(result); | |
} | |
// configure pin 1 as digital input |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
> rake db:migrate --trace | |
(in /Users/jaredmoody/Sites/refinery_git) | |
/opt/local/lib/ruby/gems/1.8/gems/rails-2.3.5/lib/rails/gem_dependency.rb:119:Warning: Gem::Dependency#version_requirements is deprecated and will be removed on or after August 2010. Use #requirement | |
** Invoke db:migrate (first_time) | |
** Invoke environment (first_time) | |
** Execute environment | |
rake aborted! | |
undefined method `acts_as_taggable_on' for Blog(Table doesn't exist):Class | |
/opt/local/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record/base.rb:1959:in `method_missing_without_paginate' | |
/Users/jaredmoody/Sites/refinery_git/vendor/plugins/will_paginate/lib/will_paginate/finder.rb:170:in `method_missing' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tell application "GrowlTunes" | |
show current track | |
end tell |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tell application "iScrobbler.app" | |
«event iSCbNPly» | |
end tell |
NewerOlder