Skip to content

Instantly share code, notes, and snippets.

Hitoshi Hayakawa hykw

Block or report user

Report or block hykw

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
hykw / gist:85860e7e9b5bfdd113d6
Last active Aug 29, 2015
wordpress: 相対パスでのwp-load.phpの読み込み方
View gist:85860e7e9b5bfdd113d6
$wpload = sprintf('%s/wp-load.php', $_SERVER['DOCUMENT_ROOT']);
hykw / gist:f62244c4fe1924ecfd6d
Last active Aug 29, 2015
wordpress: 固定ページでページング
View gist:f62244c4fe1924ecfd6d
# ページングタグを表示する所で設定
hykw / gist:3e43d3e62d34bb7e718e
Created Jul 18, 2014
wordpress: 投稿画面の項目非表示
View gist:3e43d3e62d34bb7e718e
function remove_default_post_screen_metaboxes() {
remove_meta_box( 'tagsdiv-post_tag' , 'post' , 'side' ); /* 投稿のタグ */
hykw / gist:27f9586f2e9af88afe56
Created Jul 18, 2014
wordpress: 投稿画面に注記を追加
View gist:27f9586f2e9af88afe56
function after_title() {
echo '<p>これはタイトル下に表示される</p>';
add_action( 'edit_form_after_title', 'after_title' );
function after_editor() {
echo '<p>これはエディタ下に表示される</p>';
add_action( 'edit_form_after_editor', 'after_editor' );
hykw / gist:bb0a1d034b648c275643
Last active Aug 29, 2015
MySQL: Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation '='
View gist:bb0a1d034b648c275643
character-set-server = utf8
init_connect='SET collation_database = utf8_general_ci; SET collation_connection = utf8_general_ci'
mysql> ALTER DATABASE db CHARACTER SET utf8 COLLATE utf8_general_ci
View gist:65fb50edf11edf1cd9bc
$nonce = wp_nonce_field('pagename', '_wpnonce', true, false);
if(is_page('pagename') && isset($_POST['_wpnonce']) && wp_verify_nonce($_POST['_wpnonce'], 'pagename')) {
} else {
View gist:cccc8790fbb252ec7357
openssl s_client -connect
というか、telnet-ssl 入れて
telnet-ssl -z ssl 443
hykw / gist:1c086f031b28fd942455
Created Sep 12, 2014
telnet のかわりに openssl で接続
View gist:1c086f031b28fd942455
openssl s_client -connect -quiet
hykw / gist:2051d82ef2ec76869e03
Last active Aug 29, 2015
svnのcopy, merge, switch方法
View gist:2051d82ef2ec76869e03
svn copy trunk branches/hogehoge
svn commit
→ リビジョン12345とする
# 〜〜〜 branchで作業、最終リビジョンは22222
# BASEディレクトリにcd(svn mergeはパスを指定しないと作業ディレクトリを対象にしちゃうので)
cd ~/svn/hogeSVN
# 12345〜22222(≒ HEAD)の修正を trunk にマージ
You can’t perform that action at this time.