Skip to content

Instantly share code, notes, and snippets.

View accentinteractive's full-sized avatar

Accent Interactive accentinteractive

View GitHub Profile
# purge varnish cache in Varnish 3
varnishadm "ban.url ."
# purge varnish cache in Varnish 4
varnishadm "ban req.url ~ /"
@accentinteractive
accentinteractive / dump_helper.php
Created October 5, 2012 07:09
dump_helper: functions to dump variables to the screen, in a nicley formatted manner
<?php
/**
* Dump helper. Functions to dump variables to the screen, in a nicley formatted manner.
* @author Joost van Veen
* @version 1.0
*/
if (!function_exists('dump')) {
function dump ($var, $label = 'Dump', $echo = TRUE)
{
// Store dump in variable
@accentinteractive
accentinteractive / generate.php
Created October 2, 2012 09:21
Create generic controllers, models, helpers, libraries and views in a default codeigniter setup.
<?php
/**
* Use this class to automatically generate files for Codeigniter.
* This is to be used specifically with the file setup such as used
* in the course Building a CMS with Codeigniter on tutsplus.com.
*
* Just place this in your appllication/controllers folder and run it.
* NOTE: the ENVIRONMENT constant has to be set to 'development' or the
* class will return a 404.
*