Skip to content

Instantly share code, notes, and snippets.

KEINOS KEINOS

View GitHub Profile
@KEINOS
KEINOS / setUTF8.php
Last active Oct 14, 2018
[PHP] KEINOS の UTF8 日本語環境の徹底設定(よく使うためのメモ)
View setUTF8.php
<?php
function setEnvAsUTF8JaJP($timezone = 'Asia/Tokyo')
{
if (! function_exists('mb_language')) {
die('This application requires mb_language.');
}
date_default_timezone_set($timezone);
setlocale(LC_ALL, 'ja_JP');
@KEINOS
KEINOS / Qiita スパム記事パターン.md
Last active Jul 21, 2019
Qiita スパム記事パターン
View Qiita スパム記事パターン.md

以下のチェック事項をフラグとして、フラグの組み合わせでスパム検知するためのメモです。

true(yes) の場合がスパムに含まれたフラグになります。

記事内文字列・チェック

  • すべて半角英数字記号である
  • (???-???-???? | ???_???_????) フォーマットの数値が含まれている
  • 同一内容の行が3行以上繰り返される
  • 'ğşöÜ'などの文字が含まれる
@KEINOS
KEINOS / LOG_Install-Pandoc-CentOS7-YUM_20180722-1833.sh-session
Last active Oct 16, 2018
[Log] Installing `pandoc` to CentOS7 with `yum`
View LOG_Install-Pandoc-CentOS7-YUM_20180722-1833.sh-session
# yum -y install pandoc
読み込んだプラグイン:fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: ftp.iij.ad.jp
* epel: ftp.iij.ad.jp
* extras: ftp.iij.ad.jp
* ius: mirrors.tongji.edu.cn
* updates: ftp.iij.ad.jp
依存性の解決をしています
--> トランザクションの確認を実行しています。
@KEINOS
KEINOS / LOG_BenchMarkResult_MBP_20180707.sh-session
Last active Oct 16, 2018
[Log] LINPACK Benchmark result of MacBookPro and Mac mini
View LOG_BenchMarkResult_MBP_20180707.sh-session
$ # TL;DR
$ # Performance Summary (GFlops): 28.5376 - 72.4169
$ #
$ # MacBookPro Retina, 13-inch, Early 2015
$ # 2.7GHz, Intel Core i5, MEM 8GB 1867 MHz DDR, Intel Iris Graphics 6100, 1536 MB
$ # macOS High Sierra (OSX 10.13.5)
$ #
$
$ sw_vers
ProductName: Mac OS X
@KEINOS
KEINOS / DEVサーバの起動の仕方
Last active Dec 25, 2018
macOS の PHP で空きポートを取得する(ランダムな未使用ポート検索) ref: https://qiita.com/KEINOS/items/be7b769f64d5f154388f
View DEVサーバの起動の仕方
$ cd /path/to/your/dev/dir
$ ls
index.php
$ dev opera
@KEINOS
KEINOS / "を追加
Last active Jul 3, 2020
逆引き!Composer コマンド・ライン一覧 と 基礎知識 ref: https://qiita.com/KEINOS/items/86a16b06af6e936a1841
View "を追加
$ composer config bin-dir bin/
@KEINOS
KEINOS / LOG_Install_LibRTMP_20180624-2037.sh-session
Last active Oct 16, 2018
[Log][FAIL] Installing `librtmp` via HomeBrew on macOS HighSierra.
View LOG_Install_LibRTMP_20180624-2037.sh-session
$ # Fail log while installing LibRTMP via brew on macOS HighSierra.
$ # ------------------------------------------------------------------
$ # TL;DR
$ # 2018/06/24 Still can NOT install them. Provably deprecated.
$ # ------------------------------------------------------------------
$ # Env
$ # ------------------------------------------------------------------
$ sw_vers
ProductName: Mac OS X
ProductVersion: 10.13.5
@KEINOS
KEINOS / LOG_Install_Fail_Composer_20180408-0029.sh-session
Last active Oct 16, 2018
[Log] Installing `composer` via YUM on CentOS7 with KUSANAGI @ SakuraVPS
View LOG_Install_Fail_Composer_20180408-0029.sh-session
[root@kusanagiXX ~]# ###########################################################################
[root@kusanagiXX ~]# # Error log while installing `composer` on CentOS7 w/KUSANAGI @ SakuraVPS
[root@kusanagiXX ~]# ###########################################################################
[root@kusanagiXX ~]# # エラー内容
[root@kusanagiXX ~]# # エラー: パッケージ: php-intl-5.4.16-43.el7_4.1.x86_64 (updates)
[root@kusanagiXX ~]# # 要求: php-common(x86-64) = 5.4.16-43.el7_4.1
[root@kusanagiXX ~]# # インストール: php-common-5.6.34-1.el7.remi.x86_64 (@remi-php56)
[root@kusanagiXX ~]# # php-common(x86-64) = 5.6.34-1.el7.remi
[root@kusanagiXX ~]# ###########################################################################
[root@kusanagiXX ~]#
@KEINOS
KEINOS / 20180316-1600_mysqld.log
Last active Mar 16, 2018
[LOG] `/var/log/mysql/mysqld.log` of MariaDB startup failure while initializing "kusanagi" with `$ kusanagi init` at SakuraVPS w/ Kusanagi.
View 20180316-1600_mysqld.log
# cat var/log/mysql/mysqld.log
161011 5:25:55 [Warning] IP address '222.186.134.218' could not be resolved: Name or service not known
161011 5:58:48 [Warning] IP address '222.186.58.252' could not be resolved: Name or service not known
161011 6:45:32 [Warning] Hostname 'unassigned.quadranet.com' does not resolve to '155.94.142.60'.
161011 6:45:32 [Note] Hostname 'unassigned.quadranet.com' has the following IP addresses:
161011 6:45:32 [Note] - 127.0.0.1
161011 7:27:20 [Warning] IP address '222.186.51.175' could not be resolved: Name or service not known
161011 15:00:36 [Note] /usr/sbin/mysqld: Normal shutdown
161011 15:00:36 [Note] WSREP: Stop replication
You can’t perform that action at this time.