This gist is part of a blog post. Check it out at:
http://jasonrudolph.com/blog/2011/08/09/programming-achievements-how-to-level-up-as-a-developer
| connection = Faraday::Connection.new('http://example.com') do |builder| | |
| builder.request :url_encoded # for POST/PUT params | |
| builder.adapter :net_http | |
| end | |
| # same as above, short form: | |
| connection = Faraday.new 'http://example.com' | |
| # GET | |
| connection.get '/posts' |
| http://coderwall.com/mdeiters.json | |
| http://coderwall.com/mdeiters.json&callback=someMethod |
| #!/usr/bin/env ruby | |
| # To use this: | |
| # * Set up the jshint Gem with your Rails app: https://github.com/liquid/jshint_on_rails | |
| # * Copy this file to [YOURPROJECT]/.git/hooks/pre-commit | |
| # * chmod 0755 .git/hooks/pre-commit | |
| files_changed = `git diff --name-only HEAD` | |
| if files_changed.any? { |line| line =~ %r|public/javascripts| } | |
| puts "Running jshint to check changes to javascript ..." |
This gist is part of a blog post. Check it out at:
http://jasonrudolph.com/blog/2011/08/09/programming-achievements-how-to-level-up-as-a-developer
| <a href="http://coderwall.com/mdeiters"> | |
| <img src="http://api.coderwall.com/mdeiters/endorsecount.png" /> | |
| </a> |
| image = Magick::Image.read(image_path).first | |
| gc = Magick::Draw.new | |
| gc.stroke('transparent') | |
| gc.fill('#202123') | |
| gc.pointsize('11') | |
| gc.font_family = "helvetica" | |
| gc.font_weight = Magick::BoldWeight | |
| gc.font_style = Magick::NormalStyle | |
| gc.text(x = 83, y = 14, text = user.endorsements.size.to_s) | |
| gc.draw(image) |
| match '/:username/endorsecount.png' => 'endorsements#show', :as => :user_endorsement |
| gem "rmagick", "2.12.0", :require => 'RMagick' |
| expires_in 1.minute, :public => true if Rails.env.production? | |
| if stale?(:etag => @user.endorsements.size, :last_modified => @user.updated_at.utc) | |
| #...image generation | |
| end |
Chances are your head's spinning right now. That accusation of bias caught you off guard, you got kind of defensive, and now all hell has broken loose. You're feeling attacked on all sides. You're a good person at heart, and having all these people treat you like the antichrist is pretty upsetting.
You need to say something, but you're probably not in the best headspace to write copy right now. So to help you along, here's my 100% guaranteed-or-you-money-back scandal defusement apology template: