Skip to content

Instantly share code, notes, and snippets.

require 'named_value_class'
module Peas
NamedValueClass PitchClass:Fixnum, constrain:0..11 do
minus_a 'Interval::Base' do |lhs,minus,rhs|
result = minus(rhs) % 12
is_sharp? ? PitchClass.sharps(result) : PitchClass.flats(result)
end
all_operators_with_a :PitchClass, raise:SyntaxError
require 'named_value_class'
module Peas
NamedValueClass PitchClass:Fixnum, constrain:0..11 do
minus_a 'Interval::Base' do |lhs,minus,rhs|
result = minus(rhs) % 12
is_sharp? ? PitchClass.sharps(result) : PitchClass.flats(result)
end
def as_flat
>> C4.value #=> 60
>> C4 #=> C4
>> x = 60 #=> 60
>> [C4,x,D4] #=> [C4, 60, D4]
>>
require 'forwardable'
require 'peas/pitch_class'
module Peas
NamedValueClass Pitch:Fixnum, constrain:0..127 do
minus_a 'Interval::Base' do |lhs,minus,rhs|
minus.call rhs.inverse
end
all_operators_with_a Pitch, raise:SyntaxError
~/s/ruby-llvm /master + macrake
(in /Users/mgarriss/src/ruby-llvm)
Proceeding without Rcov. gem install rcov on supported platforms.
Yard is not installed. `gem install yard` to build documentation.
/Users/mgarriss/src/ruby-llvm/lib/llvm.rb:10:in `block': undefined method `ffi_lib' for LLVM::C:Class (NoMethodError)
from /Users/mgarriss/src/ruby-llvm/lib/llvm.rb:6:in `block'
from /Users/mgarriss/src/ruby-llvm/lib/llvm.rb:4:in `<main>'
from /Users/mgarriss/src/ruby-llvm/lib/llvm/core.rb:1:in `<main>'
from /Users/mgarriss/src/ruby-llvm/test/test_helper.rb:11:in `<main>'
from /Users/mgarriss/src/ruby-llvm/test/array_test.rb:1:in `<main>'
+ rails g scaffold Sheep
invoke active_record
create db/migrate/20110513195730_create_sheep.rb
create app/models/sheep.rb
invoke test_unit
create test/unit/sheep_test.rb
create test/fixtures/sheep.yml
route resources :sheep
invoke scaffold_controller
create app/controllers/sheep_controller.rb
def update_events
open_downtime = open_events(:down)
probes = Config::Pingdom.probes_for_region(self.region.region)
check = Config::Pingdom.connection.check( check_id )
outages = Config::Pingdom.connection.summary( check_id ).
outages(:from => last_updated,
:probes => probes )
results = Config::Pingdom.connection.results( check_id, :from => last_updated, :probes => probes ).reverse
# Update outages
2011-04-29T11:18:28+00:00 app[cron.1]: Updating today's DailyStat...
2011-04-29T11:18:33+00:00 app[cron.1]: rake aborted!
2011-04-29T11:18:33+00:00 app[cron.1]: undefined method `>' for nil:NilClass
2011-04-29T11:18:33+00:00 app[cron.1]:
2011-04-29T11:18:33+00:00 app[cron.1]: (See full trace by running task with --trace)
2011-04-29T04:18:33-07:00 heroku[cron.1]: State changed from up to complete
2011-04-29T04:18:33-07:00 heroku[cron.1]: State changed from complete to down
2011-04-29T05:18:36-07:00 heroku[cron.1]: State changed from created to starting
2011-04-29T12:18:39+00:00 app[cron.1]: (in /app)
2011-04-29T05:18:41-07:00 heroku[cron.1]: State changed from starting to up
Before you can use these tools you must export some variables to your $SHELL
and download your X.509 certificate and private key from Amazon Web Services.
Your certificate and private key are available at:
http://aws-portal.amazon.com/gp/aws/developer/account/index.html?action=access-key
Download two ".pem" files, one starting with `pk-`, and one starting with `cert-`.
You need to put both into a folder in your home directory, `~/.ec2`.
== Load Balancer Instance Health ==
api-internal-west [FAIL]
* :
autocomplete-external-west [FAIL]
* :
api-internal [FAIL]
* :
autocomplete-external [FAIL]
* :