Skip to content

Instantly share code, notes, and snippets.

View johnbrett's full-sized avatar

John Brett johnbrett

View GitHub Profile
Verifying my Blockstack ID is secured with the address 1JCXqDP4gHx442tBCrLXXHhbiuE2NA6dNd https://explorer.blockstack.org/address/1JCXqDP4gHx442tBCrLXXHhbiuE2NA6dNd
Verifying my Blockstack ID is secured with the address 1JCXqDP4gHx442tBCrLXXHhbiuE2NA6dNd https://explorer.blockstack.org/address/1JCXqDP4gHx442tBCrLXXHhbiuE2NA6dNd
@johnbrett
johnbrett / error-logging-server.js
Created June 6, 2017 14:48
hapi logging with promises
'use strict'
const Hapi = require('hapi')
const {handler} = require('toys')
const server = new Hapi.Server()
server.connection({
host: 'localhost',
port: 8000
})
````
'use strict';
const Hapi = require('hapi');
const Joi = require('joi');
const server = new Hapi.Server();
server.connection({ port: 8001, host: '127.0.0.1' });
@johnbrett
johnbrett / gist:dde924d9d26fecd63c32
Last active August 29, 2015 14:16
Populating meta data using Calibrate in a DRY Manner
var Hapi = require('hapi');
var Calibrate = require('calibrate');
var server = new Hapi.Server();
server.connection({ port: 8002, routes: { cors: true }});
server.decorate('reply', 'calibrate', function(response) {
var data = response.results;
var meta = {
'id': response.id,
'use strict';
var mysql = {
client: 'mysql',
connection: {
database: 'test',
user: 'root',
debug: true
}
};

Keybase proof

I hereby claim:

  • I am johnbrett on github.
  • I am johnbrett (https://keybase.io/johnbrett) on keybase.
  • I have a public key whose fingerprint is 4D4A 3D93 C850 FD9C D70C 0089 BE0F 5E2C A74B 8E33

To claim this, I am signing this object: