Skip to content

Instantly share code, notes, and snippets.

View leviwheatcroft's full-sized avatar

Levi Wheatcroft leviwheatcroft

  • Western Australia
View GitHub Profile
leviwheatcroft / issue6.js
Created October 4, 2016 21:41
superagent-throttle issue6
View issue6.js
'use strict'
* ## tests
* I've never written any tests before, so I'm sure there's room for
* criticism here.
const request = require('superagent')
leviwheatcroft / classFactory.js
Created June 10, 2015 04:41
js class & factory functions: vanilla, minimal, and flexible
View classFactory.js
(function() {
var createClass;
var createFactory;
var Factory;
createClass = function(pattern) {
var Cls;
var Tmp;
var proto;
leviwheatcroft / gist:d57777ed9d49a9a285a9
Last active October 10, 2015 00:24
guide to creating / configuring kestonejs heroku projects
View gist:d57777ed9d49a9a285a9



  • create a project we can develop locally and then push to heroku
  • automate deployment as much as is practical
  • avoid storing built resources in master branch
  • avoid storing development npm modules in production
  • configure the project to behave appropriately in each environment
View jsbin.zebah.css
#test {
background-color: #000000;
background-image: url('');
display: block;
width: 200px;
height: 1000px;
background-repeat: no-repeat;
margin: 100px 0 0 0;
background-attachment: fixed;
View jsbin.zebah.css
#test {
background-color: #000000;
background-image: url('');
display: block;
width: 200px;
height: 1000px;
leviwheatcroft / whtacctgPortalClientFolders
Created July 19, 2014 02:45
View whtacctgPortalClientFolders
# file management service for laravel (whtacctgPortalClientFolders)
## overview
We require a file management system for a professional office. Our client files are maintained on a debian file server, and we would like to perform maintenance functions on that repository via a web interface. I'd like to use laravel, because planned future enhancements will require a robust framework.
the full brief [can be viewed here][1]
## details
* Currently, client data is stored in a folder structure created by convention. That convention needs to be changed, so client folders will need to be renamed according to the new convention.
leviwheatcroft / snapfylaOverviewIG
Created June 15, 2014 07:30
View snapfylaOverviewIG
# Snapfyla Overview Infographic (snapfylaOverviewIG)
## overview
create an infographic providing a simple high level overview of the services provides.
see the full brief here:
## about
leviwheatcroft / KintErrorHandler.php
Created May 31, 2014 02:34
Debug like a pro with Kint! It seems odd to me that Kint doesn't do this automagically. Maybe it's also odd that I've been using Kint for months and only just figured out that this is what I should be doing.
View KintErrorHandler.php
require_once __ROOT__ . '/lib/kint/Kint.class.php';
function kint_error_handler($errno, $errstr, $errfile, $errline, $errcontext) {
leviwheatcroft / 0_reuse_code.js
Created May 31, 2014 02:29
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
leviwheatcroft / php singleton pattern
Created May 30, 2014 23:29
just another singleton pattern
View php singleton pattern
class Singleton
protected static $instance = null;
protected function __construct()