Skip to content

Instantly share code, notes, and snippets.

View hayakawa's full-sized avatar

Yuta Hayakawa hayakawa

View GitHub Profile
@hayakawa
hayakawa / run_antelope.sh
Last active January 6, 2020 23:53
[ ATTENTION!: This script will be unnecessary just now! / See also: https://en.antelopeaudio.com/2020/01/antelope-audio-product-compatibility-with-macos-catalina/ ]Little code to run Antelope Launcher and Server on MacOS Catalina
#!/bin/bash
### Get my uid
UserID=`id -u`
echo "Your UID: ${UserID}"
### Unload root process
sudo launchctl unload /Library/LaunchDaemons/com.antelopeaudio.daemon.plist
### Kill the process if it was already awaken
@hayakawa
hayakawa / normalize_neologd_filter.py
Created November 30, 2017 05:02
Normalizer for neologd(This is modified version. you can use as a filter.)
# encoding: utf8
from __future__ import unicode_literals
import re
import unicodedata
import sys
################################################################
# This is modify version.
#
# If you need original source code, see below:
@hayakawa
hayakawa / lxc_add.sh
Created June 16, 2017 01:45
LXC instance setup(semi-automated)
#!/bin/bash
LXCPATH="/usr/local/lxc/"
# Pre-check
if [ -f ./vms.list ];
then
echo "[SUCCESS] ./vms.list is found"
else
echo "[ERROR] ./vms.list file is not found.";
@hayakawa
hayakawa / getPostListWithCategory.sql
Created April 19, 2017 01:36
How to get post list with category from Wordpress
SELECT a.ID
, a.post_date
, a.post_modified
, a.post_title
, a.post_name
, b.user_registered
, b.user_login
, b.user_nicename
, b.display_name
, c.name
@hayakawa
hayakawa / getUserInfo.sql
Created April 19, 2017 01:00
How to get user infomation from wordpress
SELECT a.user_registered
, a.user_login
, a.user_nicename
, a.display_name
FROM wp_users a;
@hayakawa
hayakawa / getCategoryInfo.sql
Created April 19, 2017 00:56
How to get category infomation from wordpress
SELECT a.term_id
, a.name
, a.slug
, b.count
FROM wp_terms a
LEFT JOIN wp_term_taxonomy b
ON a.term_id = b.term_id
WHERE b.taxonomy = 'category';
@hayakawa
hayakawa / replace_slink.sh
Last active April 11, 2017 01:54
Replace Symbolic Link for php from Source Tarball
@hayakawa
hayakawa / build_apache24.sh
Created April 7, 2017 05:27
Build Apache 2.4.x from Source Tarball
cd ./apache24
make distclean
./configure \
--prefix=/usr/local/apache2 \
--enable-pie \
--enable-modules=all \
--enable-mods-shared=all \
--enable-authn-dbm \
--enable-authn-anon \
--enable-authn-dbd \
@hayakawa
hayakawa / build_xdebug.sh
Created April 7, 2017 05:10
Build Xdebug from Source Tarball
#!/bin/bash
# Source: https://github.com/xdebug/xdebug/releases
cd ./xdebug
/usr/local/php71/bin/phpize
./configure --enable-xdebug --with-php-config=/usr/local/php71/bin/php-config
@hayakawa
hayakawa / php.ini
Created April 7, 2017 04:43
php.ini for PHP7.1.x
[PHP]
;;;;;;;;;;;;;;;;;;;
; About php.ini ;
;;;;;;;;;;;;;;;;;;;
; PHP's initialization file, generally called php.ini, is responsible for
; configuring many of the aspects of PHP's behavior.
; PHP attempts to find and load this configuration from a number of locations.
; The following is a summary of its search order: