yt-dlp command to transcode video to h264 after download # yt-dlp --recode-video mp4 --force-write-archive https://www.youtube.com/watch?v=dQw4w9WgXcQ Here’s a breakdown:
--recode-video mp4: This option tells yt-dlp to transcode the video into an MP4 container. <video_url>: Replace this with the URL of the video. --force-write-archive: This option forces yt-dlp to re-encode the video.
yt-dlp command to record in a different file each time # yt-dlp -o "%(epoch)s.%(ext)s" --no-part --hls-use-mpegts
Extend the root volume in TurnKey Linux Nextcloud appliance VM # After adding an additional drive to the VM in Proxmox:
Note
Change /dev/sdb on this post with the path to the disk you just added to the VM
Create a logon task in task scheduler to a specific directory # sudo schtasks /create /sc onlogon /tn "user\Steam" /rl highest /tr '"C:\Program Files (x86)\Steam\steam.exe" -silent'
Clear Nextcloud Turnkey VM logs # echo "" > /var/www/nextcloud-data/nextcloud.log
Add storage to a Turnkey VM like Nextcloud # Managing LVM on Proxmox
Add additional disk to Turnkey VM in Proxmox find /dev/sd* for the new disk inside the VM pvcreate /dev/sd* vgextend turnkey /dev/sd* vgdisplay lvextend -l+100%free /dev/turnkey/root resize2fs /dev/turnkey/root
Store remote credentials for a local repository # Note
This will store the credentials in plaintext for this repository. This is not secure.
Grow the boot volume of an oracle VM Ubuntu instance # Backup current partition table
sfdisk -d /dev/sdb > sdb_partition_bak.dmp Execute a dry-run to see the changes that will apply. Install with apt-get install cloud-utils if you don’t have it already.
Delete the local-lvm directory from proxmox and resize the local to get the complete disk space # Note
You’ll need to move all disks, isos, etc. from the local-lvm storage to the local storage before performing these steps.
ubuntu kernel upgrade # Install # apt install wget wget https://raw.githubusercontent.com/pimlie/ubuntu-mainline-kernel.sh/master/ubuntu-mainline-kernel.sh chmod +x ubuntu-mainline-kernel.sh sudo mv ubuntu-mainline-kernel.sh /usr/local/bin/ If you want to automatically check for a new kernel version when you login:
stop gdm3 in ubuntu desktop install # sudo service gdm3 stop
specifying a static container IP on the same subnet of an UNRAID host # // version: '3.3' services: testcontainer: container_name: testcontainer environment: - TZ=America/Puerto_Rico - HOST_OS=Unraid - HOST_CONTAINERNAME=testcontainer - PUID=99 - PGID=100 - UMASK=022 volumes: - '/mnt/user/appdata/nginx:/config:rw' image: lscr.io/linuxserver/nginx networks: dockernat: ipv4_address: 192.168.0.250 networks: dockernat: external: true name: br0
pi-hole one line install # curl -sSL https://install.pi-hole.net | bash
no sudo password prompt for current user # This will make it possible for the current user (the user executing the command will be added to it via the environment variable $USER in the command) to execute all sudo commands without a prompt for password.
linux mitigation disable (debian) # Adds mitigations=off to the kernel command line, which disables all optional CPU mitigations (Spectre, Meltdown, and the other grouped fixes). Do this only on machines that never run code you don’t control — on a daily driver or shared system, leave them on.
create sudo user with access to docker in ubuntu lxc container # useradd -s /bin/bash -m -G sudo,docker username or alternatively
adduser username adduser username sudo adduser username docker
Caching on nginx # Caching config (https://www.nginx.com/resources/wiki/start/topics/examples/reverseproxycachingexample/)
This part goes into nginx.conf:
proxy_cache_path /config/nginx/cache levels=1:2 keys_zone=STATIC:10m inactive=24h max_size=1g; This part goes in the location of the proxy-confs to cache:
add directory to PATH environment variable # echo 'export PATH="$HOME/.local/bin:$PATH"' >> .bashrc
add container to additional network on unRAID # The custom docker network needs to be created first with docker network create <networkname> and unRAID docker options set to “Preserve user defined networks” as enabled.