Skip to content

Instantly share code, notes, and snippets.

View anointed's full-sized avatar

shawn gaffney anointed

View GitHub Profile
@anointed
anointed / ocp.php
Created August 7, 2013 12:46 — forked from ck-on/ocp.php
<?php
/*
OCP - Opcache Control Panel (aka Zend Optimizer+ Control Panel for PHP)
Author: _ck_ (with contributions by GK, stasilok)
Version: 0.1.6
Free for any kind of use or modification, I am not responsible for anything, please share your improvements
* revision history
0.1.6 2013-04-12 moved meta to footer so graphs can be higher and reduce clutter
0.1.5 2013-04-12 added graphs to visualize cache state, please report any browser/style bugs
@anointed
anointed / ocp.php
Created August 7, 2013 11:11 — forked from ck-on/ocp.php
<?php
/*
OCP - Opcache Control Panel (aka Zend Optimizer+ Control Panel for PHP)
Author: _ck_ (with contributions by GK, stasilok)
Version: 0.1.6
Free for any kind of use or modification, I am not responsible for anything, please share your improvements
* revision history
0.1.6 2013-04-12 moved meta to footer so graphs can be higher and reduce clutter
0.1.5 2013-04-12 added graphs to visualize cache state, please report any browser/style bugs
# custom login link
RewriteRule ^login$ http://localhost/whitelabel/wp-login.php [NC,L]
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.

@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
*/
@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 / 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 / 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 / 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; }

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: