Skip to content

Instantly share code, notes, and snippets.

Avatar

Tim Harper timcharper

View GitHub Profile
@timcharper
timcharper / akka_streams_pitfalls_1.sc
Last active Dec 5, 2017 — forked from aludwiko/akka_streams_pitfalls_1.scala
Download this and run with ammonite
View akka_streams_pitfalls_1.sc
#!/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._
View spec_helper.rb
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.
View .autotest
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
View hpricot_and_nokogiri.rb
html = <<-EOF
<html>
<body>
<table>
<tr>
<td>
One
<table><tr><td>Nested Cell</td></tr></table>
</td>
</tr>
You can’t perform that action at this time.