Skip to content

Instantly share code, notes, and snippets.

View WolfieZero's full-sized avatar
☠️
skellington

Neil Sweeney WolfieZero

☠️
skellington
View GitHub Profile
@WolfieZero
WolfieZero / posts-in-posts.php
Created October 12, 2011 15:52
Update of Posts-in-Posts
<?php
/*
Plugin Name: Posts in Posts
Plugin URI: http://wolfiezero.com/wordpress/posts-in-posts/
Version: 0.7a
Description: Grabs posts based on tag, category or just recent, and display them inline with a post
Author: WolfieZero
Author URI: http://wolfiezero.com/
License: GPLv3 or later
*/
@WolfieZero
WolfieZero / gist:2488270
Created April 25, 2012 08:43
JS Debug Quick Change
/**
* If you do a lot of JS development, having a global function to include the
* source URL that corrects the URL if the DEBUG_JS flag is set to true or not.
*/
define('DEBUG_JS', false);
/**
* Javascript Include
* Includes Javascript according to if it's in debug mode or not
@WolfieZero
WolfieZero / gist:2497910
Created April 26, 2012 09:09
WordPress: return theme directory
/**
* Place this function in your functions.php file to allow global access
* Update: 26 April 2012 11:35 - TEMPLATEPATH does the same job!
*/
/**
* Theme Directory
* Returns the directory of the theme from root
*
* @param boolean $echo=false [description]
define('DEBUG_JS', false); // Debug JS; seperates out the unminimised files
/*****************************************************************************/
/**
* Enqued Scripts
* Sets up scripts to be included on the site
*
@WolfieZero
WolfieZero / gist:3910572
Created October 18, 2012 09:03
Track browser size in Google Analytics (not just screen size)
/**
* What this script will do is add a new tracking metric to work out the actual
* size of a browser window (where as Google only tracks screen size). Goes
* great with responsive design!
*
* Adapted this from Zachstronaut (http://j.mp/RDztCB).
*/
_gaq = [
['_setAccount','UA-XXXXX-X'],
#!/bin/sh
# Development style output
sass --watch style/sass:style/css --style nested
exit 0
#!/bin/sh
# Distribution style output
sass --watch style/sass:style/css --style compressed
exit 0
@WolfieZero
WolfieZero / wp-config-local.php
Last active December 25, 2015 06:49
Editing the wp-config.php file to load in another file if available. Makes working across multiple environments easier. Bonus tip; set your live site in wp-config.php and all other locations in wp-config-local.php. I also install WP in it's own directory making it easier to use git submodules.
<?php
// ** MySQL settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define('DB_NAME', '...');
/** MySQL database username */
define('DB_USER', '...');
/** MySQL database password */
@WolfieZero
WolfieZero / .editorconfig
Last active June 11, 2017 10:28
Default settings for editor configurations
; ==============================================================================
; Editor configs
; ==============================================================================
; See editorconfig.org
; top-most EditorConfig file
root = true
@WolfieZero
WolfieZero / SassMeister-input.scss
Created November 26, 2014 16:34
Generated by SassMeister.com.
// ----
// Sass (v3.4.7)
// Compass (v1.0.1)
// ----
/**
* =============================================================================
* Typography
* =============================================================================