This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? | |
// 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(" · ", array("hidden", "admin")); | |
function get_the_category_exclude($separator, $excluded = array("")) { | |
foreach ( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ============================================= | |
// | |
// SCALE ELEMENTS TO FIT A FIXED CONTAINER SIZE | |
// --------------------------------------------- | |
// | |
// By Chris Hill-Scott 2009-10 | |
// | |
// Code is public domain, reuse as desired | |
// | |
// Requires jQuery |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? | |
/* | |
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function preloadImages() { | |
for (i in arguments) { | |
(new Image()).src = arguments[i]; | |
} | |
}("image1.png", "image2.png")); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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(){}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class ImageProxy { | |
function __construct($request) { | |
$this->sourceFolder = "/wp-content/uploads/"; | |
$this->path = dirname($request); | |
$this->partialFileName = str_replace($this->path."/", "", $request); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Usage: $.windowResize(yourFunction); | |
Intended as a replacement for $(window).resize(yourFunction) | |
yourFunction will only be called once the resize action has been completed, improving performance | |
Code is public domain | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
USAGE: | |
<div class="onMap" style="padding-top: 80%" data-route-to=""><img src="photo.jpg" /></div> | |
Where data-route-to is an encoded polyline that you can get from the Google Maps XML API, e.g. | |
https://maps.googleapis.com/maps/api/directions/xml?origin=marrakech%20airport&destination=merzouga | |
(look for the data inside <overview_polyline><points> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
grunt.registerTask('production', [ | |
'copy:govuk_template', | |
'copy:govuk_frontend_toolkit', | |
'copy:assets_js', | |
'copy:toolkit_js', | |
'bower', | |
'convert_template', | |
'copy:govuk_frontend_toolkit', | |
'replace', | |
'sass', |
OlderNewer