View amazon_widget_sample.php
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 create_url($params,$aws_secret_key) { | |
// The region you are interested in | |
$endpoint = "webservices.amazon.co.jp"; | |
$uri = "/onca/xml"; | |
// Set current timestamp if not set | |
if (!isset($params["Timestamp"])) { |
View total_characters_on_wordpress.sql
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
-- WordPressに記事として書かれている文章のおおよその総文字数を求めるSQL文 | |
-- なお、本SQL文を利用することにより得られた結果については責任は負いかねます。 | |
select sum(char_length(regexp_replace(regexp_replace(regexp_replace(post_content,'<.+?>',''),'&.+?;','_'),'(\s+|\r\n|\n)',''))) | |
as total from wp_posts where post_status = 'publish' and post_type = 'post'; |
View total_characters_on_wordpress_excluding_examples.sql
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
-- WordPressに記事として書かれている文章のうち、 | |
-- 設定ファイル、プログラム例及びコマンドの出力結果などを除いた部分のおおよその総文字数を求めるSQL文 | |
-- なお、本SQL文を利用することにより得られた結果については責任は負いかねます。 | |
select sum(char_length(regexp_replace(regexp_replace(regexp_replace(regexp_replace(post_content,'(?s)<div class="code">((?!</div>).)*?</div>',''),'<.+?>',''),'&.+?;','_'),'(\s+|\r\n|\n)',''))) | |
as total from wp_posts where post_status = 'publish' and post_type = 'post'; |
View wordpress_acl_example.conf
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
# Access is only allowed via local access | |
# Change this once configured | |
<Directory /usr/share/a> | |
AllowOverride Options | |
<IfModule mod_authz_core.c> | |
# Apache 2.4 | |
Require all granted | |
Require local | |
</IfModule> |
View leaflettest.html
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
<html> | |
<head> | |
<title>An example of a map by leaflet.</title> | |
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.3.4/dist/leaflet.css" | |
integrity="sha512-puBpdR0798OZvTTbP4A8Ix/l+A4dHDD0DGqYW6RQ+9jxkRFclaxxQb/SJAWZfWAkuyeQUytO7+7N4QKrDh+drA==" | |
crossorigin=""/> | |
<script src="https://unpkg.com/leaflet@1.3.4/dist/leaflet.js" | |
integrity="sha512-nMMmRyTVoLYqjP9hrbed9S+FzjZHW5gY1TWCHA5ckwXZBadntCNs8kEqAWdrb9O7rxbCaA4lKTIWjDXZxflOcA==" | |
crossorigin=""></script> | |
<script type="text/javascript"> |
View simple_leaflet_demo.php
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 | |
/* | |
このコードを使用した結果に関しては、いかなる保証も行いませんので、 | |
その点につきましてはあしからずご了承ください。 | |
*/ | |
$_simple_leaflet_demo_map_number = 0; | |
function simple_leaflet_demo($atts) { | |
global $_simple_leaflet_demo_map_number; | |
$atts = shortcode_atts(array( |
View link_cache_sample.sql
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 `link_cache` ( | |
`id` int(11) NOT NULL AUTO_INCREMENT, | |
`card_for_index` varchar(4096) DEFAULT NULL, | |
`sales_rank` integer DEFAULT NULL, | |
`generated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, | |
PRIMARY KEY (`id`) | |
) ENGINE=InnoDB DEFAULT CHARSET=utf8; |
View mediawiki_example.conf
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
# This is a sample configuration for a wiki instance located under | |
# /var/www/wiki and exposed as http://thishost/wiki. Please read | |
# /usr/share/doc/mediawiki/README.RPM on whether to use this | |
# instance or create copies of it. | |
# Alias /wiki/skins /usr/share/mediawiki/skins | |
# Alias /wiki /var/www/wiki | |
# If your DocumentRoot points into the wiki itself all that is needed is |
View quicklatex-format.css.diff
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
--- quicklatex-format.css.ORG 2017-11-19 15:59:10.197954451 +0900 | |
+++ quicklatex-format.css 2017-11-19 16:36:40.229951065 +0900 | |
@@ -19,7 +19,7 @@ | |
padding:0px !important; | |
margin:0px !important; | |
vertical-align:middle !important; | |
- display:inline-block !important; | |
+ display:inline-block !important; | |
} | |
View moviefilelist.py
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/python | |
import httplib2 | |
import os | |
import sys | |
import json | |
import argparse | |
from apiclient.discovery import build | |
from oauth2client.client import flow_from_clientsecrets |