Skip to content

Instantly share code, notes, and snippets.

View hadees's full-sized avatar

Evan Alter hadees

  • inKind
  • Austin, TX
View GitHub Profile
@hadees
hadees / gist:7308571
Last active December 27, 2015 10:09 — forked from ericboehs/gist:7125105
Poltergeist hack to silence CoreText performance notes from phantomjs that works with billy.
module Capybara::Poltergeist
class Client
private
def redirect_stdout
prev = STDOUT.dup
prev.autoclose = false
$stdout = @write_io
STDOUT.reopen(@write_io)
prev = STDERR.dup
@hadees
hadees / proxy.pac
Last active December 23, 2015 12:18
// proxy.pac
function FindProxyForURL(url, host) {
if (shExpMatch(host, "*.dev")) {
return "PROXY local:3000";
}
if (shExpMatch(host, "dev")) {
return "PROXY local:3000";
}
return "DIRECT";
}
@hadees
hadees / gist:3758552
Created September 20, 2012 21:46
Youtube VPAID
<?xml version="1.0" encoding="UTF-8"?>
<VAST version="2.0">
<Ad id="preroll-1">
<InLine>
<AdSystem>2.0</AdSystem>
<AdTitle>5773100</AdTitle>
<Creatives>
<Creative>
<Linear>
<Duration>00:00:01</Duration>
@hadees
hadees / Module
Created July 19, 2012 19:02
Observer
module OverAchievement
def level_up(level, *args, &block)
options = args.extract_options!
options[:on] = options[:on].to_a
options[:on].each do |callback|
defined_levels[callback] ||= []
defined_levels[callback] << block
end