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
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 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
require 'open-uri' | |
require 'openssl' | |
req = URI.parse("https://gathercrm.com/internal/auth") | |
res = req.read( | |
:ssl_verify_mode => OpenSSL::SSL::VERIFY_NONE, | |
:http_basic_authentication => ["test", "pass"] | |
) |
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
#!/bin/sh | |
# Don't allow console.log() statements to be committed. | |
# | |
# Add to .git/hooks/pre-commit | |
# | |
# Note: jquery.js seems to always include 1 reference | |
# in a debugging section, that one can be safely | |
# ignored. 1 reference to console.log is cool |
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
Do you think it is a good idea to do downcase and a == or is there a better way? | |
def nbde_new_evaluation_result(nbde_evaluation) | |
letter = nbde_evaluation.part1_test_result.downcase | |
if letter == "p" | |
"Pass" | |
elsif letter == "f" | |
"Fail" | |
else | |
"Unknown" |
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
require 'rubygems' | |
# i dunno, what about it? |