This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict' | |
module.exports = Mongoose => { | |
const Schema = Mongoose.Schema | |
const fooSchema = new Schema({ | |
name: { | |
type: Schema.Types.String, | |
trim: true, | |
select: true, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict' | |
const _ = require( '../' ) | |
const Code = require('code') | |
const Lab = require('lab') | |
const lab = exports.lab = Lab.script() | |
const suite = lab.suite | |
const it = lab.test | |
const before = lab.before |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict' | |
import path from 'path' | |
import fs from 'fs' | |
import _ from 'moar-lodash' | |
import * as appRoot from 'app-root-path' | |
const log = appRoot.require('./dist/lib/utils/logger')({ model: 'Index (loader)' }) | |
module.exports = ( Mongoose ) => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// File: real-plugin-src.js | |
module.exports = ( plugin, options, next ) => { | |
// Do stuff... | |
next() | |
} | |
module.exports.attributes = { | |
pkg: { | |
name: "test-plugin", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict' | |
import _ from 'moar-lodash' | |
import path from 'path' | |
import * as appRoot from 'app-root-path' | |
import * as Winston from 'winston-color' | |
const config = appRoot.require('./dist/lib/config').logs | |
const _internals = {} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict' | |
// Tools | |
const _ = require( 'lodash' ) | |
const appRoot = require( 'app-root-path' ) | |
const Util = require( 'util' ) | |
// Unit test related | |
const Code = require( 'code' ) | |
const Lab = require( 'lab' ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict' | |
// Tools | |
const _ = require( 'lodash' ) | |
const appRoot = require( 'app-root-path' ) | |
const Util = require( 'util' ) | |
// Unit test related | |
const Code = require( 'code' ) | |
const Lab = require( 'lab' ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Create /etc/profile.d/prompt.sh and add the content of this gist to it. | |
# | |
# Prompt example: | |
# (2)[Fri May 06 10:00:30| 0:003]{4}root@ip-172-31-1-226:~(0)# | |
# Format is: | |
# (sessions on server)[date time| Last command exec time]{sessions on server}username@hostname:working_directory(exit code of last cmd)# | |
# | |
# Example Output (of $[prompt[0]}): http://d.pr/i/19B87 | |
# |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cp /etc/my.cnf{,.orig} && \ | |
echo "# | |
# This group is read both both by the client and the server | |
# use it for options that affect everything | |
# | |
[client-server] | |
# | |
# include all files from the config directory | |
# |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Summary: Script to quickly show a summary of the servers stats, showing any possible issues (mainly regarding to resource utilization) | |
# Author: Justin Hyland | |
# Created: 05/11/16 | |
# Screenshot: http://d.pr/i/2nTm | |
# Settings and thresholds | |
# These are set at odd limits just for testing | |
disk_thresh=10 # Percent | |
cpu_thresh='0.02' |
OlderNewer