Skip to content

Instantly share code, notes, and snippets.

const report = {};
const fs = require('fs');
fs.writeFile('./test/staffReport.json', JSON.stringify(report), 'utf8', () => { console.log('hey') ;});
const config = require('../config/config.json');
const moment = require('moment');
const debug = require('debug')('DateHelper');
class Date {
/**
* Gets the day of the week
* @param {[type]} date [description]
* @return moment date
*/
const sinon = require('sinon');
const chai = require('chai');
const expect = chai.expect;
const SomeController = require('../../app/controllers/SomeController')
describe('SomeController', () => {
let stub;
beforeEach(() => {
stub = sinon.stub(SomeController, 'doAPICall');
const Slack = require('slack-node');
const config = require('../config/config.json');
const slack = new Slack();
slack.setWebhook(config.slack);
class SlackController {
sendMessage(message) {
slack.webhook({
channel: '#integration_logging',
@adover
adover / ImageOptim.sh
Last active August 10, 2017 01:39
Recursive JPG/PNG Optimisation
#!/usr/bin/env bash
# Recursive image optimisation. Simply call imageoptim.sh <filename>
# Example bash imageoptim.sh /assets
# Requires jpegoptim and optipng (installable on mac using brew)
echo "---------------------------------------"
echo "------- PNG/JPEG File Optimiser -------"
echo "---------------------------------------"
@adover
adover / 0_reuse_code.js
Created June 8, 2017 04:00
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@adover
adover / # bazel - 2016-09-26_07-56-53.txt
Created September 25, 2016 19:19
bazel on macOS 10.12 - Homebrew build logs
Homebrew build logs for bazel on macOS 10.12
Build date: 2016-09-26 07:56:53
@adover
adover / # bazel - 2016-09-26_07-56-53.txt
Created September 25, 2016 19:17
bazel on macOS 10.12 - Homebrew build logs
Homebrew build logs for bazel on macOS 10.12
Build date: 2016-09-26 07:56:53