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/sh | |
#set -x | |
PROG=$0 | |
# Install an updated rsync using homebrew with the instructions here: | |
# http://blog.jm3.net/2012/07/30/os-x-rsync | |
RSYNC="/usr/local/bin/rsync" | |
SRC="/" |
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 MetricsController < ApplicationController | |
before_filter :find_metric | |
respond_to :html, :json | |
def edit | |
if admin_signed_in? | |
@user = metric.user | |
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
# Using the aggregate gem (http://www.gemcutter.org/gems/aggregate), | |
# run the given block +num+ times and then print out the mean, min, | |
# max, std_dev, and histogram of the run duration. For example: | |
# | |
# irb> stats(100, 0, 10, 1) { sleep(rand / 100) } | |
# mean: 5.99ms | |
# min: 1.49ms | |
# max: 9.28ms | |
# stddev: 2.54ms | |
# value |------------------------------------------------------------------| count |