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
cat ~/.ssh/id_rsa.pub | ssh [email protected] "cat >> ~/.ssh/authorized_keys" |
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( 'add_meta_boxes', function() { | |
add_meta_box( 'asdf123_editors', 'Editors', function() { | |
wp_editor( 'Drag/Drop => True', 'asdf123_editor_1', array( | |
'drag_drop_upload' => true, | |
) ); |
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
function get_current_post_type() { | |
global $post, $typenow, $current_screen, $pagenow; | |
if ( 'post.php' === $pagenow || 'post-new.php' === $pagenow ) { | |
if ( $post && $post->post_type ) { | |
return $post->post_type; | |
} |
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 | |
class Easy_Weather_Widget_Settings { | |
private $option_name = 'eww_settings'; | |
private $option_value = null; | |
function __construct() { |
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
tinymce.init({ | |
plugins: "paste", | |
paste_as_text: true | |
}); |
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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing! | |
VAGRANTFILE_API_VERSION = "2" | |
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
config.vm.box = "precise32" | |
config.vm.box_url = "http://files.vagrantup.com/precise32.box" |
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
#!/usr/bin/env bash | |
if [ $# -lt 3 ]; then | |
echo "usage: $0 <db-name> <db-user> <db-pass> [db-host] [wp-version]" | |
exit 1 | |
fi | |
DB_NAME=$1 | |
DB_USER=$2 |
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 | |
/** | |
* Implements register_wpmdbpro command. | |
*/ | |
class MDB_Pro_Command extends WP_CLI_Command { | |
/** | |
* Registers WP Migrate DB Pro. | |
* | |
* ## OPTIONS |
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 | |
class Demo_Plugin_Test extends WP_UnitTestCase { | |
function test_init() { | |
$demo_plugin = $this->getMockBuilder( 'Demo_Plugin' ) | |
->disableOriginalConstructor() | |
->setMethods( 'attach_hooks' ) | |
->getMock(); |
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: Unit Testing Demo Plugin | |
Plugin URI: http://example.com | |
Description: Let's get started unit testing | |
Author: Me | |
Version: 0.1 | |
Author URI: http://example.com | |
*/ |