Skip to content

Instantly share code, notes, and snippets.

View quis's full-sized avatar

Chris Hill-Scott quis

View GitHub Profile
@quis
quis / imageProxy.php
Created March 16, 2012 10:47
Wordpress responsive image proxy
<?php
class ImageProxy {
function __construct($request) {
$this->sourceFolder = "/wp-content/uploads/";
$this->path = dirname($request);
$this->partialFileName = str_replace($this->path."/", "", $request);
// Campaign Monitor jQuery plugin
// Chris @ Anywhichway 2010
//
// usage $(form).campaignMonitor(), where form is the signup form that Campaign Monitor generates
jQuery.fn.campaignMonitorSignup = function(options) {
var defaults = {
callbacks: {
success: function(){},
(function preloadImages() {
for (i in arguments) {
(new Image()).src = arguments[i];
}
}("image1.png", "image2.png"));
<?
/*
Plugin Name: quis.cc inline images
Plugin URI: http://quis.cc
Description: Embed an image post inside a text post
Version: 0.1
Author: Chris Hill-Scott
Author URI: http://quis.cc
License: GPL2
// =============================================
//
// SCALE ELEMENTS TO FIT A FIXED CONTAINER SIZE
// ---------------------------------------------
//
// By Chris Hill-Scott 2009-10
//
// Code is public domain, reuse as desired
//
// Requires jQuery
<?
// Post category listing with support for exclusion
// $separator is a string, $excluded is an array of category slugs to be excluded from the list
// Sample call:
// echo the_category_exclude(" &middot; ", array("hidden", "admin"));
function get_the_category_exclude($separator, $excluded = array("")) {
foreach (