Skip to content

Instantly share code, notes, and snippets.

View anointed's full-sized avatar

shawn gaffney anointed

View GitHub Profile
@anointed
anointed / scaffolding.php
Created November 22, 2011 05:00 — forked from eteubert/scaffolding.php
WordPress: Tab Layout for Settings Pages
<?php
// initialize plugin
if ( function_exists( 'add_action' ) && function_exists( 'register_activation_hook' ) ) {
add_action( 'plugins_loaded', array( 'tabbed_plugin', 'get_object' ) );
}
class tabbed_plugin
{
// singleton class variable
static private $classobj = NULL;
@anointed
anointed / functions.php
Created November 22, 2011 05:19 — forked from kunalb/functions.php
Overriding the default bbpress theme
/**
* Set the theme compat theme properties
*
* @since bbPress (r3311)
*
* @global bbPress $bbp
* @param BBP_Theme_Compat $theme
* @uses current_theme_supports()
*/
function bbp_setup_new_theme_compat() {

LESS 1.2.0

Now available on http://lesscss.org and NPM.

This release opens up the powerful branching capabilities of mixin guards and pattern-matching as an alternative to conditional statements.

In trying to stay as close as possible to the declarative nature of CSS, LESS has opted to implement conditional execution via guarded mixins, in the vein of @media query feature specifications:

@anointed
anointed / responsive.html
Created February 15, 2012 23:09 — forked from lensco/responsive.html
Simple responsive design test page. More info here: http://bricss.net/post/16538278376/simple-responsive-design-test-page
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Responsive Design Testing</title>
<style>
body { margin: 20px; font-family: sans-serif; overflow-x: scroll; }
.wrapper { width: 6000px; }
.frame { float: left; }
h2 { margin: 0 0 5px 0; }
@anointed
anointed / loadtweetsfromjson.php
Created February 24, 2012 22:04 — forked from bryanveloso/loadtweetsfromjson.php
A horrible, simply horrible hack to getting TweetNest to read JSON. Copy this to the /maintenance/ folder of your TweetNest installation.
<?php
// TWEET NEST
// Load tweets (from JSON)
error_reporting(E_ALL ^ E_NOTICE); ini_set("display_errors", true); // For easy debugging, this is not a production page
@set_time_limit(0);
require_once "mpreheader.php";
$p = "";
// The below is not important, so errors surpressed
@anointed
anointed / repeatable-fields-metabox.php
Created February 24, 2012 22:08 — forked from helen/repeatable-fields-metabox.php
Repeating Custom Fields in a Metabox
<?
/**
* 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() {
@anointed
anointed / wp-chosen-tax-metabox.php
Created February 24, 2012 22:50 — forked from helen/wp-chosen-tax-metabox.php
Use Chosen for a replacement WordPress taxonomy metabox
<?php
/**
* WordPress Chosen Taxonomy Metabox
* Author: Helen Hou-Sandi
*
* Use Chosen for a replacement taxonomy metabox in WordPress
* Useful for taxonomies that aren't changed much on the fly,
* as Chosen is for selection only.
* You can always use the taxonomy admin screen to add/edit taxonomy terms.
*
@anointed
anointed / gist:1916525
Created February 26, 2012 12:38 — forked from willmot/gist:1277790
WordPress attachment category plugin
<?php
/*
Plugin Name: Attachment Categories
Description: Allows attachments to be categorised
Version: 1.0
Author: Human Made Limited
Author URI: http://hmn.md
*/
layout title categories
post
Varnish Setup for Wordpress
Hacks
Wordpress
Varnish
Apache
Server

Here’s the gist of it:

All configs are available as a gist from GitHub.

# custom login link
RewriteRule ^login$ http://localhost/whitelabel/wp-login.php [NC,L]