Skip to content

Instantly share code, notes, and snippets.

Avatar

Shengyou Fan shengyou

View GitHub Profile
View App.kt
package chapter15
fun main() {
Game.play()
}
View run-image.sh
# 啟動 Docker Image,並把當前目錄掛載到 Docker Image 裡
docker run -it -v $PWD:/src albertcht/swoole:latest
# 檢查開發環境是否正確
php -v
php --ri swoole
# 進入 examples 目錄
cd /src
View get-image.sh
// 取得 Docker image
docker pull albertcht/swoole:latest
View git-clone.sh
// 將課程範例檔從 GitHub Clone 回來
git clone git@github.com:albertcht/swoole-course-examples.git
// 進入工作目錄
cd swoole-course-examples
View pull-phpbrew-docker-image.sh
# 啟動 Docker Image,並把當前目錄掛載到 Docker Image 裡
docker run -it -v $PWD:/src phpbrew/phpbrew:php7.3-minimum-zts
# 以下指令請在 Docker Image 裡執行
# 使用 PHPBrew 切換到 PHP 7.3
phpbrew use 7.3
# 檢查開發環境是否正確
php -v
php-config
View clone-php-73.sh
git clone git@github.com:php/php-src.git
cd php-src
git checkout php-7.3.3
View .zshrc
if ! zplug check --verbose; then
printf "Install? [y/N]: "
if read -q; then
echo; zplug install
fi
fi
View .zshrc
# 從 Github 安裝
zplug "zsh-users/zsh-history-substring-search"
# 從 on-my-zsh 安裝
zplug "plugins/git", from:oh-my-zsh
# 指定 tag
zplug "b4b4r07/enhancd", at:v1
# 依作業系統載入
You can’t perform that action at this time.