Skip to content

Instantly share code, notes, and snippets.

View robertpitt's full-sized avatar

Robert Pitt robertpitt

View GitHub Profile
<?php
/**
* LightPHP Framework
* LitePHP is a framework that has been designed to be lite waight, extensible and fast.
*
* @author Robert Pitt <robertpitt1988@gmail.com>
* @category core
* @copyright 2013 Robert Pitt
* @license GPL v3 - GNU Public License v3
* @version 1.0.0
<?php
/**
* LightPHP Framework
* LitePHP is a framework that has been designed to be lite waight, extensible and fast.
*
* @author Robert Pitt <robertpitt1988@gmail.com>
* @category core
* @copyright 2013 Robert Pitt
* @license GPL v3 - GNU Public License v3
* @version 1.0.0
<?php
/**
* LightPHP Framework
* LitePHP is a framework that has been designed to be lite waight, extensible and fast.
*
* @author Robert Pitt <robertpitt1988@gmail.com>
* @category core
* @copyright 2013 Robert Pitt
* @license GPL v3 - GNU Public License v3
* @version 1.0.0
/**
* require Kue
*/
var kue = Npm.require('kue'),
queue = kue.createQueue();
// Use Kue/queue here!
console.log(queue);
/**
* Access Token
*/
_.extend(AccessToken, {
/**
* Update an access token
* @param {Function} callback Callback when token has been updated
*/
refreshAccessToken : function(service, force, callback) {
/**
@robertpitt
robertpitt / data-example.json
Created October 17, 2019 17:23 — forked from swayvil/data-example.json
D3.js collapsing tree with boxes
{
"tree" : {
"nodeName" : "NODE NAME 1",
"name" : "NODE NAME 1",
"type" : "type3",
"code" : "N1",
"label" : "Node name 1",
"version" : "v1.0",
"link" : {
"name" : "Link NODE NAME 1",
/**
* Perform a async sleep operation, this is useful for testing
*/
const sleep = (ms) => new Promise(resolve => setTimeout(resolve, ms))
/**
* Debounce a async function call
*/
const debounce = (fn, offsetMs = 0) => {
let timer = null
import { pipeline } from 'pipe-and-compose';
import * as path from 'object-path';
/**
* A deduction can been seen as synonymous with a transformation, except that
* a deduction also performs movement of the source value(s) via a sequence of reducers
* to the destination in the output object.
*/
export type Deduction<I, O> = {
/**