Skip to content

Instantly share code, notes, and snippets.

View ko31's full-sized avatar
I want to play catch!

Ko Takagi ko31

I want to play catch!
View GitHub Profile
@ko31
ko31 / add-japanese-providers-for-woocommerce-shipment-tracking.php
Last active October 8, 2020 00:06
Add japanese providers for WooCommerce Shipment Tracking
<?php
/**
* Add japanese providers for WooCommerce Shipment Tracking
*
* @param array $providers
*
* @return array
*/
add_filter( 'wc_shipment_tracking_get_providers', function ( $providers ) {
$providers = array_merge( $providers, [
@ko31
ko31 / gosign.txt
Last active December 21, 2023 14:40
Gosign
______ _____ _______ _____ ______ __ _
| ____ | | |______ | | ____ | \ |
|_____| |_____| ______| __|__ |_____| | \_|
@ko31
ko31 / howto.md
Last active April 17, 2020 02:47
How to change file descriptor limit settings on Mac OS

I got a "too many open files" error.

Error: EMFILE: too many open files, open '/path/to/filename'

I solved the problem by changing the file descriptor limit setting.

Environment

@ko31
ko31 / memo.md
Last active March 16, 2020 02:41
[WordPress]Return value of get_queried_object()
@ko31
ko31 / install.md
Last active January 29, 2021 11:56
Installing Laravel Homestead on MacOS 🔧

Laravel Homestead is official local development environment.
It is a great tool that allows you to easily create an environment with all the functions required for development.

The following is the steps for installing Laravel 6.x on MacOS with Homestead.

Install VirtualBox.

Install Vagrant.

@ko31
ko31 / 21st_century.geojson
Last active March 5, 2021 14:05
センバツ21世紀枠歴代出場校の geojson データ
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ko31
ko31 / post_slack.sh
Created January 8, 2020 23:59
How to easily post to slack channel with shell script
#!/bin/sh
curl -X POST https://slack.com/api/chat.postMessage \
-d "token=[REPLACE-YOUR-TOKEN]" \
-d "channel=#general" \
-d "text=Hello World!<!channel>"
@ko31
ko31 / post_slack.php
Created January 8, 2020 23:57
How to easily post to slack channel with PHP
<?php
// Your slack token
$token = 'YOURTOKEN';
// Your slack channel (e.g. #general)
$channel = '#general';
// Post message
$text = "<!channel>Hello World!";
@ko31
ko31 / download_website_by_wget.md
Last active December 17, 2019 06:51
Download website files using wget

Usage

wget -P /path/to/download -E -k -m -nH -np -p -c https://example.com
Option Overview
-P Set save directory path.
-E This option will cause the suitable suffix to be appended to the local filename.
@ko31
ko31 / manual.md
Last active May 4, 2020 07:16
XSERVER に wp-cli をインストール

手順

インストールするディレクトリ作成

mkdir -p ~/local/bin

インストール