Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
set -e -o errexit -o pipefail -o nounset
###################################
# This script can be used by itself, but it's recommended that you read
# a tutorial on Proxmox forum first: https://forum.proxmox.com/threads/hey-proxmox-community-lets-talk-about-resources-isolation.124256/
###################################
# Do not modify these variables (set by Proxmox when calling the script)
vmId="$1"
@cawa0505
cawa0505 / proxmox_nvidia.md
Created June 20, 2024 13:28 — forked from egg82/proxmox_nvidia.md
NVidia Proxmox + LXC

Proxmox

Find the proper driver at the NVidia website.

Note: Make sure to select "Linux 64-bit" as your OS

Hit the "Search" button.

@cawa0505
cawa0505 / gist:5bb7c83a9a69cadc689cb60db5b26dd1
Created May 30, 2024 17:02 — forked from Zeioth/gist:d8c1fd75b5721c2170b4a2a5f19a986e
Sway HiDPI settings (GTK/QT/Sway) - How to
set $cursor_size 54
```
# GTK
# This is the only place where you must set GTK scaling
set $gnome-schema org.gnome.desktop.interface
exec_always {
gsettings set $gnome-schema gtk-theme 'Matcha-dark-sea'
gsettings set $gnome-schema icon-theme 'Numix-Square'
gsettings set org.gnome.desktop.interface text-scaling-factor 2.73
@cawa0505
cawa0505 / setup-zsh-in-codespaces.md
Created May 1, 2024 00:10 — forked from ikrishagarwal/setup-zsh-in-codespaces.md
Setup starship, zsh suggestions and syntax highlight for your codespaces.
@cawa0505
cawa0505 / load-balance.sh
Created March 8, 2024 13:26 — forked from girst/load-balance.sh
Simple Linux Load Balancing with `iproute2`
#!/bin/bash
# Load balance multiple internet connections. Requires iproute2, awk and grep.
# (C) 2016 Tobias Girstmair, isticktoit.net, GPLv2
# Also useful: speedometer -l -r eth1 -t eth1 -m $(( 1024 * 1024 * 3 / 2 ))
# Not much user error checking is done - only pass working network connections
# script needs root to work and at least two interfaces to be useful
[ $EUID -eq 0 -a $# -ge 2 ] || {
echo "Usage (as root): $0 iface1[:weight1] iface2[:weight2] ..." >&2
@cawa0505
cawa0505 / Cmd File
Created February 23, 2024 07:53 — forked from PeaJa/Cmd File
Convert VOB to MP4
@echo off
cls
for %%i in (*.vob) do ffmpeg -i %%i -vcodec h264 -s 720x576 -vf yadif -sn -map 0:m:language:rus "%%~ni.mpg"
ffmpeg -i concat:"VTS_01_1.mpg|VTS_01_2.mpg|VTS_01_3.mpg|VTS_01_4.mpg|VTS_01_5.mpg|VTS_01_6.mpg|VTS_01_7.mpg|VTS_01_8.mpg" -c copy output.mpg
ffmpeg -i output.mpg -qscale:v 0 film.mp4
mkdir result_dir
move *.mp4 result_dir
erase *.mpg
@cawa0505
cawa0505 / macbook_pro_ubuntu_install.md
Created February 16, 2024 22:28 — forked from cjonesy/macbook_pro_ubuntu_install.md
Installing Ubuntu on MacBook Pro

Macbook Pro - Ubuntu Install

Requirements

2 USB drives > 2GB

Pre-Install

Create bootable USB drive

  1. Grab the latest Ubuntu Desktop iso image
@cawa0505
cawa0505 / installation_steps_k3s_dashboard.md
Created October 23, 2023 06:33 — forked from jannegpriv/installation_steps_k3s_dashboard.md
Installation steps for K3s dashboard.

Installation steps for K3s dashboard

The steps below requires that you have followed the installation steps for installing K3s on RPIs.

NOTE: The following files can be found in the following repository.

Installation steps for K3s dashboard. On master node, create a folder called dashboard:

@cawa0505
cawa0505 / configuration.nix
Created October 22, 2023 15:59 — forked from nomaster/configuration.nix
NixOS Configuration for experimental K3S cluster node
{ config, pkgs, ... }:
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
];
# Use the systemd-boot EFI boot loader.
boot.loader.systemd-boot.enable = true;