This file contains hidden or 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 | |
/** | |
* Estimator class to get estimated time left. | |
*/ | |
class Estimator { | |
public $total = 0; | |
public $count = 0; | |
public $start_time = 0; |
This file contains hidden or 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 | |
/** | |
* Adds a value to cache. | |
* | |
* If the specified key already exists, the value is not stored and the function | |
* returns false. | |
* | |
* @link http://www.php.net/manual/en/memcached.add.php | |
* | |
* @param string $key The key under which to store the value. |
This file contains hidden or 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: SSH Remote Test | |
*/ | |
add_action( 'admin_init', 'ssh_remote_test', 1 ); | |
function ssh_remote_test() { |
This file contains hidden or 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: SSH Remote Test | |
*/ | |
add_action( 'admin_init', 'ssh_remote_test', 1 ); | |
function ssh_remote_test() { |
This file contains hidden or 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
#!/bin/bash | |
##################### | |
# bacon.sh | |
# | |
# Client to get paragraphs of garbage content from baconipsum.com | |
# | |
# usage: | |
# bacon.sh <paragraph-count> | |
##################### |
This file contains hidden or 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
// USERHTML - Wildcat User List to HTML Converter | |
// By: Pete Nelson ([email protected]) | |
dim urec as userrecord | |
dim today as date, now as time, domain as string | |
if not exists("userhtml.cfg") then | |
cls | |
print "@0A@What is your domain name@07@: " defcolor; |
This file contains hidden or 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 | |
register_rest_route( 'test', '/v1/schema-test', array( | |
'methods' => 'POST', | |
'callback' => __NAMESPACE__ . '\handle_endpoint', | |
'args' => array( | |
'mybools' => array( | |
'required' => true, | |
'type' => 'array', // We require an array of items. | |
'items' => array( |
This file contains hidden or 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
#!/bin/bash | |
DATE=$(date "+%Y-%m-%d") | |
GITHUB_OWNER=petenelson | |
BACKUPS_DIR=~/backups | |
TAR_FILE=github-repos-$DATE.tar.gz | |
S3_BUCKET=s3://github-offsite-backup | |
# Creates a directory if it doesn't exist | |
# $1: dir path |
This file contains hidden or 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 | |
add_action( 'wp_enqueue_scripts', 'add_localized_js_data' ); | |
function add_localized_js_data() { | |
wp_enqueue_script( 'my-frontend-script-handle', 'url to my frontend Javascript', array( 'jquery' ) ); | |
$data = array( | |
'ajax_url' = admin_url( 'admin-ajax.php' ), |