Skip to content

Instantly share code, notes, and snippets.

View doggy8088's full-sized avatar
🙂
Giving is a reward in itself

Will 保哥 doggy8088

🙂
Giving is a reward in itself
View GitHub Profile

將 kubectl 改成 k 並同時擁有 bash completion 的設定方法

自動修改

kubectl completion bash | sudo tee /etc/bash_completion.d/k > /dev/null
sudo sed -e 's/local commands=("kubectl")/local commands=("k")/g' /etc/bash_completion.d/k -i
sudo sed -e 's/__start_kubectl kubectl/__start_kubectl k/g' /etc/bash_completion.d/k -i
echo 'alias k=kubectl' | tee -a ~/.profile > /dev/null
. ~/.profile
@doggy8088
doggy8088 / settings.json
Last active February 20, 2024 06:28
Will 保哥的 VSCode 使用者設定檔
{
"explorer.openEditors.visible": 0,
"workbench.colorTheme": "Default Light+",
"workbench.iconTheme": "vscode-simpler-icons",
"workbench.sideBar.location": "right",
// 需下載安裝 Fira Code 字型 (安裝 OTF 格式)
// https://github.com/tonsky/FiraCode/releases
// 需下載客製化過的 Microsoft YaHei Mono 字型
@doggy8088
doggy8088 / Pipe in Inline Code within Table in the Markdown.md
Last active August 2, 2018 05:30
在 Markdown 文件中顯示一段包含 Pipe 字元程式碼的解決方案

Table 1: There is a pipe ( | ) character inside Table Cell. It can't display properly.

Alias Command What to Type
git cleanup `git branch --merged grep -v '*'

Table 2: There is a pipe ( | ) character that escape with a HTML Entity ( | ). Within ` sign, all HTML Entities will output ASIS which is not what I want.

| Alias | Command | What to Type |

@ECHO OFF
SET DIFFTOOL="C:\Program Files (x86)\WinMerge\WinMergeU.exe -s -e -x -ul -ur -wl -dl %%bname -dr %%yname %%base %%mine"
SET MERGETOOL="C:\Program Files (x86)\WinMerge\WinMergeU.exe %%theirs %%mine %%merged"
REG ADD HKEY_CURRENT_USER\Software\TortoiseGit /v Diff /t REG_SZ /d %DIFFTOOL% /f
REG ADD HKEY_CURRENT_USER\Software\TortoiseGit /v DiffViewer /t REG_SZ /d %DIFFTOOL% /f
REG ADD HKEY_CURRENT_USER\Software\TortoiseGit /v Merge /t REG_SZ /d %MERGETOOL% /f
@doggy8088
doggy8088 / 01 體驗容器生命週期.bat
Last active May 14, 2019 02:25
迎接嶄新的Windows容器叢集架構:Kubernetes - 演講過程示範的命令 ( #Study4Love ) - http://bit.ly/study4love-k8s-windows
REM 建立容器
docker run --name myc -it microsoft/windowsservercore cmd
REM 列出容器 (執行中的容器)
docker ps
REM 列出容器 (所有的的容器)
@doggy8088
doggy8088 / 170902_Git_AMA_README.md
Created September 2, 2017 11:57
2017/9/2 FB 直播:Git 新手上路 AMA 實作練習腳本
@doggy8088
doggy8088 / .gitconfig
Last active September 1, 2017 17:44
常用的 Git Alias 定義
[alias]
st = status
sts = status -s
co = checkout
ci = commit
br = branch -a
re = remote
di = diff
dump = cat-file -p
type = cat-file -t
@doggy8088
doggy8088 / Angular 17 Dev Setup.md
Last active April 22, 2024 23:59
Angular 17 開發環境說明

Angular 17 開發環境說明

為了能讓大家能夠順利的建立起 Angular 17 開發環境,以下是需要安裝的相關軟體與安裝步驟與說明。

Angular LOGO

[ 作業系統 ]

  • Windows 10 以上版本
  • Mac OS X 10.6 以上版本