I hereby claim:
- I am kplawver on github.
- I am kplawver (https://keybase.io/kplawver) on keybase.
- I have a public key whose fingerprint is CF3C DF1D F19F 4783 F4C4 A779 C58F 5468 6FFC 6EBC
To claim this, I am signing this object:
class Object | |
def self.interesting_methods | |
self.public_methods.sort - Object.methods | |
end | |
def interesting_methods | |
self.public_methods.sort - Object.methods | |
end | |
end |
desc "Checks ruby syntax on all files" | |
task :syntax_check do | |
puts "#{Dir.pwd}" | |
current_dir = Dir.pwd | |
files = [] | |
["app", "config", "lib", "experiments", "spec"].each do |dir| | |
files = files + Dir.glob("#{current_dir}/#{dir}/**/*.rb") | |
end | |
puts "Testing #{files.length} files:" |
namespace :assets do | |
desc "Unsets the asset host, so it's not included in JS and CSS asset urls during precompile." | |
task :unset_asset_host => :environment do | |
ActionController::Base.asset_host = "" | |
end | |
Rake::Task["assets:precompile"].enhance(["assets:unset_asset_host"]) | |
end |
I hereby claim:
To claim this, I am signing this object:
# Running: ruby gitgc.rb and it'll do its thing. | |
# | |
# There's potentially a lot of output if you have a lot of directories | |
# and if you've never run git gc on them, it can take a while. | |
# | |
# Put the full paths of the directories where you keep git repos in the $STARTING_DIRS array: | |
# Example: | |
# $STARTING_DIRS = ["/Users/me/Documents/Projects"] | |
# | |
$STARTING_DIRS = [] |
INSERT PICTURE Kevin Lawver, President @ Rails Machine, is our guest author for this post.
Few things feel worst than rolling out a High Availability (HA) system, then regularly seeing that system collapse. For our team at Rails Machine, this failing HA system was MySQL Multi-Master Replication (MMM).
We've been searching for a MMM replacement for a while, and a few months ago, we made the switch to MariaDB + Galera Cluster for High Availability MySQL. Here's the full story: the reasons why MMM doesn't work, why Galera Cluster does work, and our production takeaways.
function killYahooToolbar() { | |
$("#eyebrow").remove(); | |
$("body").removeClass("with-eyebrow"); | |
} | |
killYahooToolbar(); |
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/strict.dtd"> | |
<!-- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" | |
"http://www.w3.org/TR/html4/strict.dtd"> --> | |
<HTML> | |
<HEAD> | |
<META HTTP-EQUIV="Refresh" CONTENT="0.1"> | |
<META HTTP-EQUIV="Pragma" CONTENT="no-cache"> | |
<META HTTP-EQUIV="Expires" CONTENT="-1"> | |
<TITLE></TITLE> | |
</HEAD> |
function paginateArray(arr,page_num,per_page) { | |
var i,r=[]; | |
if (arr.length < 1) { | |
return r; | |
} | |
if (per_page == undefined || per_page == null) { | |
per_page = 10; | |
} |
class FileCheckPlugin < Scout::Plugin | |
OPTIONS=<<-EOS | |
file: | |
default: ~ | |
name: File | |
notes: The file to check to make sure it exists. | |
EOS | |
def build_report |