Jellyfin 家庭影院 docker 安装 docker pull jellyfin/jellyfin docker run -d --name=Jellyfin -p 8096:8096 \ # --name=Jellyfin 将容器名定义为 Jellyfin -p 8920:8920 -p 7359:7359/udp -p 1900:1900/udp #这三个端口为可选项 \ -v `pwd`/config:/config -v `pwd`/cache:/cache -v /media:/media \ -e TZ=Asia/Shanghai -e PUID=0 -e PGID=0 --device=/dev/dri:/dev/dri --add-host=api.themoviedb.org:13.224.161.90 \ #为容器增加 host 指向
Go 代码片段 go goroutines pool package main import ( "fmt" "github.com/sourcegraph/conc/pool" ) func main() { p := pool.New().WithMaxGoroutines(3) for i := 1; i <= 5; i++ { p.Go(func() { fmt.Println(i) }) } p.Wait() } 带ctx 的go goroutines pool package main import ( "context" "errors" "fmt" "github.com/sourcegraph/conc/pool" ) func main() { p := pool.New(). WithMaxGoroutines(4). WithContext(context.Background()). WithCancelOnError() for i := 0; i <
Go lo 使用 go get github.com/samber/lo 使用 // 将切片中的重复元素去掉,只保留第一个出现的元素。 names := lo.Uniq([]string{"Samuel", "John", "Samuel"}) // []string{"Samuel", "John"} // 生成map // 将切片或数组转换为map,key是call
Go Set 集合 Github地址:https://github.com/deckarep/golang-set 使用: go get github.com/deckarep/golang-set/v2 集合里的元素不会重复 示例:
Goose 数据库版本管理 Goose 是一个用于管理数据库迁移的工具,类似于 Flyway 和 Liquibase。它可以方便地管理数据库模式的版本,并应用相应的 SQL 脚本。你提到
Java 配置settings 默认读取位置 ~/.m2 curl -O https://repo1.maven.org/maven2/archetype-catalog.xml <settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 https://maven.apache.org/xsd/settings-1.0.0.xsd"> <localRepository>/home/sugar/.m2/repository</localRepository> <mirrors> <mirror> <id>alimaven</id> <mirrorOf>central</mirrorOf> <name>aliyun maven</name> <url>https://maven.aliyun.com/nexus/content/groups/public/</url> </mirror> </mirrors> <profiles> <profile> <id>archetype-catalog</id> <activation> <activeByDefault>true</activeByDefault> </activation> <properties> <archetypeCatalog>file:///Users/sugar/.m2/archetype-catalog.xml</archetypeCatalog> </properties> </profile> </profiles> </settings> # 手动下载依赖 mvn -B -f pom.xml -s /usr/share/maven/ref/settings.xml dependency:resolve # 打包 mvn package 一、基