If RabbitMQ wont start and show the following in the startup logs:
# cat /var/log/rabbitmq/startup_log
BOOT FAILED
===========
| /** | |
| * Sugar for has(int, isAssignableFrom(Class)). | |
| * | |
| * Example: onView(rootView).check(has(3, EditText.class); | |
| */ | |
| public static ViewAssertion has(final int expectedCount, Class<? extends View> clazz) { | |
| return has(expectedCount, isAssignableFrom(clazz)); | |
| } | |
| /** |
| /* MongoDB cheat sheet */ | |
| // replication lag via serverStatus() | |
| db._adminCommand( { serverStatus : 1 , repl ; 2 } ) | |
| // stats | |
| db.stats() | |
| db.foo.stats() | |
| // size of BSON of some query |
If RabbitMQ wont start and show the following in the startup logs:
# cat /var/log/rabbitmq/startup_log
BOOT FAILED
===========
| // Node.js CheatSheet. | |
| // Download the Node.js source code or a pre-built installer for your platform, and start developing today. | |
| // Download: http://nodejs.org/download/ | |
| // More: http://nodejs.org/api/all.html | |
| // 0. Synopsis. | |
| // http://nodejs.org/api/synopsis.html |
| // # Mocha Guide to Testing | |
| // Objective is to explain describe(), it(), and before()/etc hooks | |
| // 1. `describe()` is merely for grouping, which you can nest as deep | |
| // 2. `it()` is a test case | |
| // 3. `before()`, `beforeEach()`, `after()`, `afterEach()` are hooks to run | |
| // before/after first/each it() or describe(). | |
| // | |
| // Which means, `before()` is run before first it()/describe() |
###Let's install Vagrant###
###Select a Vagrant Box from https://vagrantcloud.com###
#add it to your list of boxes
vagrant box add hashicorp/precise32
#create a new folder for your project & init vagrant
| #!/bin/sh | |
| # Redirect output to stderr. | |
| exec 1>&2 | |
| # enable user input | |
| exec < /dev/tty | |
| consoleregexp='debugger\|console.log\|.only' | |
| # CHECK | |
| if test $(git diff --cached | grep $consoleregexp | wc -l) != 0 | |
| then |
using mocha/chai/sinon for node.js unit-tests? check out my utility: mocha-stirrer to easily reuse test components and mock require dependencies