Skip to content

Instantly share code, notes, and snippets.

@joshhartman
joshhartman / .htaccess
Created October 24, 2015 15:44 — forked from anonymous/.htaccess
SSL Proxy Redirect to HTTPS (compatible with Network Solutions web hosting)
RewriteEngine on
RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
@joshhartman
joshhartman / linkify.php
Created March 27, 2012 03:06 — forked from jasny/linkify.php
PHP function to turn all URLs in clickable links
<?php
/**
* Turn all URLs in clickable links.
*
* @param string $value
* @param array $protocols http/https, ftp, mail, twitter
* @param array $attributes
* @param string $mode normal or all
* @return string
*/
@joshhartman
joshhartman / gist:2044600
Created March 15, 2012 14:53 — 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(