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 | |
/** | |
* Filter stylesheet URLs so that if there is a corresponding file with | |
* a .less extension and that file is newer than this .css file, then lessphp | |
* <http://leafo.net/lessphp/> is invoked to rebuild the stylesheet: the | |
* comment header is preserved in the LESS output. Requires that lessphp be | |
* located in <TEMPLATEPATH/lessphp/lessc.inc.php> This filter may be invoked | |
* in header.php as follows: | |
* <link rel="stylesheet" | |
* href="<?php echo apply_filters('style_loader_src', get_stylesheet_uri(), null); ?>" |
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
<!-- Add to beginning of <head> --> | |
<?php if(defined('WP_DEBUG') && WP_DEBUG): ?> | |
<script>var debugClientStartTime = (new Date()).valueOf();</script> | |
<?php endif; ?> | |
<!-- Add to end of <body> --> | |
<?php if(defined('WP_DEBUG') && WP_DEBUG): | |
ob_start(); ?> | |
<div id="debugPerformance"> | |
<style scoped=""> |
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
Please see: http://svn.wp-plugins.org/optimize-scripts/trunk/ |
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
/** | |
* Detect if the browser can play MP3 audio using native HTML5 Audio. | |
* Invokes the callack function with first parameter is the boolean success | |
* value; if that value is false, a second error parameter is passed. This error | |
* is either HTMLMediaError or some other DOMException or Error object. | |
* Note the callback is likely to be invoked asynchronously! | |
* @param {function(boolean, Object|undefined)} callback | |
*/ | |
function canPlayAudioMP3(callback){ | |
try { |
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
#!/usr/bin/perl -w | |
# Grayscale CSS: | |
# Replace all CSS colors from STDIN with their grayscale versions in the STDOUT. | |
# Supports hex colors, rgb/rgba, and hsl/hsla. | |
# Usage: perl grayscale-css.pl screen.css > grayscale-screen.css | |
# by Weston Ruter <http://weston.ruter.net/> | |
# Copyright 2009, Shepherd Interactive <http://shepherdinteractive.com/> | |
# License: GPL 3.0 <http://www.gnu.org/licenses/gpl.html> | |
# | |
# This program is free software: you can redistribute it and/or modify |
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 | |
define('MD5_INPUT', "Hello, World!"); | |
?> | |
<script src="gibberish-aes.js"></script> | |
<pre><?php echo md5(MD5_INPUT); ?></pre> | |
<pre><script> | |
var md5_arr = GibberishAES.Hash.MD5(<?php echo json_encode(MD5_INPUT) ?>); | |
var md5_hex = ''; | |
for(var i = 0; i <md5_arr.length; i++){ | |
var hex = md5_arr[i].toString(16); |
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
Index: core/model/Image.php | |
=================================================================== | |
--- core/model/Image.php (revision 99) | |
+++ core/model/Image.php (revision 100) | |
@@ -72,16 +72,14 @@ | |
if($this->src->height*$scale > $height){ // Now scale by height if it would end up too tall | |
$scale *= $height / ($this->src->height*$scale); | |
} | |
- $this->Processed->width = $width; | |
- $this->Processed->height = ceil($this->src->height * $scale); |
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
if(!jQuery('<input PLACEHOLDER="1" />')[0].placeholder){ //Uppercase attr for IE | |
jQuery(':input[placeholder]').each(function(){ | |
var $this = $(this); | |
if(!$this.val()){ | |
$this.val($this.attr('placeholder')); | |
$this.addClass('input-placeholder'); | |
} | |
}).live('focus', function(e){ | |
var $this = $(this); | |
if($this.hasClass('input-placeholder')){ |
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
var url = "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw=="; | |
var div = document.createElement('div'); | |
div.style.background = "url(" + url + "),url(" + url + "), black url(" + url + ")"; | |
if(!div.style.backgroundImage || div.style.backgroundImage.match(/url/g).length != 3){ | |
document.documentElement.className += " no-multiplebgs" | |
} |
OlderNewer