Skip to content

Instantly share code, notes, and snippets.

@krisnoble
krisnoble / Activerecord.php
Created Mar 16, 2015
CodeIgniter ActiveRecord Class as linked from the wiki. N.B. this is a separate class as documented at https://github.com/bcit-ci/CodeIgniter/wiki/ActiveRecord-Class, not the built-in class which is also referred to as Active Record. The download link was broken in the transfer to the new wiki, so I am providing it here as downloaded from the or…
View Activerecord.php
<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
/**
* You can't load the Model class using the autoload file, so we have to
* include it here for the ActiveRecord class to inherit from
*/
global $application_folder;
require (BASEPATH . '/libraries/Model.php');
@krisnoble
krisnoble / _debug.js
Last active Aug 29, 2015
_debug.js - a simple helper for debugging via console with customizable colours for different categories of message. More info: http://simianstudios.com/blog/post/a-simple-helper-for-javascript-debugging-via-console.log
View _debug.js
/*!
* _debug.js (c) Kris Noble 2015 - http://simianstudios.com
* @license MIT
*/
/*
* Simple helper for debugging via console with
* customizable colours for different categories of info.
*
* Usage:
* 1. Define categoryColors e.g.
@krisnoble
krisnoble / vector.css
Last active Oct 11, 2018
A custom vector.css for Wikipedia. Living document-style, this will be updated as I find other minor tweaks. See http://simianstudios.com/blog/post/a-quick-and-easy-way-to-a-cleaner-more-readable-wikipedia for more info!
View vector.css
body {font-family:"Open Sans", "Helvetica Neue", Arial, sans-serif;}
h1, h2, h3, h4, h5, h6 {border-bottom-color:#ddd;}
p {line-height:1.3em; margin-bottom:1.3em;}
#mw-content-text {font-size:1.1em; line-height:1.3em;}
li:last-of-type, dd:last-of-type {margin-bottom:1.3em;}
#mw-content-text h2 {padding-top:1.7em;}
View deploy.php
<?php
date_default_timezone_set('Europe/London'); // Set this to your local timezone - http://www.php.net/manual/en/timezones.php
/**
* The root directory where the repos live.
*
* @var string
*/
$root_dir = '/your/root/dir/';
You can’t perform that action at this time.