This file contains hidden or 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
function supersay { | |
say -v princess '$1' & | |
say -v 'Agnes' $1 & | |
say -v 'Albert' $1 & | |
say -v 'Alex' $1 & | |
say -v 'Bad News' $1 & | |
say -v 'Bahh' $1 & | |
say -v 'Bells' $1 & | |
say -v 'Boing' $1 & | |
say -v 'Bruce' $1 & |
This file contains hidden or 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 Leader | |
attr_reader :count | |
attr_reader :actually_visited | |
def initialize | |
@count = 1 | |
@actually_visited = false | |
end | |
def respond_to_state(s) |
This file contains hidden or 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
def time(&block) | |
$breakpoints = [] | |
start = Time.now | |
yield | |
puts "----------------\n" | |
puts "Total time:" | |
puts "\t#{(Time.now - start).round(1)}s" | |
puts "Breakdown:" | |
$breakpoints.each.with_index do |(msg, t), i| | |
puts "\t#{(t-start).round(1)}s, breakpoint #{i} #{"(#{msg})" if msg}" |
This file contains hidden or 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 'time' | |
@default_root_dir = '~/code' # CHANGE THIS | |
def print_git_logs_since(date_str, root_directory) | |
logs_by_date_by_project = Hash.new{|h,k| h[k] = Hash.new{|h,k| h[k] =[]}} | |
root_directory ||= @default_root_dir |
This file contains hidden or 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
function cgrep { | |
local command="" | |
for var in "$@"; do | |
command+="grep $var | " | |
done | |
eval ${command% | } | |
} |
NewerOlder