Skip to content

Instantly share code, notes, and snippets.

View leviwheatcroft's full-sized avatar

Levi Wheatcroft leviwheatcroft

  • Western Australia
View GitHub Profile
@leviwheatcroft
leviwheatcroft / whtacctgPortalClientFolders
Created July 19, 2014 02:45
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.
#test {
background-color: #000000;
background-image: url('http://placekitten.com/g/200/300');
display: block;
width: 200px;
height: 1000px;
}
#test {
background-color: #000000;
background-image: url('http://placekitten.com/g/200/300');
display: block;
width: 200px;
height: 1000px;
background-repeat: no-repeat;
margin: 100px 0 0 0;
background-attachment: fixed;
}
@leviwheatcroft
leviwheatcroft / classFactory.js
Created June 10, 2015 04:41
js class & factory functions: vanilla, minimal, and flexible
(function() {
var createClass;
var createFactory;
var Factory;
createClass = function(pattern) {
var Cls;
var Tmp;
var proto;
@leviwheatcroft
leviwheatcroft / gist:2626238
Created May 7, 2012 06:23
rendAr plugin v0.4
Array.implement({
rendAr: function() {
var el = [];
this.each(function(item) {
if (typeOf(item) == 'element') el.push(item);
else if (typeOf(item) == 'string') el.push(new Element(item));
else if (typeOf(item) == 'elements') item.each(function(i) {el.push(i);});
else if (typeOf(item) == 'array') el[el.length - 1].adopt(item.rendAr());
else if (typeOf(item) == 'object') el[el.length - 1].set(item);
});
//----------:A simple example:----------
var template = [
'ul.listClass#listId', [
'li[text=Hello]',
'li[text=World]'
]
];
var element = template.rendAr();
$$('body').adopt(element);
@leviwheatcroft
leviwheatcroft / gist:d57777ed9d49a9a285a9
Last active October 10, 2015 00:24
guide to creating / configuring kestonejs heroku projects

overview

objectives

  • 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
@leviwheatcroft
leviwheatcroft / issue6.js
Created October 4, 2016 21:41
superagent-throttle issue6
'use strict'
/**
* ## tests
*
* I've never written any tests before, so I'm sure there's room for
* criticism here.
*
*/
const request = require('superagent')