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
#!/bin/sh | |
set -e | |
set -x | |
for package in $(npm -g outdated --parseable --depth=0 | cut -d: -f3) | |
do | |
npm -g install "$package" | |
done |
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/env bash | |
# args | |
MSG=${1-'deploy from git'} | |
BRANCH=${2-'trunk'} | |
# paths | |
SRC_DIR=$(git rev-parse --show-toplevel) | |
DIR_NAME=$(basename $SRC_DIR) | |
DEST_DIR=~/svn/$DIR_NAME/$BRANCH |
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
if (!function_exists('write_log')) { | |
function write_log ( $log ) { | |
if ( true === WP_DEBUG ) { | |
if ( is_array( $log ) || is_object( $log ) ) { | |
error_log( print_r( $log, true ) ); | |
} else { | |
error_log( $log ); | |
} | |
} | |
} |
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
{ | |
"name": "name/site", | |
"type": "project", | |
"license": "MIT", | |
"description": "A modern WordPress stack for Name.com", | |
"homepage": "http://name.com/", | |
"authors": [ | |
{ | |
"name": "James DiGioia", | |
"email": "jamesorodig@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
# Sync additional paths | |
extra_paths = [ | |
['../../../plugins/wp-gistpen', File.join(bedrock_path_server, 'web/app/plugins/wp-gistpen')] | |
] | |
extra_paths.each do |paths| | |
extra_path = paths[0] | |
extra_path_server = paths[1] | |
initial_mount = File.join('/wptmp', File.basename(extra_path)) |
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 | |
namespace WP_Gistpen; | |
/** | |
* This is the class description. | |
* | |
* @package WP_Gistpen | |
* @author James DiGioia <jamesorodig@gmail.com> | |
* @link http://jamesdigioia.com/wp-gistpen/ | |
* @since [current version] |
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
public static function activate() { | |
if ( ! version_compare( PHP_VERSION, '5.3', '<' ) ) { | |
return; | |
} | |
deactivate_plugins( 'url-embedlifier' ); | |
wp_die('<p>The <strong>URL Embedlifier</strong> plugin requires PHP version 5.3 or greater.</p>', | |
'Plugin Activation Error', array( 'response' => 200, 'back_link' => true ) ); | |
} |
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
if ( ! empty( $errors ) ) { | |
add_filter('redirect_post_location', function( $location ) use ( $errors ) { | |
return add_query_arg( 'gistpen-errors', implode( ",", $errors ), $location ); | |
}); | |
} |
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
if ( $errors = get_transient( "my_save_post_errors_{$post_id}_{$user_id}" ) ) { | |
foreach( $errors as $error ) { ?> | |
<div class="error"><p> | |
<?php echo $error; ?> | |
</p></div><?php | |
} | |
delete_transient( "my_save_post_errors_{$post_id}" ) | |
} |
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
if ( array_key_exists( 'my_plugin_errors', $_SESSION ) ) { | |
foreach( $_SESSION['my_plugin_errors'] as $error ) {?> | |
<div class="error"><p> | |
<?php echo $error; ?> | |
</p></div><?php | |
} | |
unset( $_SESSION['my_plugin_errors'] ); | |
} |
OlderNewer