Skip to content

Instantly share code, notes, and snippets.

View nathanpitman's full-sized avatar
💭
I may be slow to respond.

Nathan Pitman nathanpitman

💭
I may be slow to respond.
View GitHub Profile
@nathanpitman
nathanpitman / gist:4038248
Created November 8, 2012 11:20
Responsive 'insets' / 'negative offsets' for Twitter Bootstrap
.inset12 {
margin-left: -940px;
}
.inset11 {
margin-left: -860px;
}
.inset10 {
margin-left: -780px;
}
@nathanpitman
nathanpitman / pi.change_site.php
Created September 20, 2012 21:22
An ExpressionEngine plug-in to allow you to manually switch sites through the front end.
<?php
$plugin_info = array(
'pi_name' => 'Change Site URL',
'pi_version' =>'1.0',
'pi_author' =>'Nine Four Ltd',
'pi_author_url' => 'http://www.ninefour.co.uk/labs/',
'pi_description' => 'Changes the current site URL.',
'pi_usage' => Change_site::usage()
);
@nathanpitman
nathanpitman / MY_Parser.php
Created September 14, 2012 09:31
MY_Parser Library extension with 'conditionals' for CodeIgniter
<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
/**
* CodeIgniter
*
* An open source application development framework for PHP 4.3.2 or newer
*
* @package CodeIgniter
* @author Rick Ellis
* @copyright Copyright (c) 2006, EllisLab, Inc.
* @license http://www.codeignitor.com/user_guide/license.html
@nathanpitman
nathanpitman / EE2 dev conditional
Created October 28, 2011 13:40
If you're using ExpressionEngine 2 and you want to have a global variable which you can use to conditionally include content in a dev environment just paste this switch statement into your index.php file at around about line 95.
switch ($_SERVER['HTTP_HOST']) {
//development
case 'dev.example.com':
$assign_to_config['global_vars']['site_mode'] = 'dev';
break;
//default
default:
$assign_to_config['global_vars']['site_mode'] = 'live';
break;
}