This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<h1>Resolve All favlet</h1> | |
<a href="javascript:(function(){ $('.toggle-resolved').click() })();">Resolve All (honeybadger)</a> | |
<ol> | |
<li>Drag into your browser's bookmark bar.</li> | |
<li>Click to mark all as resolved in Honeybadger.</li> | |
</ol> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rake' | |
shared_context 'rake' do | |
let(:task_name) { self.class.top_level_description } | |
subject(:task) { Rake::Task[task_name] } | |
before(:all) { Rails.application.load_tasks } | |
its(:prerequisites) { should include('environment') } | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'benchmark' | |
require 'natural_sort' | |
require 'naturally' | |
require 'natcmp' | |
require './lib/sort_authority' | |
require './lib/sort_authority/ext/enumerable' | |
require './sensible_sort' | |
ary = ['x 1'] * 100_000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class BlobGatherer | |
@@blobs = %w(foo bar baz qux) | |
def self.gather | |
@@blobs.shift | |
end | |
end | |
describe 'Before' do | |
context ':all' do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# | |
require 'yaml' | |
require 'librato/metrics' | |
hostname = `hostname`.strip | |
queue = Librato::Metrics::Queue.new | |
config = YAML::load_file(File.dirname(__FILE__) + '/metrics.yml') | |
Librato::Metrics.authenticate(config.fetch('username'), config.fetch('token')) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/user/bin/env ruby | |
require 'benchmark' | |
ary = [] | |
10000.times { | |
ary << rand(10000) | |
} | |
Benchmark.bm do |x| |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rspec/core/formatters/progress_formatter' | |
class TimestampFormatter < RSpec::Core::Formatters::ProgressFormatter | |
def example_started(example) | |
@last_start = Time.new | |
super(example) | |
end | |
def example_passed(example) | |
time_diff = Time.now - @last_start |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--colour --order rand |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Heh. | |
set nowrap | |
set regexp | |
set tabstospaces | |
set tabsize 2 | |
set autoindent | |
unset noconvert | |
## PHP syntax coloring | |
syntax "php" "\.php[2345s~]?$" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Expectation | |
{ | |
function __construct($value) { | |
$this->value = $value; | |
} | |
function toBe($expected) { | |
return $this->value === $expected; |