Skip to content

Instantly share code, notes, and snippets.

View mguterl's full-sized avatar

Mike Guterl mguterl

View GitHub Profile

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.

@mguterl
mguterl / gist:6000062
Created July 15, 2013 13:47
Error when installing REE via RVM
$ cat /Users/michaelguterl/.rvm/log/ree-1.8.7-2012.02/1373895115_package_install_openssl098.log
[2013-07-15 09:31:55] requirements_osx_brew_libs_install
Error: No such keg: /usr/local/Cellar/openssl098
Error: No available formula for openssl098
There were package installation errors, make sure to read the log.
Check Homebrew requirements https://github.com/mxcl/homebrew/wiki/Installation
$ rvm --debug requirements ree
rvm_autolibs_flag=4
Installing requirements for osx, might require sudo password.
require 'mechanize'
module TumblrGateway
class Blog
def initialize(base_url)
@base_url = base_url
end
def author_for(post_id)
PostPage.new(post_url_for(post_id)).author_name
class Enumerator
def end?
peek
false
rescue StopIteration
true
end
end
enum = Enumerator.new { |yielder| yielder.yield 1; yielder.yield 2 }

#Council of Chiefs

9:00PM November 3, 2012

Camp Lazarus
4422 Columbus Pike
Delaware, OH 43015

Goal of the Meeting: To make decisions regarding the specifics of Conclave 2013

Which do you prefer and why?

Task contains enqueue_at an optional attribute that defines when (hour and minute) the job should be enqueued. If the attribute is not present, the current time should be used.

# tasks (id INT, enqueue_at DATETIME, action VARCHAR(255))
class Task < ActiveRecord::Base
end
class TripsController < ApplicationController
class Action < ApplicationController::Action
end
class New < Action
expose(:trip) { Trip.new(params[:trip]) }
end
class Create < New
def call
module Upsertable
def upsert_added!
@upsert_added = true
end
def upsert_added?
@upsert_added
end
def upsert_updated!
@mguterl
mguterl / latency.txt
Created February 12, 2013 12:42 — forked from jboner/latency.txt
Latency Comparison Numbers
--------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns
Send 1K bytes over 1 Gbps network 10,000 ns 0.01 ms
Read 4K randomly from SSD* 150,000 ns 0.15 ms
require "net/http"
module Blocking
module Sunspot
class Server < ::Sunspot::Rails::Server
def start
@started = Time.now