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 | |
/* | |
Plugin Name: Instrument Hooks for WordPress | |
Description: Instruments Hooks for a Page. Outputs during the Shutdown Hook. | |
Version: 0.1 | |
Author: Mike Schinkel | |
Author URI: http://mikeschinkel.com | |
*/ | |
if (isset($_GET['instrument']) && $_GET['instrument']=='hooks') { |
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 http = require("http"), | |
url = require("url"), | |
path = require("path"), | |
fs = require("fs") | |
port = process.argv[2] || 8888; | |
http.createServer(function(request, response) { | |
var uri = url.parse(request.url).pathname | |
, filename = path.join(process.cwd(), uri); |
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 (window, document, $, undefined) { | |
if (!$.Deferred) throw 'jQuery 1.5 is required to use the jQuery.oauth script!'; | |
function require(name, url) { | |
if (window[name] === undefined) | |
return $.ajax({ type: 'GET', cache: true, dataType: 'script', url: url }); | |
} | |
$.oauth = function (options) { | |
var d = $.Deferred(); |
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
/* Media queries used on blog.staydecent.ca by Adrian Unger | |
check my full source at: | |
http://blog.staydecent.ca/static/css/style-0.1.6.css */ | |
@media only screen and (min-width:768px) and (max-width:1269px) { | |
/* In my particular design, I used a fluid grid limited to a | |
max-width of 1140px, while (if there is enough room) | |
pushing the menu outside of layout, requiring a total | |
limit of at least 1270px. | |
So, this first query applies to any screen-width less |
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/php | |
<?php | |
error_reporting(E_ALL); | |
if (count($argv) <= 1) { | |
print("usage createMockup src_dir dst_dir images_dir\n"); | |
print("\tsrc_dir : dir where all bmml file are\n"); | |
print("\tdst_dir : dir where write all html files\n"); | |
print("\timages_dir : dir where all export mockup png are (will be copied to the \$dst_dir/images directory)\n"); | |
exit(1); | |
} |
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
/** | |
* cache script and css to localStorage (same domain only) | |
* | |
* $CLS.style("a.css"); | |
* | |
* $CLS.script("jquery-1.5.2.min.js").wait() | |
* .script("a.js") | |
* .script("b.js") | |
* .script("c.js") | |
* .wait(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 | |
/* | |
Plugin Name: Remove WPMU Notification Plugin Nag | |
Plugin URI: http://wp.me/p1Aj2B-6g | |
Description: WPMU started trying to force people that use plugins by their developers to install a Notification plugin by making a persistent notification bug the admins. This removes that annoying piece. | |
Version: 1.2 | |
Author: Trae Blain | |
Author URI: http://traeblain.com | |
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
// knockout 2.2.1 | |
ko.utils.arrayFilter = function (array, predicate) { /* .. */ } | |
ko.utils.arrayFirst = function (array, predicate, predicateOwner) { /* .. */ } | |
ko.utils.arrayForEach = function (array, action) { /* .. */ } | |
ko.utils.arrayGetDistinctValues = function (array) { /* .. */ } |
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
@echo off | |
:: normalize folder | |
SET folder=%~1 | |
IF %folder:~-1%==\ SET folder=%folder:~0,-1% | |
:: random number from 8000 to 9999 | |
SET /a port=(%random%)*1999/32767+8000 | |
:: start the web server for the random port starting at the passed-in directory |
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
# IMPORTANT: On your machine, with the ec2 instance running | |
# Basic Config variables | |
instanceid=<instance-id> | |
size=50 | |
#Get the root EBS volume id and availability zone for this instance: | |
oldvolumeid=$(ec2-describe-instances $instanceid | | |
egrep "^BLOCKDEVICE./dev/sda1" | cut -f3) | |
zone=$(ec2-describe-instances $instanceid | egrep ^INSTANCE | cut -f12) | |
echo "instance $instanceid in $zone with original volume $oldvolumeid" |
OlderNewer