Skip to content

Instantly share code, notes, and snippets.

View DriftwoodJP's full-sized avatar

DriftwoodJP DriftwoodJP

View GitHub Profile
<?php
/**
* WordPress Query Comprehensive Reference
* Compiled by luetkemj - luetkemj.com
* Japanese translated by hissy
*
* CODEX: http://wpdocs.sourceforge.jp/%E9%96%A2%E6%95%B0%E3%83%AA%E3%83%95%E3%82%A1%E3%83%AC%E3%83%B3%E3%82%B9/WP_Query#.E3.83.91.E3.83.A9.E3.83.A1.E3.83.BC.E3.82.BF
* Source: https://core.trac.wordpress.org/browser/tags/3.9/src/wp-includes/query.php
* Original: https://gist.github.com/luetkemj/2023628/9e911982440141a13cb1dd8ba1ad6b35cd7bbdd7
*/
body {
font-family: Helvetica, arial, sans-serif;
font-size: 14px;
line-height: 1.6;
padding-top: 10px;
padding-bottom: 10px;
background-color: white;
padding: 30px; }
body > *:first-child {
@DriftwoodJP
DriftwoodJP / bingo_machine.rb
Created August 19, 2014 12:01
Mac に数字を読み上げてもらうビンゴ抽選器をつくる | http://www.d-wood.com/blog/2014/08/22_6662.html
require 'readline'
def notification(message, title='Bingo Machine', subtitle='', sound='Glass')
[message, title, subtitle, sound].each{|arg| arg.gsub!(/"/, '\\\\\"')}
scpt = 'display notification "%s"' % message
scpt << ' with title "%s"' % title
scpt << ' subtitle "%s"' % subtitle unless subtitle.empty?
scpt << ' sound name "%s"' % sound unless sound.empty?
@DriftwoodJP
DriftwoodJP / argv_cmd.rb
Created May 15, 2014 07:30
ruby で ARGV をうけるコマンドっぽいものを作ってみる | http://www.d-wood.com/blog/2014/05/15_6221.html
#!/usr/bin/ruby
require 'optparse'
# default options
USER = 'Tom'
PASSWORD = 'tomtom'
SERVER = 'localhost'
OPTS = {}
@DriftwoodJP
DriftwoodJP / backlog.rb
Last active August 29, 2015 14:01
Backlog API に ruby スクリプトから接続する | http://www.d-wood.com/blog/2014/05/12_6190.html
require 'xmlrpc/client'
require 'pp'
#
# Backlog の設定情報
#
# Backlog URI のサーバー名
SPACE = 'スペース名'
# 少し凝った zshrc
########################################
# 環境変数
export LANG=ja_JP.UTF-8
# 色を使用出来るようにする
autoload -Uz colors
colors
# Make sure using latest Homebrew
update
# Update already-installed formula
upgrade
# Add Repository
# tap homebrew/versions
# tap homebrew/binary
@DriftwoodJP
DriftwoodJP / wp_research.rb
Last active January 3, 2016 20:39
WordPress: shortcode が含まれたエントリをリストアップする | http://www.d-wood.com/blog/2014/01/21_5319.html
require 'mysql'
require 'inifile'
# 設定
mycnf = IniFile.load('/home/****/.my.cnf')['client']
sqls = {
default: "SELECT id FROM wp_posts WHERE post_type = 'post' AND post_status = 'publish' AND post_content LIKE '%[short-code%';"
}
@DriftwoodJP
DriftwoodJP / 0_reuse_code.js
Created December 27, 2013 09:20
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@DriftwoodJP
DriftwoodJP / README.md
Last active December 23, 2015 21:09
Vagrant: ドットインストールの開発環境構築レッスンをベースにWordPress環境をProvisioningしてみた | http://www.d-wood.com/blog/2013/09/26_4711.html