Skip to content

Instantly share code, notes, and snippets.

@proverbed
proverbed / gist:88fcdfa9c34ddb6afb504a03af22228d
Created October 6, 2017 05:39 — forked from learncodeacademy/gist:5f84705f2229f14d758d
Getting Started with Vagrant, SSH & Linux Server Administration
@proverbed
proverbed / mocha-guide-to-testing.js
Created September 23, 2017 10:59 — forked from samwize/mocha-guide-to-testing.js
Explain Mocha's testing framework - describe(), it() and before()/etc hooks
// # 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()
// 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
@proverbed
proverbed / fix-rabbitmq-after-disk-space-full.markdown
Created January 28, 2017 16:25 — forked from christopher-hopper/fix-rabbitmq-after-disk-space-full.markdown
How to recover RabbitMQ after running out of disk space

If RabbitMQ wont start and show the following in the startup logs:

# cat  /var/log/rabbitmq/startup_log


BOOT FAILED
===========
@proverbed
proverbed / mongodbcheats.js
Created October 12, 2016 06:40 — forked from kgorman/mongodbcheats.js
MongoDB cheat sheet
/* 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
/**
* 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));
}
/**