參考 這篇 分享的 curl 上傳方法編寫的指令碼,目的是簡化 token 獲取到上傳檔案的流程。
個人用在定時檔案備份中。
#!/bin/bash
# 檢查引數數量
if [ $# -ne 6 ]; then
echo "Usage: $0 --username <username> --password <password> <local-file> <alist-url>"
參考 這篇 分享的 curl 上傳方法編寫的指令碼,目的是簡化 token 獲取到上傳檔案的流程。
個人用在定時檔案備份中。
#!/bin/bash
# 檢查引數數量
if [ $# -ne 6 ]; then
echo "Usage: $0 --username <username> --password <password> <local-file> <alist-url>"
# 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
#!/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 |
#!/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 |
#!/bin/bash | |
docker_images=( | |
"nginx:latest" | |
) | |
for image in "${docker_images[@]}"; do | |
echo "Downloading $image ..." | |
echo | |
image_name=${image##*/} |
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 |
The easiest way to "convert" MKV to MP4, is to copy the existing video and audio streams and place them into a new container. This avoids any encoding task and hence no quality will be lost, it is also a fairly quick process and requires very little CPU power. The main factor is disk read/write speed.
With ffmpeg
this can be achieved with -c copy
. Older examples may use -vcodec copy -acodec copy
which does the same thing.
These examples assume ffmpeg
is in your PATH
. If not just substitute with the full path to your ffmpeg binary.