Skip to content

Instantly share code, notes, and snippets.

anonymous
anonymous / gist:508218
Created August 4, 2010 14:29
25 puts "\e[1m\e[34m ,%%%, \e[0m"
26 puts "\e[1m\e[34m ,%%%` %==-- \e[0m"
27 puts "\e[1m\e[34m ,%%`( '| \e[0m"
28 puts "\e[1m\e[34m ,%%@ /\_/ \e[0m"
29 puts "\e[1m\e[34m ,%.-\"\"\"--%%% \"@@__ \e[0m"
30 puts "\e[1m\e[34m %%/ |__`\ \e[0m"
31 puts "\e[1m\e[34m .%'\ | \ / // \e[0m"
32 puts "\e[1m\e[34m ,%' > .'----\ | [/ \e[0m"
33 puts "\e[1m\e[34m < <<` || \e[0m"
34 puts "\e[1m\e[34m `\\\ || \e[0m"
class QueryTracer < ActiveSupport::LogSubscriber
ACCEPT = %r{^(app|config|lib)}.freeze
FRAMES = 5
THRESHOLD = 300 # In ms
def sql(event)
return unless event.duration > THRESHOLD
callers = Rails.
backtrace_cleaner.
@protocool
protocool / caveatPatchor.js
Created February 14, 2011 02:29
Sample caveatPatchor.js file for use in Propane 1.1.2 and above
/*
As of version 1.1.2, Propane will load and execute the contents of
~Library/Application Support/Propane/unsupported/caveatPatchor.js
immediately following the execution of its own enhancer.js file.
You can use this mechanism to add your own customizations to Campfire
in Propane.
Below you'll find two customization examples.
##########################
### Regular Expression ###
##########################
# Ruby is very good at dissecting data. The reason for that is that Matz
# elected to not only include a mini language used for pattern matching, but
# more importantly to treat it as a first class citizen inside Ruby. This mini
# language is called Regular Expression.
# There are many advantages to learning to use Regular Expressions. Some tasks