using mocha/chai/sinon for node.js unit-tests? check out my utility: mocha-stirrer to easily reuse test components and mock require dependencies
// Generate Certificate | |
docker run -it --rm -p 443:443 -p 80:80 --name letsencrypt \ | |
-v "/Users/iolufemi/workspace/letsencrypt:/etc/letsencrypt" \ | |
-v "/Users/iolufemi/workspace/letsencrypt/:/var/lib/letsencrypt" \ | |
quay.io/letsencrypt/letsencrypt:latest -a manual -d paybutton.prod1flutterwave.co \ | |
--server https://acme-v01.api.letsencrypt.org/directory auth | |
// Renew Certificate |
sudo docker run --rm --publish 80:80 --publish 443:443 --name letsencrypt \ | |
--volume "/tmp/letsencrypt/etc/:/etc/letsencrypt" \ | |
--volume "/tmp/letsencrypt/var/:/var/lib/letsencrypt" \ | |
quay.io/letsencrypt/letsencrypt:latest certonly --standalone \ | |
-d domain.name -d www.domain.name --agree-tos --email [email protected] | |
I hereby claim:
- I am iolufemi on github.
- I am iolufemi (https://keybase.io/iolufemi) on keybase.
- I have a public key whose fingerprint is F97F 6559 53A3 23C0 A57B 089A 8D6C 2A10 EA36 F3D6
To claim this, I am signing this object:
'use strict'; | |
module.exports = function CustomError(message, extra) { | |
Error.captureStackTrace(this, this.constructor); | |
this.name = this.constructor.name; | |
this.message = message; | |
this.extra = extra; | |
}; | |
require('util').inherits(module.exports, Error); |
/** | |
* AuthController | |
* | |
* @module :: Controller | |
* @description :: Contains logic for handling auth requests. | |
*/ | |
var passport = require('passport'); | |
var GoogleStrategy = require('passport-google').Strategy; |
[{"name":"Israel","dial_code":"+972","code":"IL"},{"name":"Afghanistan","dial_code":"+93","code":"AF"},{"name":"Albania","dial_code":"+355","code":"AL"},{"name":"Algeria","dial_code":"+213","code":"DZ"},{"name":"AmericanSamoa","dial_code":"+1 684","code":"AS"},{"name":"Andorra","dial_code":"+376","code":"AD"},{"name":"Angola","dial_code":"+244","code":"AO"},{"name":"Anguilla","dial_code":"+1 264","code":"AI"},{"name":"Antigua and Barbuda","dial_code":"+1268","code":"AG"},{"name":"Argentina","dial_code":"+54","code":"AR"},{"name":"Armenia","dial_code":"+374","code":"AM"},{"name":"Aruba","dial_code":"+297","code":"AW"},{"name":"Australia","dial_code":"+61","code":"AU"},{"name":"Austria","dial_code":"+43","code":"AT"},{"name":"Azerbaijan","dial_code":"+994","code":"AZ"},{"name":"Bahamas","dial_code":"+1 242","code":"BS"},{"name":"Bahrain","dial_code":"+973","code":"BH"},{"name":"Bangladesh","dial_code":"+880","code":"BD"},{"name":"Barbados","dial_code":"+1 246","code":"BB"},{"name":"Belarus","dial_code":"+375"," |
From Meteor's documentation:
In Meteor, your server code runs in a single thread per request, not in the asynchronous callback style typical of Node. We find the linear execution model a better fit for the typical server code in a Meteor application.
This guide serves as a mini-tour of tools, trix and patterns that can be used to run async code in Meteor.
Sometimes we need to run async code in Meteor.methods
. For this we create a Future
to block until the async code has finished. This pattern can be seen all over Meteor's own codebase:
This quick start guide is geared towards installing PHPUnit on OSX in order to run the WordPress unit tests. It uses homebrew to install PHP using homebrew-php. You can likely skip this step if you've already got php and pear installed properly.
If you use MAMP, then try these instructions to use MAMP's php and pear to install PHPUnit.
ruby <(curl -fsSkL raw.github.com/mxcl/homebrew/go)