- Name: Python
Id: ms-python.python
Description: Python language support with extension access points for IntelliSense (Pylance), Debugging (Python Debugger), linting, formatting, refactoring, unit tests, and more.
Version: 2025.16.0
Publisher: Microsoft
VS Marketplace Link:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alias k=kubectl | |
alias kg="kubectl get " | |
alias kl="kubectl logs " | |
alias kgps="kubectl get pod,svc" | |
alias kgpp="kubectl get pvc,pv" | |
alias kd="kubectl describe " | |
alias kn="kubectl config set-context --current --namespace " | |
alias krrd="kubectl rollout restart deploy " | |
alias kak="kubectl apply -k " |
參考 這篇 分享的 curl 上傳方法編寫的指令碼,目的是簡化 token 獲取到上傳檔案的流程。
個人用在定時檔案備份中。
#!/bin/bash
# 檢查引數數量
if [ $# -ne 6 ]; then
echo "Usage: $0 --username <username> --password <password> <local-file> <alist-url>"
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Adjust-ServicePermissions.ps1 | |
# A script to adjust permissions for Windows services and SCMANAGER | |
param( | |
[Parameter(Mandatory=$true, Position=0, HelpMessage="Username to grant permissions to")] | |
[string]$Username, | |
[Parameter(Mandatory=$true, Position=1, HelpMessage="Service name to modify")] | |
[string]$ServiceName | |
) |
Use this script
https://github.com/cgjosephlee/ollama-save-load
Mac
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# 取得 grubby --info DEFAULT 的輸出 | |
grubby_info=$(grubby --info DEFAULT) | |
# 使用 grep 和 awk 抓取 args 中的 swap 相關參數 | |
swap_args=$(echo "$grubby_info" | grep 'args=' | awk -F'"' '{print $2}' | grep -oE 'resume=[^ ]+|rd.lvm.lv=[^ ]+/swap') | |
# 檢查是否找到 swap 參數 | |
if [[ -z "$swap_args" ]]; then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
docker_images=( | |
"nginx:latest" | |
) | |
for image in "${docker_images[@]}"; do | |
echo "Downloading $image ..." | |
echo | |
image_name=${image##*/} |
NewerOlder