Skip to content

Instantly share code, notes, and snippets.

View chonki's full-sized avatar

chonki

View GitHub Profile
@ajmassi
ajmassi / LXCBindMount.md
Last active May 18, 2024 20:23
Create a bind mount from a Proxmox host on an unprivileged lxc container

Proxmox Assign Bind Mount To Unprivileged Container

In order for the LXC container to have full access the proxmox host directory, a subgid is set as owner of a host directory, and an ACL is used to ensure permissions.

Bind Mount dataset to LXC

Add the following line to /etc/pve/lxc/<CT_ID>.conf

mp0:/mount/point/on/host,mp=/mount/point/on/lxc

Create group on host

In the default Proxmox configuration, unpriviliged container subgids will have the prefix "10" followed by the expected 4-digit gid.

@davecoutts
davecoutts / unifi_ubuntu_2004.sh
Last active May 20, 2024 04:59
Install Ubiquiti Unifi Controller on Ubuntu 20.04
# Install Ubiquiti Unifi Controller on Ubuntu 20.04.
# As tested on a fresh install of ubuntu-20.04.1-live-server, August 22nd 2020.
# Thanks to https://gist.github.com/tmuncks for posting the updated install steps.
sudo apt update
sudo apt install --yes apt-transport-https
echo 'deb https://www.ui.com/downloads/unifi/debian stable ubiquiti' | sudo tee /etc/apt/sources.list.d/100-ubnt-unifi.list
sudo wget -O /etc/apt/trusted.gpg.d/unifi-repo.gpg https://dl.ui.com/unifi/unifi-repo.gpg
@johannrichard
johannrichard / unbound-safe-search.conf
Last active March 8, 2023 12:38
Unbound DNS Safe Search config entries
# Safe Search Domains
# Paste / Add this to your Unbound config
local-data: "yandex.com A 213.180.193.56"
local-data: "yandex.ru A 213.180.193.56"
local-data: "yandex.ua A 213.180.193.56"
local-data: "yandex.by A 213.180.193.56"
local-data: "yandex.kz A 213.180.193.56"
local-data: "www.yandex.com A 213.180.193.56"
local-data: "www.yandex.ru A 213.180.193.56"
local-data: "www.yandex.ua A 213.180.193.56"
@frenck
frenck / hassio_ubuntu_install_commands.sh
Last active February 1, 2023 05:38
Simple install command for installing Hass.io on a Generic Ubuntu/Debian machine
Unbuntu is no longer support by the Home Assistant project.
The installation commands previous listed here, are not up 2 date, not recommended, not supported and, therefore, removed.
@steven2358
steven2358 / ffmpeg.md
Last active May 10, 2024 20:57
FFmpeg cheat sheet
@gdamjan
gdamjan / README.md
Last active May 23, 2024 09:45
Setup for an easy to use, simple reverse http tunnels with nginx and ssh. It's that simple there's no authentication at all. The end result, a single ssh command invocation gives you a public url for your web app hosted on your laptop.

What

A lot of times you are developing a web application on your own laptop or home computer and would like to demo it to the public. Most of those times you are behind a router/firewall and you don't have a public IP address. Instead of configuring routers (often not possible), this solution gives you a public URL that's reverse tunnelled via ssh to your laptop.

Because of the relaxation of the sshd setup, it's best used on a dedicated virtual machine just for this (an Amazon micro instance for example).

Requirements