Skip to content

Instantly share code, notes, and snippets.

@aveexy
aveexy / copyDev.sh
Created October 2, 2022 20:53
Make a simple copy of the /dev directory, usefull for systems that have no devfs and don't support mount --bind of regular directories
#!/bin/sh
create_nod() {
name=$(basename "$1")
major=$(ls -la "$1" | sed -r 's/ +/ /g' | cut -d " " -f5 | sed 's/.$//')
minor=$(ls -la "$1" | sed -r 's/ +/ /g' | cut -d " " -f6)
mknod "$name" $2 $major $minor
}
@aveexy
aveexy / nginx.conf
Last active May 5, 2024 11:26
immich nginx reverse proxy with base url (not a full/complete nginx config) base url is /immich (if you want something other, replace "/immich" with other path
pid /run/nginx/nginx.pid;
error_log stderr;
daemon off;
events {
}
http {
proxy_cache_path /var/cache/nginx/immich_revprox keys_zone=immich_revprox:10m levels=1:2 use_temp_path=off inactive=1d max_size=1g;
server {
listen 0.0.0.0:443 ssl ;