Skip to content

Instantly share code, notes, and snippets.

View ShinichiNishikawa's full-sized avatar
🏠
Working from home

Shinichi Nishikawa ShinichiNishikawa

🏠
Working from home
View GitHub Profile
This file has been truncated, but you can view the full file.
{
"version": 8,
"name": "GSI Japan + OpenStreetMap based style for Geolonia",
"center": [
135.39,
37.46
],
"zoom": 5,
"sprite": "https://api.geolonia.com/v1/sprites/gsi",
"glyphs": "https://glyphs.geolonia.com/{fontstack}/{range}.pbf",
@ShinichiNishikawa
ShinichiNishikawa / gist:e2903b1a1626a418139ee5895e89ddbf
Created February 15, 2024 00:07
香川県勉強会 Geolonia の地図たち
高松スマートマップ https://maps.takamatsu-fact.com/
たかまつマイセーフティーマップ https://safetymap.takamatsu-fact.com/
男木島マップ https://geolonia.github.io/ogijima-smart-islands
かがわ DX Lab 観光・移住WG地図https://geolonia.github.io/kagawa-working-group/
防災 https://fix-layout.takamatsu-city-flood-prevention-headquarters.pages.dev/
#!/bin/sh -eu
# exit if wp-cli, wordmove or git is not installed.
type wp >/dev/null 2>&1 || { echo >&2 "wp-cli is not installed. Aborting."; exit 1; }
# Variables.
DIRNAME=${PWD##*/}
URL_LOCAL=$(cd ../../.. && echo "${PWD##*/}")
npm init --yes
@ShinichiNishikawa
ShinichiNishikawa / wp-backup.sh
Last active December 23, 2015 01:38
Local backup. Fetch remote files/db. Save log. Create email body. Save in Dropbox folder.
#!/bin/sh -u
# exit if wp-cli or wordmove is not installed.
type wp >/dev/null 2>&1 || { echo >&2 "wp-cli is not installed. Aborting."; exit 1; }
type wordmove >/dev/null 2>&1 || { echo >&2 "Wordmove is not installed. Aborting."; exit 1; }
type git >/dev/null 2>&1 || { echo >&2 "git is not installed. Aborting."; exit 1; }
# Variables.
URL_LOCAL=$(wp option get home)
@ShinichiNishikawa
ShinichiNishikawa / gulpfile.js
Last active November 26, 2015 08:42
gulpfile.js
var gulp = require("gulp");
var sass = require("gulp-sass");
var sourcemaps = require('gulp-sourcemaps');
var autoprefixer = require("gulp-autoprefixer");
var browserSync = require("browser-sync").create();
var plumber = require("gulp-plumber");
gulp.task('serve', ['sass'], function() {
browserSync.init({
@ShinichiNishikawa
ShinichiNishikawa / WP Content Area Markup
Last active March 18, 2016 05:20
Tags I use a lot in WordPress content area.
<h1>見出し壱:夏目漱石著『吾輩は猫である』</h1>
<h2>見出し弐:レオ・レオニ作『スイミー 小さなかしこいさかなのはなし』</h2>
<h3>見出し参:あまん きみこ作、上野 紀子絵『ちいちゃんのかげおくり』</h3>
<h4>見出し四:モンゴルの民話『スーホの白い馬』</h4>
<h5>見出し五:新美南吉作『手袋を買いに』</h5>
<h6>見出し六:芥川龍之介著『羅生門』</h6>
<h2>引用 (Blockquote) テスト</h2>
<blockquote>これは言語みたいなものだ。アルファベットすなわち音階を学び、文すなわちコードを学ぶ。そしてやがてホーンと即興で会話するようになる。即興で話すのはすばらしいことだと思うが、私には決して会得できないだろう。しかし音楽ともなれば、私は即座によろこんで会話する。そう、それがジャズ音楽のすべてだ。
<cite>スタン・ゲッツ</cite></blockquote>
@ShinichiNishikawa
ShinichiNishikawa / nskw-template-loader.php
Last active September 6, 2016 07:35
Load template file in plugin folder.
<?php
class nskw_template_loader {
public function __construct() {
add_filter( 'template_include', array( __CLASS__, 'template_loader' ) );
}
public static function template_loader( $template ) {
wp core download
wp core config --dbname=sample --dbuser=root --dbpass=root
wp core install --url=http://example.dev --title="WordPress Sample Site" --admin_user=nishikawa --admin_password=pass [email protected]
wp plugin install show-current-template wp-basic-auth theme-check plugin-check wp-multibyte-patch --activate
wp plugin install wordpress-beta-tester jetpack contact-form-7 vk-all-in-one-expansion-unit
wp plugin delete hello
wp option update blogdescription "This is a new project!!"
wp option update posts_per_page 5
wp option update thread_comments 1
wp option update thread_comments_depth 3
*.log
*.sql
.DS_Store
.htaccess
*.map
error_log
Movefile
wp-cli.yml
sitemap.xml
sitemap.xml.gz
@ShinichiNishikawa
ShinichiNishikawa / Movefile.init
Last active December 22, 2015 07:10
Movefile for my local
local:
vhost: "http://example.dev"
wordpress_path: "/Users/papa/Sites/example.dev"
database:
name: "example"
user: "root"
password: "root"
host: "localhost"