Skip to content

Instantly share code, notes, and snippets.

@JSinghDev
JSinghDev / LXCBindMount.md
Last active April 27, 2024 22:17 — forked from ajmassi/LXCBindMount.md
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

OR

pct set 100 -mp0 /mnt/bindmounts/shared,mp=/shared

@ajmassi
ajmassi / LXCBindMount.md
Last active April 27, 2024 22:16
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.

@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active April 27, 2024 22:12
Complete Recent Discord Quest

Complete Recent Discord Quest

Note

This no longer works in browser!

Note

This no longer works if you're alone in vc! Somebody else has to join you!

How to use this script:

  1. Accept the quest under User Settings -> Gift Inventory
@yasirkula
yasirkula / FileDownloader.cs
Last active April 27, 2024 22:12
C# Download Public File From Google Drive™ (works for large files as well)
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.IO;
using System.Net;
using System.Text;
/* EXAMPLE USAGE
FileDownloader fileDownloader = new FileDownloader();
@subramanya
subramanya / css-only-responsive-multi-level-mega-menu.markdown
Created November 11, 2022 14:43
CSS only responsive multi-level mega menu
@jmontleon
jmontleon / gist:ae5457e1d289719046f915a9cb83a32b
Last active April 27, 2024 22:09
Install Fedora 40 on the VisionFive 2
##############################################################################################
There is some long text that needs to be copied into grub in order to boot.
You should be able to copy and paste it using minicom if you add a 1 ms delay to text input
Ctrl-A Z Minicom Menu
T Terminal Settings
F Character tx delay (ms)
1
##############################################################################################
### Choose your SD Card
on letsWatchThatStinkingFolder () {
«Changes
«3/7/23; 11:55:58 AM by DW
«Created.
local (prefix = "chat-gpt-");
local (sourcefolder = "Macintosh HD:Users:davewiner:Downloads:");
local (destfolder = user.prefs.publicfolder + "chatgpt:");
fileloop (f in sourcefolder) {
local (fname = file.filefrompath (f));
if fname beginswith prefix {
@ncmiller
ncmiller / HOWTO_LinuxKernelQemu.md
Last active April 27, 2024 22:06
How to build the Linux kernel and test changes locally in qemu

This is the process I followed on my Fedora 23 host machine to build a small/minimal vanilla Linux kernel and test in Qemu (based on this blog post). This will provide a safe sandbox in which to test kernel changes, and is generally faster than developing natively on the host machine. Qemu will boot the kernel image directly in the emulated system.

Install required build tools on host machine

sudo dnf install ncurses-devel kernel-devel kernel-headers gcc gcc-c++ git qemu openssl-devel glibc-static

Prepare a working space for kernel development

@yokawasa
yokawasa / ghcr.md
Last active April 27, 2024 22:05
ghcr (GitHub Container Registry)

ghcr (GitHub Container Registry) quickstart

CLI

To push container images to ghcr, you need peronal access token (PAT) - see how to create PAT

  1. Get PAT (personal access token)

Personal Settings > Developer settings > Personal access tokens

@swiss6th
swiss6th / multi-homebridge-systemd.md
Last active April 27, 2024 22:00
Setting up multiple Homebridge instances with systemd

Setting up Multiple Homebridge Instances with systemd

This guide, adapted from oznu's Homebridge Config UI X Wiki, will show you how to set up multiple instances of Homebridge and Homebridge Config UI X using systemd on a Raspberry Pi. This guide assumes you already have a Pi set up and running a recent version of Raspbian.

Step 1: Assume root

All the steps in this guide assume you are running as the root user:

sudo su