Skip to content

Instantly share code, notes, and snippets.

View fterenzani's full-sized avatar

Francesco Terenzani fterenzani

View GitHub Profile
@fterenzani
fterenzani / gist:5795918
Last active December 18, 2015 14:19
A simple PHP script for SEO to check multiple redirects
<?php
/**
* A simple PHP script for SEO to check multiple redirects.
*
* Just paste the list of URLs, one per line, in the $urls variable (copy and paste from Excel is fine)
* run the script and save the source code of the response as .tsv file.
*
* You can then import the .tsv in Excel.
*/
@fterenzani
fterenzani / gist:2029306
Created March 13, 2012 15:03 — forked from luetkemj/wp-query-ref.php
WP: Query $args
<?php
/**
* WordPress Query Comprehensive Reference
* Compiled by luetkemj - luetkemj.com
*
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query
* Source: http://core.trac.wordpress.org/browser/tags/3.3.1/wp-includes/query.php
*/
$args = array(
new Simph_ErrorHandler(function ($e) {
while (ob_get_level()) {
ob_end_clean();
}
ob_start();
switch (get_class($e)) {
case 'Simph_Error404':
case 'Simph_Router_HttpException':
function extend(parent, child, proto) {
if (child == null) {
child = function () {
parent.apply(this, arguments);
};
}
child.prototype = new parent;
if (proto != null) {