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
| working_directory '/data/myapp/current/' | |
| worker_processes 16 | |
| listen '/var/run/engineyard/unicorn_myapp.sock', :backlog => 1024 | |
| timeout 60 | |
| pid "/var/run/engineyard/unicorn_myapp.pid" | |
| # Based on http://gist.github.com/206253 | |
| logger Logger.new("log/unicorn.log") |
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
| > db.currentOp() | |
| { | |
| "inprog" : [ | |
| { | |
| "opid" : 101690, | |
| "active" : false, | |
| "lockType" : "read", | |
| "waitingForLock" : true, | |
| "op" : "getmore", | |
| "ns" : "?ocal.oplog.$main", |
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
| db.currentOp() | |
| { | |
| "inprog" : [ | |
| { | |
| "opid" : 242886, | |
| "active" : true, | |
| "lockType" : "write", | |
| "waitingForLock" : false, | |
| "secs_running" : 893, | |
| "op" : "query", |
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
| m/r overview: | |
| map: break date/value into various time buckets (multiple emits)... retrieve values from collectionA | |
| reduce: merge key and each item into key => array of values | |
| finalize: search to see if stored calc already exists in collectionB... if so, use some of that meta-data. populate a hash, run calculations for each key, and then insert/upsert into collectionB | |
| Failing test: | |
| ruby acceptance test | |
| 6 threads: |
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
| > db.data_points.find({ sensor_id: 247, faulty: { $ne: true }, orig_relative_time: { $lte: new Date(1299305991280) }, deleted_at: { $exists: false } }).sort({ orig_relative_time: -1 }).limit(-1).explain() | |
| { | |
| "cursor" : "BtreeCursor orig_relative_time_-1_sensor_id_-1", | |
| "nscanned" : 11859, | |
| "nscannedObjects" : 11859, | |
| "n" : 11859, | |
| "millis" : 1896, | |
| "indexBounds" : { | |
| "orig_relative_time" : [ | |
| [ |
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 OnDestroyMiddleware | |
| def initialize(app, env) | |
| @app = app | |
| end | |
| def call(env) | |
| env["config"].vm.provisioners.each do |provisioner| | |
| env.ui.info "Attempting to remove client #{provisioner.config.node_name}" | |
| `knife client show #{provisioner.config.node_name}` | |
| if $?.to_i == 0 |
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 [](key) | |
| @current_nesting_level << key | |
| # We set this to so that we can cope with ||= as a setting. | |
| # See the comments in []= for more details. | |
| @has_been_read = true | |
| # If we have a set type, our destiny is to write | |
| if @set_type | |
| a_value = @set_type == :automatic ? value_or_descend(current_automatic, key, auto_vivifiy_on_read) : nil |
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
| window.myApp = window.myApp || {}; | |
| (function( myApp, undefined ) { | |
| var require, define; | |
| (function () { | |
| //wrap require.js in our namespace! | |
| var version = "0.24.0"......... | |
| }()); | |
| myApp.require = require; |
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
| $ knife search node "name:i-2f525a41" -l | |
| 1 items found | |
| Node Name: i-2f525a41 | |
| Environment: development | |
| FQDN: | |
| IP: | |
| Run List: | |
| Roles: | |
| Recipes |