Skip to content

Instantly share code, notes, and snippets.

View josephwilk's full-sized avatar
💭
💻 🎨 🎵

Joseph Wilk josephwilk

💭
💻 🎨 🎵
View GitHub Profile
@josephwilk
josephwilk / gist:4452758
Last active December 10, 2015 15:09
Detect "dead code" or "delete me" in comments.
grep -irIsE '#[[:space:]]*[[:alpha:][:digit:]]' $(find . | grep .rb) | grep -iIsE 'dead[[:space:]]*code|delete[[:space:]]*me' | wc -l
["samples","instruments","experiments", "log", "shaderview"].each{|f| load"/Users/josephwilk/Workspace/repl-electric/live-coding-space/lib/#{f}.rb"}; _=nil
shader :shader, "voc.glsl", "bits.vert", "points", 15000
shader :iMotion, 0.011
shader :iStarLight, 0.1
shader :iSpaceMotion, 0.0
live_loop :percussion do
# sync :warmup
live_loop :melody do
with_fx :level, amp: 0.0 do
sync :organ
use_synth :pretty_bell
sample Organic[/kick/,0], amp: 1.0
with_fx :pitch_shift, mix: 1.0, window_size: 0.1, damp_slide: 1.0 do
sample Organic[/loop/,[0,0,0,1]].tick(:perc), beat_stretch: 8
with_fx :reverb, room: 1.0 do |r_fx|
with_fx :distortion, mix: 0.15 do
#s = play scale(:Fs3, :minor_pentatonic).choose, cutoff: 100, env_curv: 3, note_slide: 0.05, decay: 8
@josephwilk
josephwilk / first_feature.feature
Created November 28, 2012 20:24 — forked from pipmossop/first_feature
first feature
Feature: Member joins a local community
In order to easily limit the items I buy and sell # WHY? Whats the value?
As a member
I want to join a local trading community
Background:  
Given I have installed the Retrade app
And I am on the join a community page
Scenario: Allow access to browser location
@josephwilk
josephwilk / gist:3620978
Created September 4, 2012 13:04
Example information provided by various dictionaries relating to the word "young"
WORD "young"
SYLLABLES ("young")
SOUNDS ("y" "uh" "ng")
SYLLASOUNDS (("y" "uh" "ng"))
STRESS 1
RHYME ("uh" "ng")
RHYTHM (1)
beep:
YOUNG y ah ng
@josephwilk
josephwilk / emr.py
Created June 11, 2012 16:23
Wrapper around elastic-mapreduce to make it easier to use
#!/usr/bin/env python
EMR_COMMAND = os.path.expanduser('~/elastic-mapreduce/elastic-mapreduce')
EMR_LOGGING_DIR = "s3://songkick/emr-logs"
def create_pig_job_flow(pigscript, num_instances=1, extraArguments=[]):
jobname = "Pig_Daily_" + datetime.datetime.now().strftime('%Y%m%d-%H%M%S')
print "Creating pig job flow", jobname, pigscript
args = [EMR_COMMAND,
"--create",
feature_file = ARGV[0]
changes = `git log --oneline #{feature_file}`
puts "#{feature_file} changed: #{changes.split("\n").length}"
require 'rubygems'
begin
require 'cucumber'
require 'cucumber/rake/task'
Cucumber::Rake::Task.new(:features) do |t|
t.cucumber_opts = "--format pretty"
end
task :features => 'db:test:prepare'
rescue LoadError

Testing outside of the Ruby world

Abstract

Ruby has a thriving testing ecosystem which is leading the way in many ways. But innovation in testing is not limited by language. Lots of interesting ideas are evolving from outside our comfy red world. It’s time we expanded our horizons and learned about some of the testing ideas evolving around other languages. Come to be inspired by new ideas, see how language changes the way we think about testing and discover what life is like in other testing lands.

Details

Joseph Wilk will take a tour of the testing tools and ideas that are evolving around different languages. Looking across a wide range of test types such as performance, acceptance and unit tests. We will examine some of the testing tools in languages like Clojure, Scala, Haskell, Javascript, Java and Python. Looking at new ideas and how the structure of the language effects the way we approach testing. Looking at tools for testing UIs through logs, Java plugins integrated with IDEs which pro

Scenario: Old example with cucumber.yml
Given a standard Cucumber project directory structure
And a file named "features/sample.feature" with:
"""
Feature: Sample
Scenario: this is a test
Given I am just testing stuff
"""
And a file named "features/support/env.rb"
And a file named "features/support/super_env.rb"