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 / modx external authentication.php
Created May 29, 2014 12:28
Single Sign On for modx external authentication super handy if you're authenticating with some other project and just need to assign privileges to a session.
<?php
//require 'modx/assets/kint/Kint.class.php';
require_once __DIR__ . '/modx/config.core.php';
require_once MODX_CORE_PATH.'model/modx/modx.class.php';
$modx = new modX();
$modx->initialize('web');
$modx->getService('error','error.modError', '', '');
$user = $modx->getObject('modUser', array('username' => 'levi'));
@leviwheatcroft
leviwheatcroft / modx pThumb raw data.php
Created May 29, 2014 06:41
working with phpthumbof in modx to get at the raw file contents and output it directly.
<?php
// after I figured this out I realised I could just use mun.ee
// you probably should too!
if (!$modx) die();
$debug = 0 || $_GET['debug'];
if ($debug) require_once($modx->config['base_path'] . 'assets/php/kint-0.9/Kint.class.php');
$options = array(
@leviwheatcroft
leviwheatcroft / calwayBrandPack
Created May 26, 2014 07:30
Calway Logistics Brand Pack (calwayBrandPack)
# Calway Logistics Brand Pack (calwayBrandPack)
## overview
Calway Logistics has a partial logo design and visual style, but a full brand pack needs to be developed.
see the full brief here:
## assets
# Wheatcroft Accounting Coffee Cards (whtacctgCafe)
## overview
Create a promotional voucher to be issued by an accounting form for clients to redeem a free hot drink
See the full brief here:
## assets
# Wheatcroft Accounting Signage 1 (whtacctgSigns1)
## overview
Simple project to create artwork for sign. Logo fonts, colors, provided.
see the brief here:
https://www.dropbox.com/s/y5eilchuer5plur/brief.md.html
## assets
@leviwheatcroft
leviwheatcroft / whtacctgStationeryBrief
Last active August 29, 2015 14:01
whtacctgStationery
# Wheatcroft Accounting Stationery (whtacctgStationery)
## overview
Design a full set of print ready stationery for wheatcroft accounting. This includes letterhead, business cards, notepad, envelope, with comp slip.
Maximum budget price of $250 includes odesk fees.
Freelancers only please. Agency Contractors will be ignored (sorry).
//----------:A simple example:----------
var template = [
'ul.listClass#listId', [
'li[text=Hello]',
'li[text=World]'
]
];
var element = template.rendAr();
$$('body').adopt(element);
@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);
});