- Cloudflare
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
upstream phpfpm { | |
server localhost:9000; | |
} | |
server { | |
listen 80; | |
server_name _; | |
root /var/www/html; | |
index index.php index.html index.htm; |
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 | |
function transient_remote_get($url, $expiration = 3600) { | |
$transient = 'remote_get-' . md5($url); | |
if ( ! ($response_body = get_transient($transient)) ) { | |
$response = wp_remote_get($url); | |
if( !is_wp_error($response) && $response["response"]["code"] === 200 ) { | |
$response_body = $response["body"]; | |
set_transient($transient, $response_body, $expiration); | |
} else { | |
$response_body = false; |
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
CREATE TABLE `innodb_table_stats` ( | |
`database_name` varchar(64) COLLATE utf8_bin NOT NULL, | |
`table_name` varchar(64) COLLATE utf8_bin NOT NULL, | |
`last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, | |
`n_rows` bigint(20) unsigned NOT NULL, | |
`clustered_index_size` bigint(20) unsigned NOT NULL, | |
`sum_of_other_index_sizes` bigint(20) unsigned NOT NULL, | |
PRIMARY KEY (`database_name`,`table_name`) | |
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin STATS_PERSISTENT=0; |
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 | |
rm -rf /tmp/* | |
rm -f /etc/ssh/ssh_host_* | |
if [ -d /var/log ]; then | |
find /var/log -type f -print | xargs -L1 /bin/cp /dev/null | |
fi | |
if [ -d /var/spool/mail ]; then | |
find /var/spool/mail -type f -print | xargs -L1 /bin/cp /dev/null | |
fi |
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_filter('the_content', 'my_shortcode', 7); | |
function my_shortcode( $content ) { | |
global $shortcode_tags; | |
$shortcode_tags_org = $shortcode_tags; | |
remove_all_shortcodes(); | |
add_shortcode('code', 'my_shortcode_handler'); | |
$content = do_shortcode( $content ); |
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
msgid "" | |
msgstr "" | |
"Project-Id-Version: my-plugin\n" | |
"Report-Msgid-Bugs-To: \n" | |
"POT-Creation-Date: \n" | |
"PO-Revision-Date: \n" | |
"Last-Translator: Your Name Here <Your E-Mail Here>\n" | |
"Language-Team: JAPANESE <http://wppluginsj.sourceforge.jp/>\n" | |
"Language: ja_JP\n" | |
"MIME-Version: 1.0\n" |
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 | |
/* | |
Plugin Name: My API | |
Version: 0.1-alpha | |
Description: 記事取得用 API | |
Author: wokamoto@digitalcube | |
Author URI: https://digitalcube.jp | |
Plugin URI: https://digitalcube.jp | |
Text Domain: my-api | |
Domain Path: /languages |
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 | |
if ( !function_exists('fetch_feed') ) | |
include_once(ABSPATH . WPINC . "/feed.php"); | |
if ( !class_exists('fetch_feed_wrapper') ): | |
class fetch_feed_wrapper { | |
private $feed; | |
private $current = 0; |
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
--- includes/rewrite.php.org 2014-07-01 10:51:03.000000000 +0900 | |
+++ includes/rewrite.php 2014-07-01 10:51:50.000000000 +0900 | |
@@ -38,7 +38,7 @@ | |
$permastruct = $wp_rewrite->permalink_structure; | |
- if ( ! apache_mod_loaded( 'mod_rewrite', true ) && ! iis7_supports_permalinks() ) | |
+ if ( ! got_url_rewrite() ) | |
$permastruct = preg_replace( '#^/index\.php#', '/index.php/%lang%', $permastruct ); | |
elseif ( is_multisite() && ! is_subdomain_install() && is_main_site() ) |