Skip to content

Instantly share code, notes, and snippets.

html = <<-EOF
<html>
<body>
<table>
<tr>
<td>
One
<table><tr><td>Nested Cell</td></tr></table>
</td>
</tr>
require 'autotest/redgreen'
module Autotest::Growl
def self.notify(title, msg, img)
system("osascript ~/bin/growlNotify.scpt '#{title}' '#{msg.inspect}' '#{img}'")
end
Autotest.add_hook :ran_command do |at|
results = [at.results].flatten.join("\n")
# rpsec
@timcharper
timcharper / spec_helper.rb
Created June 17, 2009 07:33 — forked from rjharmon/spec_helper.rb
fixed version
require 'rubygems'
require 'spork'
ENV["RAILS_ENV"] ||= 'test'
Spork.prefork do
# Loading more in this block will cause your tests to run faster. However,
# if you change any configuration or code from libraries loaded here, you'll
# need to restart spork for it take effect.
@timcharper
timcharper / akka_streams_pitfalls_1.sc
Last active December 5, 2017 19:18 — forked from aludwiko/akka_streams_pitfalls_1.scala
Download this and run with ammonite
#!/usr/bin/env amm
import $ivy.`com.typesafe.akka::akka-stream:2.5.4`
import akka.Done
import akka.stream._
import akka.stream.scaladsl._
import scala.concurrent.Future
import scala.concurrent.ExecutionContext.Implicits.global
import scala.concurrent.duration._