↓ Skip to main content

Commands

yt-dlp command to transcode video to h264 after download

·1 min
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.

Add storage to a Turnkey VM like Nextcloud

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

Grow the boot volume of an oracle VM Ubuntu instance

·1 min
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.

ubuntu kernel upgrade

·1 min
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:

specifying a static container IP on the same subnet of an UNRAID host

·1 min
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

no sudo password prompt for current user

·1 min
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)

·1 min
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.

Caching on nginx

·1 min
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: