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 / 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 / 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)
@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 / 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 / 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 / MAMP-DOCK-INVISIBLE.sh
Last active December 10, 2015 20:18 — forked from josue/MAMP-DOCK-INVISIBLE.sh
Hide MAMP Dock Icons Shell Scripts
#!/bin/bash
# Place this script in dir: /usr/bin
# Change permissions: sudo chmod +x /usr/bin/MAMP-DOCK-INVISIBLE
#
# Ensure the MAMP 'Info.plist' file has the following entry:
# <key>LSUIElement</key>
# <string dock-visible="1">NO</string>
#
# Usage:
<?
/**
* Repeatable Custom Fields in a Metabox
* Author: Helen Hou-Sandi
*
* From a bespoke system, so currently not modular - will fix soon
* Note that this particular metadata is saved as one multidimensional array (serialized)
*/
function hhs_get_sample_options() {
@og-shawn-crigger
og-shawn-crigger / functions.php
Created June 6, 2013 15:12 — forked from jcanfield/functions.php
Add body classes to Wordpress <body> tag
// Add more options to the body class on each page (Previous the Ambrosite Plugin)
function fineideas_body_class($classes) {
// If you don't like the class prefixes I have chosen, you can change them here.
$post_name_prefix = 'postname-';
$page_name_prefix = 'pagename-';
$single_term_prefix = 'single-';
$single_parent_prefix = 'parent-';
$category_parent_prefix = 'parent-category-';
$term_parent_prefix = 'parent-term-';
@og-shawn-crigger
og-shawn-crigger / wp-config.php
Created June 9, 2013 23:38 — forked from jcanfield/wp-config.php
Turns wordpress debugging on creates log in wp-content/ directory if I remember correctly.
@ini_set('display_errors',0); /* define('WP_DEBUG', false); */
define('WP_DEBUG', true); // Turn debugging ON
define('WP_DEBUG_DISPLAY', false); // Turn forced display OFF
define('WP_DEBUG_LOG', true);
@og-shawn-crigger
og-shawn-crigger / .htaccess
Created June 9, 2013 23:39 — forked from jcanfield/.htaccess
Wordpress .htaccess boilerplate to look at
# Apache Configuration file
# www.lighthouselutherie.com/.htaccess
# Use UTF-8 encoding for anything served as `text/html` or `text/plain`.
AddDefaultCharset utf-8
# Force UTF-8 for certain file formats.
<IfModule mod_mime.c>
AddCharset utf-8 .atom .css .js .json .rss .vtt .webapp .xml
</IfModule>