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
[remote "fast"] | |
url = git@heroku.com:capetimes-fast.git | |
fetch = +refs/heads/*:refs/remotes/capetimes-fast/* |
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
Controller action expecting certain input. | |
In case the input is not provided, the first version will fail with a 500 exception, | |
a stack trace and an airbrake notification. | |
But this is just invalid input and not an error for us to care about. | |
Instead, like the second version, it should just return nothing and a status code | |
400 (Bad Request), effectively telling the user agent, that | |
1) This is your fault, your URL / input data is wrong |
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
#! env bash | |
EXCLUDED='(master|staging)$' | |
# This has to be run from master | |
git checkout master | |
# Update our list of remotes | |
git fetch | |
git remote prune origin |
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 A | |
LAMB1 = lambda{ do_it } | |
LAMB2 = proc{ do_it } | |
def do_it | |
puts "AAA" | |
end | |
end | |
class B |
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
Encoding::CompatibilityError: incompatible character encodings: ASCII-8BIT and UTF-8 | |
from /Users/aljoscha/.rvm/gems/ruby-1.9.3-p392/gems/net-ssh-2.6.7/lib/net/ssh/buffer.rb:284:in `block in write' | |
from /Users/aljoscha/.rvm/gems/ruby-1.9.3-p392/gems/net-ssh-2.6.7/lib/net/ssh/buffer.rb:284:in `each' | |
from /Users/aljoscha/.rvm/gems/ruby-1.9.3-p392/gems/net-ssh-2.6.7/lib/net/ssh/buffer.rb:284:in `write' | |
from /Users/aljoscha/.rvm/gems/ruby-1.9.3-p392/gems/net-ssh-2.6.7/lib/net/ssh/buffer.rb:322:in `block in write_string' | |
from /Users/aljoscha/.rvm/gems/ruby-1.9.3-p392/gems/net-ssh-2.6.7/lib/net/ssh/buffer.rb:319:in `each' | |
from /Users/aljoscha/.rvm/gems/ruby-1.9.3-p392/gems/net-ssh-2.6.7/lib/net/ssh/buffer.rb:319:in `write_string' | |
from /Users/aljoscha/.rvm/gems/ruby-1.9.3-p392/gems/net-ssh-2.6.7/lib/net/ssh/buffer.rb:55:in `block in from' | |
from /Users/aljoscha/.rvm/gems/ruby-1.9.3-p392/gems/net-ssh-2.6.7/lib/net/ssh/buffer.rb:47:in `step' | |
from /Users/aljoscha/.rvm/gems/ruby-1.9.3-p392/gems/net-ssh-2.6.7/lib/ |
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
// Released under MIT license: http://www.opensource.org/licenses/mit-license.php | |
$('[placeholder]').focus(function() { | |
var input = $(this); | |
if (input.val() == input.attr('placeholder')) { | |
input.val(''); | |
input.removeClass('placeholder'); | |
} | |
}).blur(function() { | |
var input = $(this); |
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
2013-01-13T23:58:04+00:00 app[web.1]: Started GET "/dashboard/" for 78.52.196.102 at 2013-01-13 23:58:04 +0000 | |
2013-01-13T23:58:04+00:00 app[web.1]: | |
2013-01-13T23:58:04+00:00 app[web.1]: NoMethodError (undefined method `formats' for "index":String): | |
2013-01-13T23:58:04+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.11/lib/action_view/renderer/template_renderer.rb:14:in `render' | |
2013-01-13T23:58:04+00:00 app[web.1]: vendor/bundle/ruby/1.9.1/gems/actionpack-3.2.11/lib/action_view/renderer/renderer.rb:36:in `render_template' |
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
if (node[:scalarium][:instance][:roles] & %w(rails-app media-encoding)).any? |
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
if node[:scalarium][:instance][:roles].any?{|role| %w(rails-app media-encoding).include?(role) } |
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
@saved_referer ||= params.get(:to) || session.delete(:return_to_after_login) || request.referer |