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 | |
// これでWordPress関数がほとんど使えるようになる! | |
include 'wp-load.php'; | |
// オプションを10件取得 | |
$options = $wpdb->get_results("SELECT * FROM {$wpdb->options} LIMIT 10"); | |
// 公開済み投稿の本文の長さを全部足す | |
$query = <<<SQL | |
SELECT SUM(CHAR_LENGTH(post_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
<?php | |
$table = new \cli\Table(); | |
$table->setHeaders( $header ); | |
$table->setRows( $body ); | |
$table->display(); |
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
<?xml version="1.0" encoding="UTF-8" standalone="no"?> | |
<!DOCTYPE html> | |
<html xmlns="http://www.w3.org/1999/xhtml" class="blog logged-in epub-toc rtl" | |
xmlns:epub="http://www.idpf.org/2007/ops"> | |
<head> | |
<meta charset="UTF-8"/> | |
<title> 目次</title> | |
<meta name="viewport" content="width=device-width"/> | |
<link rel="stylesheet" href="../Asset/wp-content/themes/hametuha/assets/css/epub.css" type="text/css"/> | |
</head> |
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 php | |
<?php | |
if( isset( $argv[1] ) && preg_match('/(-{1,2})?help$/', $argv[1] ) ) { | |
echo <<<'TXT' | |
/** | |
* Archive git diff file between specified commit | |
* | |
* git_diff ./archive 29879823c HEAD | |
* | |
* Enter above, diff between HEAD and 29879823c will be arvhived to `./archive`. |
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 | |
/* | |
* @pakage WordPress | |
* This file resolve external js and css loading and their chaching. | |
* Put this file in your theme foloer and | |
* write the line below in your theme's "functions.php" | |
* | |
* require_once(TEMPLATEPATH."/wp-assets.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
/** | |
* Code snipet for fade in & out with MooTools. | |
* @author Takahashi Fumiki | |
* @description | |
*/ | |
Element.prototype.fadeIn = function(display){ | |
if(display == undefined) | |
display = "block"; | |
var fx = new Fx.Morph(this); |
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
<!DOCTYPE html> | |
<html lang="ja"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> | |
<meta name="viewport" content="width=device-width , user-scalable=no , inicial-scale=1 , maximum-scale=1" /> | |
<title>問わずがたりの洋酒外史</title> | |
<style> | |
body{ | |
font-family:"HiraKakuProN-W3", serif; | |
font-size:12px; |
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
/** | |
* Style sheet for rendering <ruby> properly. | |
* | |
* @source | |
*/ | |
ruby{ | |
overflow:hidden; | |
display:inline-table; | |
line-height:inherit; | |
vertical-align:text-bottom; |
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
zip -X0 ../sample.epub mimetype | |
zip -rDX9 ../sample.epub * -x "*.DS_Store" -x mimetype |
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 | |
/** | |
* XMLの特定のタグにインテルを挿入する | |
* | |
* インテルとは活版印刷で用いられる活字間の隙間を挿入する金属のことです。 | |
* Webkitエンジンなど、CSSのtext-justifyプロパティに対応していないブラウザは | |
* テキストのジャスティフィケーションを半角スペースのサイズ調整で行います。 | |
* 日本語は分かち書きをしないため、半角スペースでのサイズ調整が適用されません。 | |
* このクラスでは指定されたタグの直下にあるすべてのテキストのノードに対して | |
* 空白を含むspanタグを挿入します。 |
OlderNewer