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 / MY_Parser.php
Created August 29, 2012 07:13
Frisker CI Parser Extension
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
* Frisker
*
* An extension of CI_Parser. You can use it the same way as normal, except
* with additional features.
*
* You can now use PHP functions in your template.
* Example:
* {date("F j, Y, g:i a")}
@og-shawn-crigger
og-shawn-crigger / MY_Parser.php
Created August 26, 2012 14:46
CodeIgniter Extended Parser allows PHP Functions in Parser and Other options
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
* Frisker
*
* An extension of CI_Parser. You can use it the same way as normal, except
* with additional features.
*
* You can now use PHP functions in your template.
* Example:
* {date("F j, Y, g:i a")}
@og-shawn-crigger
og-shawn-crigger / template.php
Created August 26, 2012 12:48
Bonfire Template Library Fixed Parse Views
<?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 / 404.html
Created August 26, 2012 10:10 — forked from jelder/404.html
A 404 page for Octopress blogs which have been migrated from Blogger and may have broken inbound links (.html -> /)
---
layout: page
title: "Not Found"
sharing: false
footer: false
---
Sorry, that page doesn't exist. <span id="suggestion"/>
<script type="text/javascript">
@og-shawn-crigger
og-shawn-crigger / custom.js
Created August 16, 2012 01:30 — forked from drewjoh/custom.js
Dynamic (AJAX) loaded Bootstrap Modal (Bootstrap 2.0)
$(document).ready(function() {
// Support for AJAX loaded modal window.
// Focuses on first input textbox after it loads the window.
$('[data-toggle="modal"]').click(function(e) {
e.preventDefault();
var href = $(this).attr('href');
if (href.indexOf('#') == 0) {
$(href).modal('open');
} else {
@og-shawn-crigger
og-shawn-crigger / boxfile
Created August 11, 2012 06:10
BoxFile and Config for Deploying to PagdaBox
web1:
name: bonfire
shared_writable_dirs:
- assets/cache
- bonfire/application/cache
- bonfire/application/logs
- bonfire/application/archives
- bonfire/application/db/backups
- bonfire/modules
document_root: /
@og-shawn-crigger
og-shawn-crigger / sublime.md5
Created August 6, 2012 09:55
Sublime commands for memory
Wow what the hell was I not thinking when I wrote this dam thing, its abunch of sublime text editor plugoins and stuff duh
Mount a remote directory: sshfs username@hostname:/remote/path /local/path
http://www.sublimetext.com/forum/viewtopic.php?f=3&t=1510
Put a vertical line after 80 characters: Preferences > Settings - User > ... add an entry: "rulers": [80]
http://stackoverflow.com/questions/9807324/sublime-text-2-how-do-i-change-the-color-that-the-row-number-is-highlighted
@og-shawn-crigger
og-shawn-crigger / dump.php
Created August 6, 2012 09:44
Phil Sturgeons dump method with dark background for night coding
if ( ! function_exists('dump'))
{
/**
* Outputs the given variables with formatting and location. Huge props
* out to Phil Sturgeon for this one (http://philsturgeon.co.uk/blog/2010/09/power-dump-php-applications).
* To use, pass in any number of variables as arguments.
*
* @return void
*/
@og-shawn-crigger
og-shawn-crigger / jquery.uitotop.min.js
Created August 2, 2012 22:19
UItoTop jQuery Plugin 1.2 by Matt Varone
/*
|--------------------------------------------------------------------------
| UItoTop jQuery Plugin 1.2 by Matt Varone
| http://www.mattvarone.com/web-design/uitotop-jquery-plugin/
|--------------------------------------------------------------------------
*/
(function(a){a.fn.UItoTop=function(d){var f={text:"To Top",min:200,inDelay:600,outDelay:400,containerID:"toTop",containerHoverID:"toTopHover",scrollSpeed:1200,easingType:"linear"},e=a.extend(f,d),c="#"+e.containerID,b="#"+e.containerHoverID;a("body").append('<a href="#" id="'+e.containerID+'">'+e.text+"</a>");a(c).hide().on("click.UItoTop",function(){a("html, body").animate({scrollTop:0},e.scrollSpeed,e.easingType);a("#"+e.containerHoverID,this).stop().animate({opacity:0},e.inDelay,e.easingType);return false}).prepend('<span id="'+e.containerHoverID+'"></span>').hover(function(){a(b,this).stop().animate({opacity:1},600,"linear")},function(){a(b,this).stop().animate({opacity:0},700,"linear")});a(window).scroll(function(){var g=a(window).scrollTop();if(
@og-shawn-crigger
og-shawn-crigger / vin_number_callback.php
Created August 2, 2012 15:36
CI VIN Number Form Validation Callback
//--------------------------------------------------------------------
/**
* VIN Number Form Callback to verify that the VIN number is correct.
*
* Original VIN Check Code came from below link, no sense reinventing wheels
* @link {http://stackoverflow.com/questions/3831764/php-vin-number-validation-code}
*
* @param string $vin VIN Number value sent from Form Validation Library.