This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
########################## | |
### 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |