Skip to content

Instantly share code, notes, and snippets.

@acook
acook / .gitignore
Last active August 29, 2015 13:56 — forked from gabetax/benchmark.rb
factorygirl*
new*
Gemfile.lock
@acook
acook / gist:9006975
Last active August 29, 2015 13:56 — forked from anonymous/gist:9006967
class TracJob
def initialize action, repo, rev
@action, @repo, @rev = action, repo, rev
end
attr :action, :repo, :rev, :failures
def run trac_projs
trac_projs.each do |project|
success = trac_admin_success? project
failures << tp unless success
@acook
acook / README.md
Last active December 24, 2015 23:19 — forked from smileart/README.md

My modified fork of agnoster.zsh-theme

A ZSH theme optimized for people who use:

  • Solarized
  • Git
  • Unicode-compatible fonts and terminals (I use iTerm2 + Menlo)

Compatibility

@acook
acook / pig_latin.py
Last active December 15, 2015 07:39 — forked from anonymous/gist:5224294
# Defining main variables for translator
pyg = 'ay'
original = raw_input('Enter a word:')
word = original.lower()
first = word [0]
#Beginning of if/else statements
if len(original) > 0 and original.isalpha():
@acook
acook / irb.rb
Created February 7, 2013 00:29 — forked from bkudria/irb.rb
LazyStruct.new({:a=>1, :b => 2}).a # => 2
# That's wrong. Why?
#
# = SuperStruct
#
# SuperStruct is an enhanced version of the Ruby Standard library <tt>Struct</tt>.
#
# Compared with the original version, it provides the following additional features:
# * ability to initialize an instance from Hash
# * ability to pass a block on creation
#
# You can read more at http://www.simonecarletti.com/blog/2010/01/ruby-superstruct/