Skip to content

Instantly share code, notes, and snippets.

@icyleaf
icyleaf / README.md
Created October 9, 2024 08:36
Intialize postgresql database and grant privileges in two ways by docker container

Intialize postgresql database and grant privileges

first of all, you need super account, for example user postgres and password insecret-pass.

Easy mode

Use super account to connect postgres server and create database app-name and user app, then grant app to app-name.

docker run --rm \
@icyleaf
icyleaf / README.md
Last active August 29, 2024 11:33
Gitea migrate storage from local to minio auto script

Gitea migrate storage script

This is based on offically cli tool built-in subcommand calls migrate-storage.

@icyleaf
icyleaf / README.md
Created August 12, 2022 13:44 — forked from triangletodd/README.md
k3s in LXC on Proxmox

On the host

Ensure these modules are loaded

cat /proc/sys/net/bridge/bridge-nf-call-iptables

Disable swap

sysctl vm.swappiness=0
swapoff -a
@icyleaf
icyleaf / 1-setup.md
Last active May 28, 2021 03:31 — forked from troyfontaine/1-setup.md
Signing your Git Commits using GPG on MacOS Sierra/High Sierra

Methods of Signing with GPG

Last updated March 28, 2021

There are now two ways to approach this:

  1. Using gpg and generating keys
  2. Using Kryptonite by krypt.co

This Gist explains how to do this using gpg in a step-by-step fashion. Kryptonite is actually wickedly easy to use-but you will still need to follow the instructions

@icyleaf
icyleaf / install-dsm-6-on-proxmox-5.md
Last active January 21, 2021 08:37 — forked from Neonox31/install-dsm-6-on-proxmox-5.md
Install DSM 6.X on Proxmox 5.0.X
@icyleaf
icyleaf / README.md
Last active September 17, 2023 12:34
Access Synology DSM on public IP binded domain without port (traefik version)

Access Synology DSM on public IP binded domain without port (traefik version)

More detail to visit my blog: https://icyleaf.com <-- Not publish yet.

MinIO macOS 服务化脚本

把上面脚本放在 cd /usr/local/Cell/minio/xxxxx/ 目录,然后编辑,之后在运行

$ brew services start minio
品牌名称 DELL 2209wa LG 27UL600 索璞便携显示器 DELL U2718q 同款 LG 面板组装显示器
购买时间 2011年 2019年 2019年 2020年6月
尺寸 22 27 15.6 27
比例 16:10 16:9 16:9 16:9
分辨率 1680x1050 3840x2160
Ultra HD(UHD)/4k/2160p
3840x2160
Ultra HD(UHD)/4k/2160p
3840x2160
Ultra HD(UHD)/4k/2160p
驱动板 - - - 松冠
面板型号 - - NV140QUM-N61 LM270WR5-SSB1
面板类型 IPS IPS IPS IPS
亮度 300 cd/m2 400 cd/m2 400 cd/m2 350 cd/m2
@icyleaf
icyleaf / img2vbox.sh
Last active February 8, 2020 06:50
Convert img file to vbox format
#!/usr/bin/env bash
#
# icyleaf
# 2020-02-03
#
VM_NAME=$1
IMG_FILE=$2
IMG_PATH=`dirname $IMG_FILE`
IMG_NAME=`basename $IMG_FILE`