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
## The quick-and-nasty CVE-2013-0156 Heroku inspector! | |
## Originally brought to you by @elliottkember with changes by @markpundsack @ Heroku | |
## Download and run using: | |
## ruby heroku-CVE-2013-0156.rb | |
apps = `heroku list 2> /dev/null`.split("\n") | |
apps = apps.map {|app| | |
case app.strip | |
when /^===/ | |
# Some "heroku apps" lines have === formatting for grouping. They're not apps. |
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
$form.fileupload | |
dataType: "json" | |
done: (e, data) -> | |
result = if data.result? | |
# XHR (as used by, say, Chrome) gives you a simple JSON object | |
data.result | |
else | |
# iframe (as used by IE) gives you text back that you'll want to parse manually) | |
# Urgh. UTF8 value (passed by Rails form) causes JSON to fall over. Crappy solution on next line. | |
data = JSON.stringify(data).replace(/"name":"utf8","value":"[^"]*"/, '"name":"utf8","value":"REMOVED"') |
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" |