Skip to content

Instantly share code, notes, and snippets.

View rondale-sc's full-sized avatar

Jonathan rondale-sc

  • Providence, Rhode Island
View GitHub Profile
require 'funkify'
require 'pry'
class MyFunkyClass
include Funkify
def add(x, y)
x + y
end

Show and tell:

  • Jonathan Jackson - funkify ( a quick way to get unix style left-to-right method composition) https://gist.github.com/9553817

  • Vic Ramon - Hspec (rspec style syntax for Haskell) http://hspec.github.io/

  • Matt Polito - Arel is cool (you can compose multiple arel queries to set precedence manually)

set listchars=tab:\ \ ,trail:␣,extends:⇉,precedes:⇇,nbsp:·
World(Module.new do
def wait_for_ajax
wait_until_script '$.active == 0'
end
def wait_until_script script, wait=Capybara.default_wait_time
Timeout::timeout wait do
sleep 0.2 until page.evaluate_script <<-JS
typeof($) == 'function' && #{script}
JS

Jonathan Jackson

Update on barberpoll (side project). Now with permissive / non-permissive voting:

barber-poll

Chase McCarthy

Talked about parametric modelling and provided a demo using 3js and backbone. Demo not available, yet

Micah Cooper

Took thirty seconds to show us that you can send multiple arguments to capybara's have_content and it will assert on each argument. Showed how he splatted an array of values to have_content

Jonathan Jackson

www.barber-poll.com here - Showing how to integrate node.js / redis / rails to get realtime communication in your app

Gabriel Reis

Using cucumber rerun to write failed feature files to a file taht can be rerun with @rerun.txt

cucumber -f rerun --out rerun.txt
class Bob
def hey(message)
Communication.when(message)
.on_yelling { 'Woah, chill out!' }
.on_asking { 'Sure.' }
.on_ticking_me_off { 'Fine. Be that way!' }
.else { 'Whatever.' }
.answer
end
end

Jonathan Jackson

Went through a exceedingly unnecessary version of the Bob exercism.io exercise. Can be found here

Micah Woods

Covered his next blog post about Module#prepend. You can view the end result of his work with Paulo on this topic here

Chase McCarthy

Watcher.prototype.myCB = function(){
this.current.then(function(hash) {
if (this.options.verbose) {
printSlowTrees(hash.graph)
}
this.emit('change', hash)
}.bind(this), function(error) {
this.emit('error', error)
}.bind(this))
}
function _treeChanged(){
this.current.then(function(hash) {
if (this.options.verbose) { printSlowTrees(hash.graph) }
this.emit('change', hash)
}.bind(this), function(error) {
this.emit('error', error)
}.bind(this))
}
Watcher.prototype.check = function() {