您需要部署一個包含兩個微服務的應用程式:backend-service
和 frontend-service
。
frontend-service
依賴於 backend-service
的啟動。
然而,當前提供的部署配置,出了一點問題,導致 frontend-service
持續 CrashLoopBackOff
。
參考 這篇 分享的 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 | |
export HTTP_PROXY=http://192.168.1.3:3128 | |
export HTTPS_PROXY=$HTTP_PROXY | |
export NO_PROXY="localhost, 127.0.0.1" | |
domain='https://YOUR_SERVER_IP' | |
token='xxxxxxxxxx' | |
file=$1 |
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##*/} |
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
import androidx.compose.foundation.Canvas | |
import androidx.compose.foundation.layout.size | |
import androidx.compose.runtime.Composable | |
import androidx.compose.ui.Modifier | |
import androidx.compose.ui.geometry.Offset | |
import androidx.compose.ui.geometry.Size | |
import androidx.compose.ui.graphics.Brush | |
import androidx.compose.ui.graphics.Color | |
import androidx.compose.ui.graphics.Path | |
import androidx.compose.ui.graphics.drawscope.DrawScope |
NewerOlder