This file contains 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
### Keybase proof | |
I hereby claim: | |
* I am andrewwoods on github. | |
* I am awoods (https://keybase.io/awoods) on keybase. | |
* I have a public key whose fingerprint is 6FAE A355 37B1 9509 CB9A 102F C9CA 6422 EBB1 3F8A | |
To claim this, I am signing this object: |
This file contains 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
#!/usr/bin/php | |
<?php | |
/** | |
* Generate a password based on a pattern | |
* | |
* @package Command Line | |
* @subpackage Utilities | |
* @version 1.0 | |
* @author Andrew Woods <atwoods1@gmail.com> | |
* |
This file contains 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
-- Removing the keyword PASSWORD will set the password in plain text. | |
CREATE USER 'wp'@'%' IDENTIFIED BY 'password'; | |
-- | |
-- Assign permissions to the user you just created | |
-- | |
GRANT |
This file contains 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 | |
/** | |
* The base configurations of the WordPress. | |
* | |
* <ENVIRONMENT> Environment | |
* | |
* This file has the following configurations: MySQL settings, Table Prefix, | |
* Secret Keys, WordPress Language, and ABSPATH. You can find more information | |
* by visiting {@link http://codex.wordpress.org/Editing_wp-config.php Editing | |
* wp-config.php} Codex page. You can get the MySQL settings from your web host. |
This file contains 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( 'widgets_init', 'register_my_widget' ); | |
class My_Widget extends WP_Widget | |
{ | |
function __construct() { | |
$widget_options = array( | |
'classname' => 'my-widget-class' |
This file contains 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Rick Roll Example</title> | |
<script> | |
document.addEventListener( "DOMContentLoaded", function( event ) { | |
// Sun=0 | |
// Mon=1 |
This file contains 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
/* | |
* Include this in your primary plugin file | |
* | |
* Create a 'classes' directory in your plugin directory. | |
* To load a class nameed So_Awesome, it should be in classes/class-so-awesome.php | |
*/ | |
function your_plugin_autoloader( $class_name ) { | |
$slug = sanitize_title_with_dashes( $class_name, '', 'save' ); | |
$slug = str_replace('_', '-', $slug); |
This file contains 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
# | |
# wp_install - download wordpress, install, and configure it. | |
# | |
# $ wp_install <dirname> | |
# | |
function wp_install | |
{ | |
wp core download --path=$1 | |
cd $1 | |
read -p 'name the database:' dbname |
This file contains 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
# | |
# wp_install_plugins | |
# | |
# $ wp_install_plugins ~/wp-plugins.txt | |
# | |
# text file with a list of wordpress.org plugin slugs. one per line. | |
# | |
function wp_install_plugins | |
{ |
This file contains 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
Subject line | |
Describe what you did and why | |
[ticket: #X] | |
#------------------------------------------------@---------------------- | |
# | |
# * Separate subject from body with a blank line | |
# * Limit the subject line to 50 characters |
OlderNewer