Skip to content

Instantly share code, notes, and snippets.

Matt Spendlove msp

Block or report user

Report or block msp

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View autocomplete-remote.elm
module AC.AccessibleExample exposing (..)
import Autocomplete
import Html exposing (..)
import Html.Attributes exposing (..)
import Html.Events exposing (..)
import String
import Json.Decode as Decode exposing (field)
import Json.Encode as Encode
import Dom
View elm-message.elm
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)
View java_sound_mixer_test.log
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
-----------------
View msp_minim_io_test.pde
/**
* 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.
@msp
msp / restart-phantom.rb
Created Feb 8, 2016
This is hacked from the link on line 1 and not really tested but, breadcrumbs! Stick in env.rb (Cukes) or spec_helper.rb
View restart-phantom.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...")
@msp
msp / gist:3017281
Created Jun 29, 2012
webkit-debug trace (without ifrmaes)
View gist:3017281
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 / gist:2882082
Created Jun 6, 2012
webkit-debug trace (head)
View gist:2882082
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:2881448
Created Jun 6, 2012
webkit-debug trace
View gist:2881448
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
View gist:2836613
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 / unicorn-logrotate
Created May 19, 2011
Unicorn and logrotate
View unicorn-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
You can’t perform that action at this time.