Skip to content

Instantly share code, notes, and snippets.

Avatar

KEINOS KEINOS

View GitHub Profile
@KEINOS
KEINOS / docker-compose.yml
Last active Aug 15, 2020
Docker-compose file for WordPress 5.5 + PHP 7.4.9, Apache 2.4.38 on the fly.
View docker-compose.yml
# docker-compose.yml for WordPress 5.5 + PHP 7.4.9, Apache 2.4.38
#
# - Download URL: https://git.io/JJ5Vu
# - How to run servers:
# $ php -r 'copy("https://git.io/JJ5Vu", "./docker-compose.yml");'
# $ docker-compose up -d
# - How to access:
# - Open browser: http://localhost:8989/
# - Ref: https://www.youtube.com/watch?v=pYhLEV-sRpY @ Youtube
version: '3'
@KEINOS
KEINOS / 0.PregMatchVsCtypeAlnumBench.php
Last active May 19, 2020
[Bench] Which is faster, preg_match() or ctype_alnum() ?
View 0.PregMatchVsCtypeAlnumBench.php
<?php
/**
* Benchmark between preg_match() and ctype_alnum()
*
* $ phpbench run --retry-threshold=1 --revs=1000000 \
* --iterations=10 --report=compare --report=aggregate \
* ./PregMatchVsCtypeAlnumBench.php
*
* Requirement
* $ composer require phpbench/phpbench @dev --dev
View Main.php
<?php
/**
* Sample PHP script to check if a string is available to use in namespace.
*
* View this script in action online:
* https://paiza.io/projects/cjheAXgzbvk4uEq8civKAA
* View this script in Gist:
* https://gist.github.com/KEINOS/b72391409f201777f8c4420a59a9c282
*/
@KEINOS
KEINOS / LOG_Build-Error.sh-session
Created Jul 6, 2019
[LOG] Error log on heroku
View LOG_Build-Error.sh-session
2019-07-06T16:11:37.070517+00:00 app[web.1]: 2019-07-07 01:11:37: (network.c.313) can't bind to socket: 0.0.0.0:80 Permission denied
2019-07-06T16:11:38.074704+00:00 app[web.1]: 2019-07-07 01:11:38: (network.c.313) can't bind to socket: 0.0.0.0:80 Permission denied
2019-07-06T16:11:39.079038+00:00 app[web.1]: 2019-07-07 01:11:39: (network.c.313) can't bind to socket: 0.0.0.0:80 Permission denied
2019-07-06T16:11:40.083423+00:00 app[web.1]: 2019-07-07 01:11:40: (network.c.313) can't bind to socket: 0.0.0.0:80 Permission denied
2019-07-06T16:11:41.087808+00:00 app[web.1]: 2019-07-07 01:11:41: (network.c.313) can't bind to socket: 0.0.0.0:80 Permission denied
2019-07-06T16:11:42.092604+00:00 app[web.1]: 2019-07-07 01:11:42: (network.c.313) can't bind to socket: 0.0.0.0:80 Permission denied
2019-07-06T16:11:43.097222+00:00 app[web.1]: 2019-07-07 01:11:43: (network.c.313) can't bind to socket: 0.0.0.0:80 Permission denied
2019-07-06T16:11:44.101447+00:00 app[web.1]: 2019-07-07 01:11:44: (network.c.313) can'
@KEINOS
KEINOS / dockle-status.json
Last active Jun 21, 2019
Sample JSON of Shields.IO status badge
View dockle-status.json
{
"schemaVersion": 1,
"label": "Dockle",
"message": "FATAL 1 WARN 2",
"color": "red"
}
View LOG_Build_CentOS_DockerImage.sh-session
$ # Env infos
$ # ---------
$ docker version
Client: Docker Engine - Community
Version: 18.09.0
API version: 1.39
Go version: go1.10.4
Git commit: 4d60db4
Built: Wed Nov 7 00:47:43 2018
OS/Arch: darwin/amd64
@KEINOS
KEINOS / softwareupdate_warning.sh-session
Created Mar 20, 2019
[LOG] Warning while softwareupdate - EmbeddedOSInstall and OSPersonalization Error. One of the two will be used. Which one is undefined.
View softwareupdate_warning.sh-session
$ # Error log
$ softwareupdate -l --verbose
objc[5213]: Class AMSupportURLConnectionDelegate is implemented in both /System/Library/PrivateFrameworks/EmbeddedOSInstall.framework/Versions/A/EmbeddedOSInstall (0x11abdd8c0) and /System/Library/PrivateFrameworks/OSPersonalization.framework/Versions/A/OSPersonalization (0x11aa381e0). One of the two will be used. Which one is undefined.
Software Update Tool
Finding available software
No new software available.
$ man softwareupdate | tail -1
Mac OS September 11, 2012 Mac OS
$ sw_vers
@KEINOS
KEINOS / LOG_Vagrant_debug_output_20190311-1657.sh-session
Last active Mar 11, 2019
[LOG] Debug output log of Vagrant cloud search results by user name. Info for the issue https://github.com/hashicorp/vagrant/issues/10723
View LOG_Vagrant_debug_output_20190311-1657.sh-session
$ ######################################################
$ # Env info (macOS Mojave, OSX 10.14.3)
$ ######################################################
$ # Date and time of occurrence
$ date -R
Mon, 11 Mar 2019 16:57:12 +0900
$ # Vagrant version
$ vagrant -v
Vagrant 2.2.4
$ # Host OS
@KEINOS
KEINOS / LOG_Install_Success-XDebug-20181208.sh-session
Created Dec 8, 2018
[Log] Installding XDebug of PHP on macOS HighSierra
View LOG_Install_Success-XDebug-20181208.sh-session
$ php -v
PHP 7.2.12 (cli) (built: Nov 29 2018 01:59:12) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
with Zend OPcache v7.2.12, Copyright (c) 1999-2018, by Zend Technologies
$
$ which php
/usr/local/Cellar/php/7.2.12_2/bin/php
$
$ brew list | grep php
@KEINOS
KEINOS / LOG_Install_Success_mod_wsgi-20181128-0227.sh-session
Last active Nov 27, 2018
[Log] Installing `pip3 install mod_wsgi`
View LOG_Install_Success_mod_wsgi-20181128-0227.sh-session
$ sudo pip3 install mod_wsgi
Downloading/unpacking mod-wsgi
Downloading mod_wsgi-4.6.5.tar.gz (490kB): 490kB downloaded
Running setup.py (path:/tmp/pip-build-ajb0j1v8/mod-wsgi/setup.py) egg_info for package mod-wsgi
/usr/lib/python3.4/distutils/dist.py:260: UserWarning: Unknown distribution option: 'bugtrack_url'
warnings.warn(msg)
warning: no files found matching 'docs/_build/html/_static/*'
warning: no files found matching 'docs/_build/html/_static/css/*'
warning: no files found matching 'docs/_build/html/_static/font/*'
You can’t perform that action at this time.