- MapReduce is a two step process
- reduce function takes output of maps and collections and aggregates then gives you it in a collection
- http://www.mongodb.org/display/DOCS/MapReduce
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
| TestRocket is a simple, tiny testing library for Ruby 1.9. | |
| If => in a hash is a "hash rocket", then +-> and --> for tests should be | |
| "test rockets"! | |
| Simple syntax: | |
| +-> { block that should succeed } | |
| --> { block that should fail } |
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
| # include this in app file | |
| # this is for Role Based Access Controle, can be much shorter | |
| class Ability | |
| include CanCan::Ability | |
| def initialize account | |
| @abilities ||= {} | |
| allow [:any, :manager, :manufacturer, :admin] do |
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
| TestRocket is a simple, tiny testing library for Ruby 1.9. | |
| If => in a hash is a "hash rocket", then +-> and --> for tests should be | |
| "test rockets"! | |
| Simple syntax: | |
| +-> { block that should succeed } | |
| --> { block that should fail } |
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
| machine github.com | |
| login technoweenie | |
| password SECRET | |
| machine api.github.com | |
| login technoweenie | |
| password SECRET |
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
| $:.unshift(File.expand_path('./lib', ENV['rvm_path'])) | |
| require "rvm/capistrano" | |
| set :application, "my_app" | |
| set :repository, "git@trunksapp.com:myuser/myapp.git" | |
| set :branch, "production" | |
| set :rvm_ruby_string, "1.9.2" | |
| set :deploy_to, "/var/applications/" | |
| set :user, "username" |
-
The new rake task assets:clean removes precompiled assets. [fxn]
-
Application and plugin generation run bundle install unless
--skip-gemfileor--skip-bundle. [fxn] -
Fixed database tasks for jdbc* adapters #jruby [Rashmi Yadav]
-
Template generation for jdbcpostgresql #jruby [Vishnu Atrai]
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
| #!/bin/sh -x | |
| # git name-rev is fail | |
| CURRENT=`git branch | grep '\*' | awk '{print $2}'` | |
| git checkout master | |
| git pull --rebase origin master | |
| git checkout ${CURRENT} | |
| git rebase master |
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 'net/http' | |
| require 'json' | |
| ### | |
| # Stupid simple class for uploading to imgur. | |
| # | |
| # client = Imgur2.new 'my imgur key' | |
| # p File.open(ARGV[0], 'rb') { |f| | |
| # client.upload f | |
| # } |