Skip to content

Instantly share code, notes, and snippets.

View tekapo's full-sized avatar

Tai / JOTAKI Taisuke tekapo

View GitHub Profile
@tekapo
tekapo / .editorconfig
Created December 4, 2021 03:26 — forked from salcode/.editorconfig
WordPress .editorconfig - modified version of the WordPress coding standards
# EditorConfig helps keep your project formatting consistent.
# See https://EditorConfig.org
#
# This is a modified version of the WordPress coding standards.
#
# Author: Sal Ferrarello (@salcode)
# https://salferrarello.com/wordpress-editorconfig/
#
# You can download this file directly
# to your project from the command-line with
@tekapo
tekapo / gist:4c8ca898739eb0fd89395a790035915e
Created April 8, 2020 07:50
set up WordPress on Shifter-Local
sudo -u www-data wp core install \
--path=/var/www/html/web/wp \
--url=example.com \
--title=Example \
--admin_user=supervisor \
--admin_password=strongpassword \
--admin_email=info@example.com \
&& \
sudo -u www-data wp plugin install \
--path=/var/www/html/web/wp \
@tekapo
tekapo / example.php
Created November 16, 2012 05:37 — forked from wokamoto/example.php
how to use class-wp_post_helper
<?php
require_once('/path/to/wordpress/wp-load.php');
require_once('class-wp_post_helper.php');
// initialize
$post = new wp_post_helper(array(
'post_name' => 'slug' , // slug
'post_author' => 1 , // author's ID
'post_date' => '2012/11/15 20:00:00' , // post date and time
'post_type' => 'posts' , // post type (you can use custom post type)
@tekapo
tekapo / gist:8627546
Created January 26, 2014 02:47
Import the Japanese version test data of WordPress with WP-CLI
wget https://raw.github.com/jawordpressorg/theme-test-data-ja/master/wordpress-theme-test-date-ja.xml && wp plugin install wordpress-importer --activate && wp import wordpress-theme-test-date-ja.xml --authors=create && rm wordpress-theme-test-date-ja.xml
export PS1="[\u@\h \W]\\$ "
HISTIGNORE=rm\ *
alias vi="vim"
alias delmacfile="find . -name \".DS_Store\" -exec rm -f {} \;"
alias ql='qlmanage -p "$@" >& /dev/null'
alias svndel="svn st | grep '^!' | sed -e 's/\![ ]*/svn del /g' | sh"
alias svnadd="svn st | grep '^?' | sed -e 's/\?[ ]*/svn add /g' | sh"
alias yuicomp="/usr/local/bin/yuicompressor --charset UTF-8 -o"
@tekapo
tekapo / view_template_files.php
Last active December 11, 2015 02:19 — forked from gatespace/view_template_files.php
hookをwp_footerにしてみた。
/*
WordPressのテーマにおいて、テンプレート階層に基づきどのテンプレートファイルが使われているか書き出すコード。
ただし、header.php や get_template_part などでインクルードされているファイルを除く。
フックする場所をwp_footerにしてみた。
*/
if ( !function_exists( 'view_template_files' ) ):
function view_template_files() {
if (WP_DEBUG) {
global $template;
@tekapo
tekapo / gist:d776bfe5d89ad2acb1dc
Last active November 17, 2015 14:59
WordCamp San Francisco 2014 行動規範

行動規範

1. 目的

私たちのコミュニティはみんなのために本当の意味でオープンであるべきだと、WordCamp San Franciscoは信じでいます。そのため、男女、性的指向、障害、人種、宗教、好みのOSやプログラミング言語やテキスト・エディターを問わず、すべての方に、心地よく安全で快適な環境を提供することに私たちは全力を尽くします。

この行動規範では、参加者の行為に対する私たちの期待だけでなく、容認できない行為が及ぼす結果についてもまとめています。

すべての人にとって安全で建設的なカンファレンスの体験を実現するため、すべてのスポンサー、ボランティア、スピーカー、参加者、および他の参加者のみなさんに協力するよう私たちは要請します。

@tekapo
tekapo / gist:4108697
Created November 19, 2012 02:45 — forked from tecking/gist:4108680
最強のテンプレートタグ get_the_khoshino()
<?php
function get_the_khoshino() {
return 'やはりですか。なるほどですね。';
}
?>
@tekapo
tekapo / gist:588f3fde826de8da570a
Last active August 29, 2015 14:06
WordCamp San Francisco 2014 Code of Conduct の訳(原文併記)

行動規範

Code of Conduct

1. 目的

1. Purpose

私たちのコミュニティはみんなのために本当の意味でオープンであるべきだと、WordCamp San Franciscoは信じでいます。そのため、男女、性的指向、障害、人種、宗教、好みのOSやプログラミング言語やテキスト・エディターを問わず、すべての方に、心地よく安全で快適な環境を提供することに私たちは全力を尽くします。

WordCamp San Francisco believes our community should be truly open for everyone. As such, we are committed to providing a friendly, safe and welcoming environment for all, regardless of gender, sexual orientation, disability, ethnicity, religion, preferred operating system, programming language, or text editor.