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
#!/bin/bash | |
# Redirect output to stderr. | |
exec 1>&2 | |
egrep -r --exclude=spec/spec_helper.rb ":focus|focus:|fdescribe|fcontext|fit ['\"]" spec | |
if [[ $? == 0 ]]; then | |
echo "Thou must not :focus" | |
exit 1 | |
fi |
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 | |
# | |
# NOTE: Your version of OneBody must be 3.5.0 or higher for this to work. | |
# | |
# This is a very simple script you can use to automate syncing of data with OneBody. | |
# To use, first: | |
# | |
# gem install rest-client | |
# | |
# Then, edit the USER_EMAIL, USER_KEY, and URL constants just below. To get your USER_KEY, |
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 | |
print("\n (__)\n (uu)\n /-------\\/\n / | ||\n* ||----||\n ~~ ~~\n"); |
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
# run the specs when anything changes | |
watch('.*') do | |
cmd = IO.popen('rspec spec 2>&1') | |
print cmd.getc until cmd.eof? | |
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 'active_record' | |
require 'sqlite3' | |
require 'rspec' | |
ActiveRecord::Base.establish_connection( | |
adapter: 'sqlite3', | |
database: ':memory:' | |
) | |
ActiveRecord::Base.logger = Logger.new(STDOUT) |
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 | |
# A script to convert old Rails 1.x finder syntax, e.g. find(:all, ...) and find(:first, ...) | |
# to use where() and friends. | |
# gem install parser unparser | |
# cd path/to/rails_app | |
# ruby fix_find_by.rb | |
require 'parser/current' |
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
config.vm.provider :virtualbox do |vb| | |
vb.customize ["modifyvm", :id, "--memory", "2048"] | |
end | |
config.vm.network "private_network", type: "dhcp" | |
config.vm.synced_folder ".", "/vagrant", type: "nfs" |
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
// ==UserScript== | |
// @name GitHub Pull Request Enhancements | |
// @namespace http://tannermar.es | |
// @version 0.2 | |
// @description Add "Plus One" and "Retest" buttons to PR pages. Automatically add and remove "+1", "+2", and "NOT READY!" labels bast on comment contents. Included on all of github because pushState. | |
// @include https://github.com/* | |
// @copyright 2014+, @tannermares | |
// ==/UserScript== | |
var emojiPlusOnes = function() { |
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 | |
# A script to convert old dynamic finder syntax to new where+first and where+all. | |
# Used to do the grunt work for this PR: https://github.com/churchio/onebody/pull/63 | |
# gem install parser unparser | |
# cd path/to/rails_app | |
# ruby fix_find_by.rb | |
require 'parser/current' |
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 | |
# This is a crude script to convert MiniTest::Unit files to RSpec files. | |
# To use: | |
# | |
# cd path/to/your/railsapp | |
# gem install parser unparser | |
# ruby to_rspec.rb | |
# rspec spec --fail-fast | |
# |