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
| set :application, 'zacstewart.com' | |
| set :repository, '[email protected]:zacstewart/zacstewart.com.git' | |
| set :scm, :git | |
| set :deploy_via, :copy | |
| set :branch, "master" | |
| set :copy_compression, :gzip | |
| set :use_sudo, false | |
| set :host, 'zacstewart.com' | |
| role :web, host |
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
| .VimballRecord | |
| .netrwhist | |
| .swp/ | |
| gvimrc | |
| vimrc |
| require 'digest/md5' | |
| def gfm(text) | |
| # Extract pre blocks | |
| extractions = {} | |
| text.gsub!(%r{<pre>.*?</pre>}m) do |match| | |
| md5 = Digest::MD5.hexdigest(match) | |
| extractions[md5] = match | |
| "{gfm-extraction-#{md5}}" | |
| end |
| _ = require 'underscore' | |
| module.exports = (robot) -> | |
| class Leaderboard | |
| constructor: -> | |
| robot.brain.once 'loaded', => | |
| robot.brain.data.leaderboard ?= {} | |
| @games = robot.brain.data.leaderboard.games ?= [] | |
| addGame: (winner, loser) -> | |
| @games.push |
| #!/usr/bin/env sh | |
| # This transforms the 13 answers to the WORKING column | |
| # into integers 0-12, 5 answers to MUSIC into 0-4, | |
| # normailizes LIST_OWN, and LIST_BACK into integer values | |
| # and drops rows with variations of "16+ hours" | |
| # (loses 2.623031698% of the data) | |
| INFILE=$1 | |
| sed -e " | |
| s/\"Employed 30+ hours a week\"/0/g; | |
| s/\"Employed 8-29 hours per week\"/1/g; |
| class AnonymousUser < User | |
| attr_accessible *ACCESSIBLE_ATTRS, :type, :token, as: :registrant | |
| def register(params) | |
| params = params.merge(type: 'User', token: nil) | |
| self.update_attributes(params, as: :registrant) | |
| end | |
| end |
| -----BEGIN PGP PUBLIC KEY BLOCK----- | |
| Version: GnuPG v1.4.15 (Darwin) | |
| mQINBFC7ikIBEAC/ps60Orp8iuX2CH3JD/VfjqPVVlqWBh40aa9dayMKTHRCHXLC | |
| hTttTcHKeCsLnvmIHqxCxNBJu18kgX6Vvrc2xFO8KHldFxpQOX2oCVVOrDm7Sfc/ | |
| eRk61Ey0KCGQca3gNjlYzWOvtYhvL0yMyA/VLQcBdgm5vlkDFaBzvbRmhUZx2sZ1 | |
| nzhW7dyTbGOf6TD101MS3otrVxy3Tx4cm5lBdMxvNwutgqtGy75AElzOHg9zZ6kk | |
| 4ZF2Ll76wHSQOgrLShIEu2ymQLoS+VwpZeA4ab4FoP1CqxQd3GYPa5dhe6EakDf8 | |
| XH+x3CncV/cO2gDIwqE/lZv2yq004yrHAO4bhia8ndTJboNIQvwJICjJy5WIgU4s | |
| MXs5YUZv8su4T1f95+xSSjEjfI6X2zA4WnekzCLUFfGHkr+KMOKUHRQIRVHOwP/X |
A while ago I hit a lull in my skill advancement as a Rails developer. I had long since learned to think of my resources as resources. I did my best to limit my controller actions the basic CRUD methods. I considered the "fat model, skinny controller" mantra to be sacrosanct. But I was still often finding myself going way out of my way to implement otherwise mundane features, for example sending mail after saving an object or adding a routine accept/reject to something.