Skip to content

Instantly share code, notes, and snippets.

View DriftwoodJP's full-sized avatar

DriftwoodJP DriftwoodJP

View GitHub Profile
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 {
<?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
*/
@DriftwoodJP
DriftwoodJP / CSS-Gradient-Bottom-Border.markdown
Last active August 29, 2015 14:10
CSS Gradient Bottom Border
@DriftwoodJP
DriftwoodJP / CSS-Overlaying-a-Horizontal-Line.markdown
Last active August 29, 2015 14:10
CSS Overlaying a Horizontal Line
#!/usr/bin/ruby
require 'readline'
# Create cask list
puts "\nCreate cask list...\n"
list = `brew cask list`
casks = list.delete(' (!)').split("\n")
puts "#{casks}\n"
# Check update cask
@DriftwoodJP
DriftwoodJP / git-clone-all.sh
Created February 6, 2015 12:13
すべての remote branch を git clone するスクリプト
#!/bin/bash
# git clone all remote branches locally
# https://coderwall.com/p/0ypmka/git-clone-all-remote-branches-locally
for branch in `git branch -a | grep remotes | grep -v HEAD | grep -v master `; do
git branch --track ${branch#remotes/origin/} $branch
done
@DriftwoodJP
DriftwoodJP / .csscomb.json
Created March 29, 2016 09:00
CSScomb - .csscomb.json follows Google HTML/CSS Style Guide
{
"remove-empty-rulesets": true,
"always-semicolon": true,
"color-case": "lower",
"block-indent": " ",
"color-shorthand": true,
"element-case": "lower",
"eof-newline": true,
"leading-zero": false,
"quotes": "single",
@DriftwoodJP
DriftwoodJP / socialButtons.php
Last active June 2, 2016 08:03
CSS Simple Sharing Buttons with SNS Count Cache plugin - Use `<?php get_template_part('socialButtons'); ?>` in WordPress post template file.
<?php
/**
* CSS Simple Sharing Buttons with SNS Count Cache plugin
* Use `<?php get_template_part('socialButtons'); ?>` in WordPress post template file.
*
* CSS Simple Sharing Buttons: http://codepen.io/DriftwoodJP/pen/XdQKZY
* WordPress with SNS Count Cache plugin: https://gist.github.com/DriftwoodJP/39e894a5d4d32b1c55f2040f45f19cc6
* Blog: http://www.d-wood.com/blog/2016/06/02_8104.html
*/
@DriftwoodJP
DriftwoodJP / functions.php
Created June 6, 2016 10:44
wp_enqueue_scripts をフックし、スクリプトとスタイルをキューに入れる
<?php
/**
* WordPress でスクリプトとスタイルをキューに入れる
*
* @link http://notnil-creative.com/blog/archives/1299
* @return boolean wp_enqueue_scripts をフックし my_scripts を有効化。常に true。
*/
function my_scripts() {
// 管理画面では読み込まない