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 trace(fun): | |
| def decorated(*args, **kwargs): | |
| import traceback | |
| print '-' * 20 | |
| print repr(fun), "\n" | |
| print "args=", repr(args), "kwargs=", repr(kwargs) | |
| traceback.print_stack() | |
| print '-' * 20 | |
| return fun(*args, **kwargs) | |
| return decorated |
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
| import warnings | |
| def fxn(): | |
| warnings.warn("deprecated", DeprecationWarning) | |
| with warnings.catch_warnings(): | |
| warnings.filterwarnings('ignore', category=DeprecationWarning) | |
| fxn() |
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
| Blaze.getView($("div.now-view")[0])._templateInstance.currentAction.get() |
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
| # Example Docker Cloud Stackfile | |
| # app | |
| app: | |
| image: 'jshimko/todos:latest' | |
| environment: | |
| - 'MONGO_URL=mongodb://appUser:appUserPass@mongo1:27017,mongo2:27017/dbName?replicaSet=repSetName' | |
| - 'MONGO_OPLOG_URL=mongodb://appUser:appUserPass@mongo1:27017,mongo2:27017/local?authSource=dbName' | |
| - 'ROOT_URL=http://example.com' | |
| links: |
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
| profiler = require('v8-profiler') | |
| profiler.startProfiler() | |
| profile = profiler.stopProfiler() | |
| profile.export().pipe(fs.createWriteStream('profile.json')).on('finish', function() { profile.delete(); }); |
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/bash | |
| # | |
| # This script will convert a Meteor application into a Node.js application | |
| # then deploy it to AWS Elastic Beanstalk. | |
| # | |
| # Run like `deploy_aws.sh my_eb_app my_eb_app-production`. | |
| # | |
| # That will deploy the Meteor application containing this script | |
| # to the `my_eb_app-production` environment of the `my_eb_app` EB application. |
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
| function InvalidSetException(message) { | |
| this.message = message | |
| } | |
| function DateRange(lower, upper) { | |
| this.empty = false; | |
| this.lower = lower; | |
| this.upper = upper; | |
| if (this.lower) { | |
| this.lower = this.lower.clone(); |
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
| /* eslint-env browser, serviceworker */ | |
| self.addEventListener('error', function (event) { | |
| logError(event.error) | |
| }) | |
| self.addEventListener('unhandledrejection', function (event) { | |
| let { reason, detail } = event | |
| if (!reason && detail) { | |
| reason = detail.reason | |
| } |
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
| 2017-08-31T21:42:21.245+0000 I CONTROL [initandlisten] MongoDB starting : pid=68530 port=9001 dbpath=/private/var/folders/sr/45xc_4j93svghrd2mcxsx0vr0000gn/T/meteor-test-run66k341.s0sym/.meteor/local/db 64-bit host=jbb-imac.local | |
| 2017-08-31T21:42:21.245+0000 I CONTROL [initandlisten] db version v3.2.15 | |
| 2017-08-31T21:42:21.245+0000 I CONTROL [initandlisten] git version: e11e3c1b9c9ce3f7b4a79493e16f5e4504e01140 | |
| 2017-08-31T21:42:21.245+0000 I CONTROL [initandlisten] allocator: system | |
| 2017-08-31T21:42:21.245+0000 I CONTROL [initandlisten] modules: none | |
| 2017-08-31T21:42:21.245+0000 I CONTROL [initandlisten] build environment: | |
| 2017-08-31T21:42:21.245+0000 I CONTROL [initandlisten] distarch: x86_64 | |
| 2017-08-31T21:42:21.245+0000 I CONTROL [initandlisten] target_arch: x86_64 | |
| 2017-08-31T21:42:21.245+0000 I CONTROL [initandlisten] options: { net: { bindIp: "127.0.0.1", port: 9001 }, replication: { oplogSizeMB: 8, replSet: "meteor" }, storage: { dbPath: "/private/var/folders/sr/45xc_4j93svghrd2mcxsx0vr000 |
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
Show hidden characters
| { | |
| "env": { | |
| "meteor:coverage": { | |
| "plugins": ["istanbul"] | |
| } | |
| } | |
| } |