Skip to content

Instantly share code, notes, and snippets.

bgSosh

Block or report user

Report or block bgSosh

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@bgSosh
bgSosh / MicroTxnAuthorizationListener_snippet.cc
Last active Nov 9, 2015
Greenworks MicroTxnAuthorizationListener
View MicroTxnAuthorizationListener_snippet.cc
// In `greenworks_api.cc`:
static MicroTxnAuthorizationListener *microTxnAuthorizationListener;
//...
NAN_METHOD(SetMicroTxnAuthorizationResponseCallback) {
Nan::HandleScope scope;
if (info.Length() < 1 || !info[0]->IsFunction()) {
THROW_BAD_ARGS("Bad arguments - [SetMicroTxnAuthorizationResponseCallback]");
@bgSosh
bgSosh / index.js
Created Mar 2, 2018
Differences error handling behaviour between mongoose versions 4 & 5
View index.js
//This is intended to illustrate differences error handling behaviour
//between mongoose versions 4 & 5
var mongoose = require('mongoose');
mongoose.connect('mongodb://localhost/mongoosetest', { useMongoClient: true });
var AnimalSchema = new mongoose.Schema({
name: String
});
You can’t perform that action at this time.