This file contains hidden or 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
| module ActiveRecord | |
| module ConnectionAdapters | |
| class AbstractAdapter | |
| protected | |
| # Turn: | |
| # User Load (6.3ms) SELECT * FROM "users" | |
| # Into: | |
| # User Load /app/views/_partial.erb:27 (6.3ms) in `_app_views_partial_erb` SELECT * FROM "users" |
This file contains hidden or 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
| Gem::Specification.new do |s| | |
| # totally generic | |
| version_file = Dir['lib/*/{*/,}version.rb'].first | |
| s.name = version_file.split('/')[1..-2].join('-') | |
| s.files = `git ls-files`.split("\n") | |
| s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n") | |
| s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) } | |
| s.authors = `git shortlog -sn`.scan(/[^\d\s].*/) | |
| s.email = `git shortlog -sne`.scan(/[^<]+@[^>]+/) | |
| s.require_paths = ["lib"] |
This file contains hidden or 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
| Subject: RE: DPS Site Access | |
| No idea what you mean by script information, are you using a Mac? No Mac support for DPS. DPS | |
| requires Windows based systems with Internet Explorer 7 or 8. If you are using IE 8, you will | |
| have to change the zoom level to 150% (bottom right of IE8) from 100% for compatibility reasons. | |
| Remember only IE7 and 8 supported by DPS, No Firefox, Chrome, Safari, and pop up blocker must be | |
| turned off to access DPS and this is listed under TOOLS. |
This file contains hidden or 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
| #!/usr/bin/env ruby | |
| # | |
| # SHOW ME | |
| # Takes X pictures of you via your iSight, animates them, uploads them to CloudApp, and puts | |
| # the url in your clipboard | |
| # | |
| # This uses a bunch of projects to make the magic happen, mostly thanks | |
| # to Zach Holman: http://github.com/holman | |
| # | |
| # |
This file contains hidden or 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 hidden or 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
| #!/usr/bin/env ruby | |
| # Usage: | |
| # | |
| # $ campfire "Hello Everyone" | |
| # | |
| # You can also paste | |
| # | |
| # $ campfire -p "some code" | |
| # | |
| # You can also pipe into it |
This file contains hidden or 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
| user.go_to_zoo_and_see_the_penguins_and_get_a_snack_but_get_home_before_seven_because_its_a_school_night_and_hey_awesome_mom_made_brownies_but_theyre_still_cooling_so_we_cant_eat_them_yet_so_lets_watch_some_tv_until_daddy_gets_home_oh_I_think_i_hear_him_and_oh_no_i_think_hes_been_drinking_and_mommy_saw_lipstick_on_his_collar_and_NO_dont_hit_mommy_I_want_to_go_to_my_room_but_I_also_want_brownies |
This file contains hidden or 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 Intercession | |
| # Duh. | |
| VERSION = "3.0.0" | |
| def initialize app, behavior | |
| @app = app | |
| @behavior = behavior | |
| @after = @behavior.instance_methods.map(&:to_s).include? "after" | |
| end |