Skip to content

Instantly share code, notes, and snippets.

View tekapo's full-sized avatar

Tai / JOTAKI Taisuke tekapo

View GitHub Profile
@salcode
salcode / .editorconfig
Last active October 15, 2022 21:22
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
@skorasaurus
skorasaurus / 1-wp-cli-shortcuts
Last active February 1, 2025 18:38
Manage WordPress via WP-CLI with these Shortcuts, scripts, functions, aliases.
update text inside a post
(we work with 3rd party vendors, their urls occasionally change;
or we changed a campaign's name used in google analytics) and limit it to ONLY published posts.
(sometimes, our marketing team wants to what see how content was EXACTLY in the past). wp-cli's search-replace command by default make edits in revisions.
(in this command, 'before' is what you want to get rid of and 'after' is what you want to replace 'before' with.
`wp db query "UPDATE $(wp db tables "*_posts") SET post_content = REPLACE(post_content, 'before', 'after') WHERE post_status = 'publish';"`
@torounit
torounit / useMeta.js
Last active September 1, 2020 03:28
useState 風味に WordPressのカスタムフィールドを扱うやつ
import { Fragment, useCallback } from '@wordpress/element';
import { useDispatch, useSelect } from '@wordpress/data';
const useMeta = ( key ) => {
const meta = useSelect( ( select ) => {
const { getEditedPostAttribute } = select( 'core/editor' );
const values = getEditedPostAttribute( 'meta' ) || {};
return values[ key ] || '';
}, [] );
@hughc
hughc / gutenberg-audit.php
Created April 20, 2020 10:36
Gutenberg Audit for WordPress
<?php
/*
Plugin Name: Gutenberg Audit
Plugin URI: http://highbrow.com.au/plugins/gutenberg-audit
description: What blocks is your site using?
Version: 0.1
Author: Hugh Campbell
Author URI: http://highbrow.com.au/
License: GPL2
*/
@tetsuharu-kono
tetsuharu-kono / wifi_site_survey.sh
Last active January 30, 2023 00:14
Wi-Fi site survey script for macOS
#!/bin/zsh
# Wi-Fi Site Survey
# 2020.07.22 Rev. 0.1
# First release
# 2023.01.30 Rev. 0.2
# Fixed channel and BSSID not being retrieved by Monterey
# Fail on unset variables and command errors
set -ue -o pipefail
@k16shikano
k16shikano / SKILL.md
Last active September 18, 2026 14:14
japanese-tech-writing/SKILL
name japanese-tech-writing
description 日本語の技術文書・書籍原稿の文章規範。段落と論証の構成(パラグラフライティング)、論証の厳密さ(ツッコミどころの除去)、読み手の負荷の管理、視点と語り、演出の抑制、LLM っぽい空句の禁止、翻訳調の比喩と擬人化の禁止(「運ぶ」「効く」「開かれた問い」など)、冗長の排除を定める。日本語で技術書の章、草稿、記事、解説文を書くとき、または推敲・リライトするときに使用する。
license Unlicense(https://gist.github.com/k16shikano/67625f2a7d96e3bbdfae8d571a936063

日本語技術文書の文章規範

日本語で技術的な原稿(書籍の章、記事、解説文)を書く・推敲するときは、以下の規範に従う。