Skip to content

Instantly share code, notes, and snippets.

View mguterl's full-sized avatar

Mike Guterl mguterl

View GitHub Profile
@xaviershay
xaviershay / vegan-month.md
Created November 19, 2011 17:45
Vegan Month Curriculum

Vegan Month Logo

Back in Melbourne circa 2010/11, Jodie, Jared and I used to run a [monthly vegan mentoring group][vegan-month]. I have gone back through the mailing lists and collected much of the curriculum and information from the program into this single document, so that I can distribute it more widely. The program was designed not just to get you through the first month nutritionally, but to expose you to a variety of foods and ideas that may be new to you. It emphasises that veganism is a shift sideways, not a sacrifice.

Design By Committee

I clearly remember my first day at EdgeCase, over four years ago. I was new to Ruby, Rails, Vim, Agile, and -- more than anything -- pair programming. It was one of the most painful working days of my career. I was convinced I'd made a terrible decision. I was completely overwhelmed, my confidence was shot, and I dreaded coming in on day two. Of course it got much better. Over time I gained experience and confidence with Ruby, Rails, and Vim. I got comfortable with the continually evolving agile project flow at EdgeCase. Obviously, I fell in love with EdgeCase and the team I was a part of. But I never got used to

#! /usr/bin/env ruby
##
# three strategies of modeling metrics:
#
# SimpleMetric: one metric per record
#
# HashMetric: an array of metrics per record
#
@adambair
adambair / gist:1299611
Created October 19, 2011 20:46
pry is awesome.
# use instead of rails console
pry -r ./config/environment.rb
# for debugging in code put this anywhere:
binding.pry
# then check your console (rails server window) and type:
help
# win

Process vs. Friction

"Programmers hate process"

You've heard this mantra before, right? Don't bog programmers down in process, just let them get stuff done. Back when I lived in the corporate IT world, we would joke that any problem could be solved with more process. Indeed, at the time it seemed that was management's solution to everything.

But what does this statement even mean? It's started to grate on me because it

@practicingruby
practicingruby / 1_rcat_tests.rb
Last active September 27, 2015 15:47
Implementing a clone of UNIX cat in Ruby
# Task: Implement the rcat utility and get these tests to pass on a system
# which has the UNIX cat command present
# To see Gregory Brown's solution, see http://github.com/elm-city-craftworks/rcat
# Feel free to publicly share your own solutions
rrequire "open3"
working_dir = File.dirname(__FILE__)
gettysburg_file = "#{working_dir}/data/gettysburg.txt"
@adamlogic
adamlogic / trainer.md
Created October 16, 2011 15:39
So, I went to see a trainer...

A few weeks ago I decided I wanted to hire a personal trainer. The interaction did not go quite how I expected.


Me: So, I'm looking to get buff. I mean big changes. I want to turn heads when I take my shirt off. I've got a trip coming up in three months, so I need to start training as soon as possible.

Trainer: I can definitely help you with that!

$( document ).ready( function() {
var $body = $('body');
var setBodyScale = function() {
var scaleFactor = 0.35,
scaleSource = $body.width(),
maxScale = 600,
minScale = 30;
var fontSize = scaleSource * scaleFactor;
@ta
ta / unicornctl
Created September 9, 2011 18:46
unicornctl manages your app's unicorn server in an easy manner
#!/usr/bin/env ruby
require "getoptlong"
module UnicornCTL
class Controller
def initialize(args, argv)
@args = args
@argv = argv
end
# monkey-patch irb. see: http://jameskilton.com/2009/04/02/embedding-irb-into-your-ruby-application/
#
require 'irb'
module IRB # :nodoc:
def self.start_session(binding)
unless @__initialized
args = ARGV
ARGV.replace(ARGV.dup)
IRB.setup(nil)