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
| class SalesController < ApplicationController | |
| include CsvMapper | |
| def csv_import | |
| results = CsvMapper.import(params[:dump][:file].original_filename) do | |
| map_to Sale | |
| after_row lambda{|row, sale| sale.save } | |
| start_at_row 1 | |
| [start_date, country] |
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
| OVERWRITE=true ADMIN_NAME=admin ADMIN_USERNAME=admin ADMIN_PASSWORD=eypass DATABASE_TEMPLATE=styled-blog.yml rake db:bootstrap |
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
| ** Invoke release (first_time) | |
| ** Execute release | |
| rake aborted! | |
| undefined method `grep' for "engineyard-serverside-adapter (1.4.0)\n":String | |
| /Users/danishkhan/Projects/engineyard/Rakefile:40:in `bump_serverside_adapter' | |
| /Users/danishkhan/Projects/engineyard/Rakefile:76:in `block in <top (required)>' | |
| /Users/danishkhan/.rvm/gems/ruby-1.9.2-p136@global/gems/rake-0.8.7/lib/rake.rb:636:in `call' | |
| /Users/danishkhan/.rvm/gems/ruby-1.9.2-p136@global/gems/rake-0.8.7/lib/rake.rb:636:in `block in execute' | |
| /Users/danishkhan/.rvm/gems/ruby-1.9.2-p136@global/gems/rake-0.8.7/lib/rake.rb:631:in `each' | |
| /Users/danishkhan/.rvm/gems/ruby-1.9.2-p136@global/gems/rake-0.8.7/lib/rake.rb:631:in `execute' |
- 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
| ☁ mongod | |
| mongod --help for help and startup options | |
| Mon Aug 8 12:52:57 [initandlisten] MongoDB starting : pid=15166 port=27017 dbpath=/data/db/ 64-bit | |
| Mon Aug 8 12:52:57 [initandlisten] db version v1.8.2, pdfile version 4.5 | |
| Mon Aug 8 12:52:57 [initandlisten] git version: 433bbaa14aaba6860da15bd4de8edf600f56501b | |
| Mon Aug 8 12:52:57 [initandlisten] build sys info: Darwin erh2.10gen.cc 9.6.0 Darwin Kernel Version 9.6.0: Mon Nov 24 17:37:00 PST 2008; root:xnu-1228.9.59~1/RELEASE_I386 i386 BOOST_LIB_VERSION=1_40 | |
| Mon Aug 8 12:52:57 [initandlisten] exception in initAndListen std::exception: dbpath (/data/db/) does not exist, terminating | |
| Mon Aug 8 12:52:57 dbexit: | |
| Mon Aug 8 12:52:57 [initandlisten] shutdown: going to close listening sockets... | |
| Mon Aug 8 12:52:57 [initandlisten] shutdown: going to flush diaglog... |
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
| ☁ rvm install ree | |
| Installing Ruby Enterprise Edition from source to: /Users/dkahn/.rvm/rubies/ree-1.8.7-2011.03 | |
| ree-1.8.7-2011.03 - #fetching (ruby-enterprise-1.8.7-2011.03) | |
| % Total % Received % Xferd Average Speed Time Time Time Current | |
| Dload Upload Total Spent Left Speed | |
| 100 7713k 100 7713k 0 0 2590k 0 0:00:02 0:00:02 --:--:-- 2605k | |
| ree-1.8.7-2011.03 - #extracting ruby-enterprise-1.8.7-2011.03 to /Users/dkahn/.rvm/src/ree-1.8.7-2011.03 | |
| ree-1.8.7-2011.03 - #installing | |
| ERROR: Error running './installer -a /Users/dkahn/.rvm/rubies/ree-1.8.7-2011.03 --no-tcmalloc --dont-install-useful-gems ', please read /Users/dkahn/.rvm/log/ree-1.8.7-2011.03/install.log | |
| ERROR: There has been an error while trying to run the ree installer. Halting the installation. |
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
| [2011-08-17 16:19:19] ./installer -a /Users/dkahn/.rvm/rubies/ree-1.8.7-2011.03 --no-tcmalloc --dont-install-useful-gems | |
| Welcome to the Ruby Enterprise Edition installer | |
| This installer will help you install Ruby Enterprise Edition 1.8.7-2011.03. | |
| Don't worry, none of your system files will be touched if you don't want them | |
| to, so there is no risk that things will screw up. | |
| You can expect this from the installation process: | |
| 1. Ruby Enterprise Edition will be compiled and optimized for speed for this | |
| system. |
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
| ☁ cat /Users/dkahn/.rvm/log/ree-1.8.7-2011.03/install.log | |
| [2011-08-17 16:47:01] ./installer -a /Users/dkahn/.rvm/rubies/ree-1.8.7-2011.03 --no-tcmalloc --dont-install-useful-gems | |
| Welcome to the Ruby Enterprise Edition installer | |
| This installer will help you install Ruby Enterprise Edition 1.8.7-2011.03. | |
| Don't worry, none of your system files will be touched if you don't want them | |
| to, so there is no risk that things will screw up. | |
| You can expect this from the installation process: | |
| 1. Ruby Enterprise Edition will be compiled and optimized for speed for this |
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 'feedzirra' | |
| require 'whenever' | |
| =begin | |
| Simple script to auto download new torrents from an RSS feed. | |
| You can then utilize whenever and create a cronjob to run the | |
| script at a specified interval. | |
| =end |
OlderNewer