- Authoring Ebooks: http://www.authoringebooks.com/
- Create Your Own Programming Language: http://createyourproglang.com/
- Exceptional Ruby: http://exceptionalruby.com/
- JavaScript Performance Rocks: http://javascriptrocks.com/performance/
- Redmine Tips: http://www.redminetips.com/
- The SPDY Book: http://spdybook.com/
- Rails 3 Upgrade Handbook: http://www.railsupgradehandbook.com/
- Refactoring Redmine: http://www.refactoringredmine.com/book/
- Bootstrapping Design: http://bootstrappingdesign.com/
- Recipes With Backbone:
This file contains hidden or 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 'rmagick' | |
| include Magick | |
| shredded = ImageList.new "TokyoPanoramaShredded.png" # the original source | |
| ROWS = shredded.rows # number of lines of pixes | |
| working = [] # a working array of images | |
| def strip_width | |
| 32 | |
| end |
Sublime Text 2 ships with a CLI called subl (why not "sublime", go figure). This utility is hidden in the following folder (assuming you installed Sublime in /Applications like normal folk. If this following line opens Sublime Text for you, then bingo, you're ready.
open /Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin/subl
You can find more (official) details about subl here: http://www.sublimetext.com/docs/2/osx_command_line.html
This file contains hidden or 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
| # add this to your spec helper | |
| RSpec.configure do |config| | |
| config.treat_symbols_as_metadata_keys_with_true_values = true | |
| config.filter_run :focus => true | |
| config.run_all_when_everything_filtered = true | |
| end | |
| # and then use the :focus tag in your specs | |
| it "does something awesome", :focus do |
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
This file contains hidden or 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
| def m(*args) | |
| print "Args to m: ", args.inspect, " Result: " | |
| 120 | |
| end | |
| n = 6 | |
| o = 2 | |
| # Imagine using a language where whitespace is significant? Pah! | |
This file contains hidden or 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' | |
| require 'rack' | |
| class Object | |
| def webapp | |
| class << self | |
| define_method :call do |env| | |
| func, *attrs = env['PATH_INFO'].split('/').reject(&:empty?) | |
| [200, {}, send(func, *attrs)] | |
| end |
This file contains hidden or 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
| ################## | |
| # Original issue # | |
| ################## | |
| [11:05] > bundle exec rake spec | |
| (in [snip]) | |
| /Users/max/.rvm/rubies/jruby-1.5.3/bin/jruby -S bundle exec rspec [snip] | |
| /Users/max/.rvm/rubies/jruby-1.5.3/lib/ruby/site_ruby/1.8/rubygems.rb:777:in `report_activate_error': Could not find RubyGem bundler (>= 0) (Gem::LoadError) | |
| from /Users/max/.rvm/rubies/jruby-1.5.3/lib/ruby/site_ruby/1.8/rubygems.rb:211:in `activate' |
This file contains hidden or 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
| echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc | |
| . ~/.bashrc | |
| mkdir ~/local | |
| mkdir ~/node-latest-install | |
| cd ~/node-latest-install | |
| curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1 | |
| ./configure --prefix=~/local | |
| make install # ok, fine, this step probably takes more than 30 seconds... | |
| curl https://www.npmjs.org/install.sh | sh |
This file contains hidden or 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 Rails.version == '2.3.8' && Gem.available?('mongrel', Gem::Requirement.new('~>1.1.5')) && self.class.const_defined?(:Mongrel) | |
| # Pulled right from latest rack. Old looked like this in 1.1.0 version. | |
| # | |
| # def [](k) | |
| # super(@names[k] ||= @names[k.downcase]) | |
| # end | |
| # | |
| module Rack |