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
xclip -sel clip < ~/.ssh/id_rsa.pub |
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
ivan@ivan:~/missions/wptest/src/wp-content/themes/calibrefx$ sudo phpcs --standard=WordPress $(find . -name '*.php') | |
ivan@ivan:~/missions/wptest/src/wp-content/themes/calibrefx$ phpcbf --standard=WordPress comments.php | |
Setup PHP code sniffer with WordPress standard | |
http://subharanjan.com/setup-php-codesniffer-along-wordpress-coding-standards-windows-xampp/ | |
ivan@ivan:/usr/share/php/PHP/CodeSniffer/Standards/WordPress$ |
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: Disable plugins when doing local dev | |
Description: If the WP_LOCAL_DEV constant is true, disables plugins that you specify | |
Version: 0.1 | |
License: GPL version 2 or any later version | |
Author: Mark Jaquith | |
Author URI: http://coveredwebservices.com/ | |
*/ |
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 | |
calibrefx_add_meta_group('themeoption-settings', 'breadcrumb', __('Breadcrumb', 'calibrefx')); | |
calibrefx_add_meta_group('themeoption-settings', 'content-archive', __('Content Archives', 'calibrefx')); | |
calibrefx_add_meta_group('themeoption-settings', 'comments', __('Comments', 'calibrefx')); | |
calibrefx_add_meta_option( | |
'breadcrumb', // group id | |
'gplus_profile', // field id and option name | |
__('Google Plus Profile'), // Label | |
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
find sip-design/ -iname 'thumbs.db' -exec rm -rfv {} + |
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 serve_file_resumable ($file, $contenttype = 'application/octet-stream') { | |
// Avoid sending unexpected errors to the client - we should be serving a file, | |
// we don't want to corrupt the data we send | |
@error_reporting(0); | |
// Make sure the files exists, otherwise we are wasting our time | |
if (!file_exists($file)) { | |
header("HTTP/1.1 404 Not Found"); | |
exit; |
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
wp core install --url=url --title=site-title [--admin_name=username] --admin_email=email --admin_password=password | |
wp core [download|config|install|install_network|version|update|update_db] | |
wp db [create|drop|optimize|repair|connect|cli|query|export|import] | |
wp eval-file | |
wp eval | |
wp export [validate_arguments] | |
wp generate [posts|users] | |
wp home | |
wp option [add|update|delete|get] |
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/local/apache/bin/ab -t 30 -c 5 http://www.seputarukm.com/ |
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
wp_embed_register_handler( 'gist', '#https://gist\.github\.com/(.+?)/(.+?)($|&)#i', 'wp_embed_handler_gist' ); | |
function wp_embed_handler_gist( $matches, $attr, $url, $rawattr ) { | |
$embed = sprintf( | |
'<script src="https://gist.github.com/%1$s/%2$s.js"></script>', | |
esc_attr($matches[1]), | |
esc_attr($matches[2]) | |
); |