I hereby claim:
- I am lewayotte on github.
- I am lewayotte (https://keybase.io/lewayotte) on keybase.
- I have a public key whose fingerprint is 85F8 1C87 8605 30B0 22CE EF00 CCCF 4C72 9FE6 D1C1
To claim this, I am signing this object:
<?php | |
function post_revision_menu_page() { | |
add_menu_page( 'Revisions', 'Revisions', 'manage_options', 'revision', 'post_revision_page' ); | |
} | |
//add_action( 'admin_menu', 'post_revision_menu_page' ); | |
function post_revision_page() { | |
/* | |
//Time Check |
#!/usr/bin/perl | |
# June 13, 2011 | |
# Lew Ayotte | |
use strict; | |
use Getopt::Long; | |
use File::Path; | |
# GLOBAL VARIABLES # | |
my $ASSETS_BASE_URL = 'http://www.natgeomaps.com/assets/files/zoomify/'; |
<?php | |
function restricted_content_filter( $content ) { | |
if ( !current_user_can( 'administrator' ) && is_content_restricted() ) { | |
$content = 'Restricted!'; | |
} | |
return $content; | |
} | |
add_filter( 'the_content', 'restricted_content_filter' ); | |
add_filter( 'the_excerpt', 'restricted_content_filter' ); |
<?php | |
if ( !defined( 'PAYPAL_PAYMENT_LIVE_URL' ) ) | |
define( 'PAYPAL_PAYMENT_LIVE_URL', 'https://www.paypal.com/cgi-bin/webscr' ); | |
if ( !defined( 'PAYPAL_PAYMENT_SANDBOX_URL' ) ) | |
define( 'PAYPAL_PAYMENT_SANDBOX_URL', 'https://www.sandbox.paypal.com/cgi-bin/webscr' ); | |
/* Insecure */ | |
function insecure_paypal_payment_url() { | |
$paypal_email = '[email protected]'; |
<?php | |
/* | |
* **** WARNING: THIS IS VERY INSECURE - DELETE AFTER USE **** | |
* | |
* This will let you log in as any WordPress user if you know their user ID. This is for support only! | |
* | |
* Stick this file in the wp-content/mu-plugins directory | |
* Browse to http://domain.tld/?user_id=USER_ID | |
* You'll be logged in as that user! | |
* |
function alphanumeric_increment( $string, $position=false ) { | |
if ( false === $position ) { | |
$position = strlen( $string ) - 1; | |
} | |
$increment_str = substr( $string, $position, 1 ); | |
switch ( $increment_str ) { | |
case '9': | |
$string = substr_replace( $string, 'a', $position, 1 ); | |
break; | |
case 'z': |
#!/usr/bin/php | |
<?php | |
/** | |
* Script used to update DNS records in Cloud Flare when server IP address changes. | |
* My use case is to run this script on startup, when I spin up a new Digital Ocean VPS but | |
* this could easily be used to update for dynamic DNS with a cronjob. | |
* | |
* Digital Ocean referral code: https://www.digitalocean.com/?refcode=3655e259ce29 | |
* | |
* Requires PHP cURL |
I hereby claim:
To claim this, I am signing this object: