Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am mcary on github.
  • I am marcelcary (https://keybase.io/marcelcary) on keybase.
  • I have a public key whose fingerprint is DDC0 A91F A810 E486 3D24 C5EB B6DB D8C8 C65C B985

To claim this, I am signing this object:

@mcary
mcary / slider-screenshot.png
Last active December 24, 2015 10:39
Screenshot of Heroku console with missing Dyno sliders for web and worker processes
I encountered this state of the heroku console just now after finding my web app down. When it came back, the sliders showed zero web workers and my app was still down.
@mcary
mcary / bfs.rb
Created February 26, 2013 05:36
Breadth-first search of memprof heap dump
require 'progressbar'
require 'shellwords'
require 'json'
require 'active_support/core_ext/hash/keys'
require 'set'
require 'thread' # queue
def main
objs = load_objs
$objs = objs
@mcary
mcary / gist:1020737
Created June 11, 2011 16:43
Lexical and dynamic scoping in Ruby
# Within the context of a single instance, instance variables have dynamic
# scoping semantics. But local variables do not; they are lexically scoped.
class DynamicScopingExample
def some_method
@x = :foo
some_other_method
end
def some_other_method
@x