Skip to content

Instantly share code, notes, and snippets.

Chris Newhouse newhouse

Block or report user

Report or block newhouse

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
@newhouse
newhouse / app.js
Created Jan 12, 2018
Objection.js: insert-validating-as-if-insertGraph
View app.js
'use strict';
const assert = require('assert');
const _ = require('lodash');
const objection = require('objection');
const Model = objection.Model;
const knex = require('knex')({
debug: false,
client: 'pg',
@newhouse
newhouse / app.js
Created Dec 13, 2017
Objection.js: inconsistent typing of 'date-time' Model props
View app.js
'use strict';
const _ = require('lodash');
const objection = require('objection');
const Model = objection.Model;
const knex = require('knex')({
debug: false,
client: 'pg',
connection: 'INSERT CONNECTION STRING HERE',
@newhouse
newhouse / app.js
Created Apr 28, 2017
Objection.js $formatDatabaseJson bug hunt
View app.js
'use strict';
const _ = require('lodash');
const objection = require('objection');
const Model = objection.Model;
const knex = require('knex')({
debug: false,
client: 'pg',
connection: 'INSERT CONNECTION STRING HERE',
@newhouse
newhouse / mediumUsersFollowedByCount.js
Last active Jul 12, 2019
Medium API: get number of followers for User
View mediumUsersFollowedByCount.js
/**
* Example of how to get the number of followers for a Medium.com User.
*
*
* Related links:
* https://github.com/Medium/medium-api-docs/issues/30#issuecomment-227911763
* https://github.com/Medium/medium-api-docs/issues/73
*/
// LODASH
You can’t perform that action at this time.