Skip to content

Instantly share code, notes, and snippets.

View og-shawn-crigger's full-sized avatar

Shawn Crigger og-shawn-crigger

View GitHub Profile
@og-shawn-crigger
og-shawn-crigger / global.js
Created September 24, 2012 14:31
Some JS i use a lot for bonfire sites
// ------------------------------------------------------------------------
// SET NAMESPACE TO AVOID CONFLICTS AND HOLD CONFIG VALUES
// ------------------------------------------------------------------------
var bonfire = bonfire || {};
bonfire = {
config: {
site_url: '<?php echo $site_url ?>',
base_url: '<?php echo $base_url ?>',
@og-shawn-crigger
og-shawn-crigger / Profiler.php
Created September 24, 2012 14:29
Bonfire Profiler that passed HTML validation
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
* CodeIgniter
*
* An open source application development framework for PHP 5.1.6 or newer
*
* @package CodeIgniter
* @author ExpressionEngine Dev Team
* @copyright Copyright © 2008 - 2011, EllisLab, Inc.
* @license http://codeigniter.com/user_guide/license.html
@og-shawn-crigger
og-shawn-crigger / .gitconfig
Created September 9, 2012 08:59
Global Git Config file
[user]
name =
email = [...]
[color]
ui = auto
[color "branch"]
current = blue reverse
local = blue
remote = green
[color "diff"]
@og-shawn-crigger
og-shawn-crigger / mimeapps.list
Created September 6, 2012 11:02 — forked from marfillaster/mimeapps.list
Sublime Text ubuntu xdebug url handler
#~/.local/share/applications/mimeapps.list
[Added Associations]
#...
x-scheme-handler/subl=subl-urlhandler.desktop
@og-shawn-crigger
og-shawn-crigger / developer.php
Created September 2, 2012 13:11
Test Migration controller to show errors
<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
/**
* Bonfire
*
* An open source project to allow developers get a jumpstart their development of CodeIgniter applications
*
* @package Bonfire
* @author Bonfire Dev Team
* @copyright Copyright (c) 2011 - 2012, Bonfire Dev Team
* @license http://guides.cibonfire.com/license.html
@og-shawn-crigger
og-shawn-crigger / 1.htaccess
Created August 31, 2012 20:35
Bonfire Application config file
# ----------------------------------------------------------------------
# Webfont access
# ----------------------------------------------------------------------
# Allow access from all domains for webfonts.
# Alternatively you could only whitelist your
# subdomains like "subdomain.example.com".
<IfModule mod_headers.c>
<FilesMatch "\.(ttf|ttc|otf|eot|woff|font.css)$">
@og-shawn-crigger
og-shawn-crigger / dump.js
Created August 31, 2012 01:51
JavaScript debugging dump method, similar to PHP print_r
/**
* Function : dump()
* Arguments: The data - array,hash(associative array),object
* The level - OPTIONAL
* Returns : The textual representation of the array.
* This function was inspired by the print_r function of PHP.
* This will accept some data as the argument and return a
* text that will be a more readable version of the
* array/hash/object that is given.
*/
@og-shawn-crigger
og-shawn-crigger / Autoloader.php
Created August 30, 2012 16:51 — forked from hardfire/MY_Parser.php
Parser for Bonfire
<?php
/**
* The Lex Autoloader (this is case-sensative)
*/
class Lex_Autoloader
{
protected static $load_path = './';
@og-shawn-crigger
og-shawn-crigger / controller.php
Created August 29, 2012 12:32 — forked from tylerreed/controller.php
Valums AJAX File Uploader for CodeIgniter
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Ajax_uploader extends CI_Controller {
// ------------------------------------------------------------------------
/**
* Array of allowed file extensions to upload.
*
* @var array
@og-shawn-crigger
og-shawn-crigger / common.php
Created August 29, 2012 11:32 — forked from ericlbarnes/common.php
Stringify Attributes
/**
* Stringify attributes for use in html tags.
*
* Helper function used to convert an array or object of
* attributes to a string
*
* @param mixed
* @return string
*/
function _stringify_attributes($attributes, $js = FALSE)