Skip to content

Instantly share code, notes, and snippets.

@myronmarston
myronmarston / stack_overflow_debugger.rb
Created June 1, 2015 22:51
Stack overflow debugger (since Ruby doesn't provide the whole stack in this case)
max_stack_frames = 500
TooManyStackFrames = Class.new(StandardError)
TracePoint.new(:call) do |tp|
if caller.size >= max_stack_frames
raise TooManyStackFrames, "Stack has exceeded #{max_stack_frames} frames"
end
end.enable
@apeckham
apeckham / gist:8293865
Created January 7, 2014 02:40
ruby 1.9 hash syntax in rubymine
http://robots.thoughtbot.com/convert-ruby-1-8-to-1-9-hash-syntax
search = :([^ ]*)(\s*)=>
replace = $1:
@dergachev
dergachev / GIF-Screencast-OSX.md
Last active November 5, 2024 18:44
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application: