Skip to content

Instantly share code, notes, and snippets.

@krisnoble
krisnoble / deploy.php
Last active April 25, 2023 15:52
A slightly modified version of Brandon Summers' script. For more information: http://simianstudios.com/blog/post/using-bitbucket-for-automated-deployment-of-multiple-repositories
<?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/';
@krisnoble
krisnoble / vector.css
Last active October 11, 2018 17:55
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!
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;}
@krisnoble
krisnoble / _debug.js
Last active August 29, 2015 14:15
_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
/*!
* _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 / Activerecord.php
Created March 16, 2015 17:14
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…
<?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');