Skip to content

Instantly share code, notes, and snippets.

dalethedeveloper

Block or report user

Report or block dalethedeveloper

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@dalethedeveloper
dalethedeveloper / gist:5041690
Last active Dec 14, 2015 — forked from anonymous/gist:5041678
Enable debugging on a WordPress site for your session only. Uses a simple URL Variable thats only security is obscurity. Replaces existing WP_DEBUG definition in your wp-config.php
View gist:5041690
// Replace existing definition in your wp-config.php
// define('WP_DEBUG',false);
if( !isset($_COOKIE['likeaboss']) and isset($_GET['likeaboss']) )
setcookie('likeaboss',($_GET['likeaboss']=='fosho'?'fosho':false), time()+3600);
define('WP_DEBUG',((isset($_COOKIE['likeaboss']) and $_COOKIE['likeaboss']=='fosho')?true:false));
// Drop ?likeaboss=fosho on your URL to enable WP_DEBUG for a bit
View JavaScript - DOM Ready(ier)
/**
* Works in Chrome, Firefox, MSIE, Opera and Safari.
*/
function onDOMContentLoaded( event ) {
if( event ) {
document.removeEventListener( event.type, onDOMContentLoaded, false );
}
document.onreadystatechange = null;
// For testing purposes.
alert( "DOM Content Loaded" );
You can’t perform that action at this time.