Skip to content

Instantly share code, notes, and snippets.

View msp's full-sized avatar

Matt Spendlove msp

View GitHub Profile
ruby-1.8.7-p330@nal2011-cfe bigapplemac:nal2011-cfe matt$ heroku logs
2011-02-09T08:50:45-08:00 app[web.1]: from /usr/ruby1.8.7/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
2011-02-09T08:50:45-08:00 app[web.1]: from /usr/ruby1.8.7/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
2011-02-09T08:50:45-08:00 app[web.1]: from /app/9a0efeb5-8519-4fdb-8b84-60e9c6dbd391/home/.bundle/gems/ruby/1.8/gems/thin-1.2.7/lib/rack/adapter/rails.rb:42:in `load_application'
2011-02-09T08:50:45-08:00 app[web.1]: from /app/9a0efeb5-8519-4fdb-8b84-60e9c6dbd391/home/.bundle/gems/ruby/1.8/gems/thin-1.2.7/lib/rack/adapter/rails.rb:23:in `initialize'
2011-02-09T08:50:45-08:00 app[web.1]: from /home/heroku_rack/heroku.ru:29:in `new'
2011-02-09T08:50:45-08:00 app[web.1]: from /home/heroku_rack/heroku.ru:29
2011-02-09T08:50:45-08:00 app[web.1]: from /app/9a0efeb5-8519-4fdb-8b84-60e9c6dbd391/home/.gems/gems/rack-1.2.1/lib/rack/builder.rb:46:in `instance_eval'
2011-02-09T08:50:45-08:
@msp
msp / unicorn-logrotate
Created May 19, 2011 11:19
Unicorn and logrotate
Unhandled listen loop exception #<IOError: closed stream>.
/var/www/drownedinsound/shared/bundle/ruby/1.8/gems/unicorn-3.3.1/lib/unicorn/http_server.rb:624:in `select'
/var/www/drownedinsound/shared/bundle/ruby/1.8/gems/unicorn-3.3.1/lib/unicorn/http_server.rb:624:in `worker_loop'
/var/www/drownedinsound/shared/bundle/ruby/1.8/gems/newrelic_rpm-2.13.4/lib/new_relic/agent/instrumentation/unicorn_instrumentation.rb:7:in `call'
/var/www/drownedinsound/shared/bundle/ruby/1.8/gems/newrelic_rpm-2.13.4/lib/new_relic/agent/instrumentation/unicorn_instrumentation.rb:7:in `worker_loop'
/var/www/drownedinsound/shared/bundle/ruby/1.8/gems/unicorn-3.3.1/lib/unicorn/http_server.rb:496:in `spawn_missing_workers'
/var/www/drownedinsound/shared/bundle/ruby/1.8/gems/unicorn-3.3.1/lib/unicorn/http_server.rb:493:in `fork'
/var/www/drownedinsound/shared/bundle/ruby/1.8/gems/unicorn-3.3.1/lib/unicorn/http_server.rb:493:in `spawn_missing_workers'
/var/www/drownedinsound/shared/bundle/ruby/1.8/gems/unicorn-3.3.1/lib/unicorn/http_ser
@msp
msp / gist:2836613
Created May 30, 2012 14:18
webkit_debug
And I sign in with valid credentials # features/step_definitions/user_steps.rb:91
private method `puts' called for {:socket_class=>Capybara::Driver::Webkit::SocketDebugger}:Hash (NoMethodError)
./features/step_definitions/user_steps.rb:51:in `sign_in'
./features/step_definitions/user_steps.rb:93:in `/^I sign in with valid credentials$/'
features/activities/activity.feature:72:in `And I sign in with valid credentials'
And I'm on step 1 # features/step_definitions/activity_steps.rb:143
And I input a "individual" provider with a name of "unique provider" # features/step_definitions/activity_steps.rb:159
And I should be on step 2 # features/step_definitions/activity_steps.rb:95
Then I input a basic activity # features/step_definitions/activity_steps.rb:231
And I should be on step 3 # features
@msp
msp / gist:2881448
Created June 6, 2012 11:51
webkit-debug trace
WARNING: `VCR.config { |c| c.stub_with ... }` is deprecated. Use `VCR.configure { |c| c.hook_into ... }` instead.
Using the default profile...
ENV['RAILS_ENV']: cucumber
Rails.env: cucumber
Feature: Activites
As a registered user
I want to be able to add activities
So I can share my activity
@javascript
@msp
msp / gist:2882082
Created June 6, 2012 14:11
webkit-debug trace (head)
Using the default profile...
WARNING: `VCR.config { |c| c.stub_with ... }` is deprecated. Use `VCR.configure { |c| c.hook_into ... }` instead.
ENV['RAILS_ENV']: cucumber
Rails.env: cucumber
Feature: Activites
As a registered user
I want to be able to add activities
So I can share my activity
@javascript
@msp
msp / gist:3017281
Created June 29, 2012 10:42
webkit-debug trace (without ifrmaes)
Using the default profile...
ENV['RAILS_ENV']: cucumber
Rails.env: cucumber
Feature: Activites
As a registered user
I want to be able to add activities
So I can share my activity
Background: # features/activities/activity.feature:6
Given the following venues exists: # factory_girl-3.3.0/lib/factory_girl/step_definitions.rb:111
@msp
msp / restart-phantom.rb
Created February 8, 2016 10:59
This is hacked from the link on line 1 and not really tested but, breadcrumbs! Stick in env.rb (Cukes) or spec_helper.rb
# https://github.com/ariya/phantomjs/issues/12234
CAPYBARA_TIMEOUT_RETRIES = 3
Around do |scenario, block|
CAPYBARA_TIMEOUT_RETRIES.times do |i|
begin
block.call
break
rescue => Capybara::Poltergeist::StatusFailError
puts("\nCapybara::Poltergeist::StatusFailError\n Restarting phantomjs and retrying...")
/**
* This sketch demonstrates how to use the <code>setOutputMixer</code>
* method of <code>Minim</code> in conjunction with the <code>getLineOut</code>
* method. By accessing the Mixer objects of Javasound, you can find one that
* corresponds to the output mixer of the sound device of your choice. You can
* then set this Mixer as the one that should use when creating an AudioOutput for you.
* This Mixer will also be used when obtaining outputs for AudioPlayers, AudioSamples,
* and any other classes that result in sound being ouput to your speakers.
* <p>
* This sketch uses controlP5 for the GUI, a user-contributed Processing library.
Horus:soundcard msp$ java -version
java version "1.8.0_66"
Java(TM) SE Runtime Environment (build 1.8.0_66-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.66-b17, mixed mode)
Horus:soundcard msp$ java MixerTest
----------
Audio Line
----------
interface SourceDataLine supporting format PCM_SIGNED 44100.0 Hz, 16 bit, stereo, 4 bytes/frame, little-endian
-----------------
ChangeStreamName uuid newName ->
let
select existingStream =
if existingStream.uuid == uuid then
{ existingStream | name = newName }
else
existingStream
in
-- Debug.log ("newName: " ++ newName ++ " uuid: " ++ uuid)
((List.map select streams), Cmd.none)