Skip to content

Instantly share code, notes, and snippets.

@macpit
macpit / PVE-host-backup.md
Created July 20, 2024 13:32 — forked from aroun01/PVE-host-backup.md
Proxmox PVE Host Config Backup Script

Proxmox PVE Host Config Backup Script

This script can be used to backup essential configuration files from the Proxmox Virtual Enivronment (PVE) host.

The script will create backups using tar with specified backup prefix and date and time stamp in the file name. Script will also delete backups that are older then number of days specified.

Create backup script file

To create backup script that will be executed every day we can create backup script in /etc/cron.daily/ folder. We need to make it writeable by root (creator) only, but readable and executable by everyone:

touch /etc/cron.daily/pvehost-backup
@macpit
macpit / PVE-Multipath.md
Last active July 12, 2024 09:51 — forked from mrpeardotnet/PVE-Multipath.md
PVE-Multipath

Installing multipath tools on PVE Cluster with shared storage

This cheatsheet shows how to install and configure multipath tools on Proxmox PVE Cluster where multiple nodes share single storage with multipath configuration, for example SAN storage connected to each of the nodes by two independent paths.

Proxmox PVE version

This cheatsheet has been tested on Proxmox 8.x.

Note about sudo

I do not prepend sudo command to any of commands listed here, but keep in mind that nearly all commands requires su privileges, so use sudo if your account happen to not have root access.

@macpit
macpit / index.html
Created July 13, 2023 09:40
HLS web-audio-peak-meter Test
<!doctype html>
<html lang="en" data-bs-theme="dark">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
.video-responsive video {
position: relative;
top: 0;
left: 0;
@macpit
macpit / GStreamer-1.0 some strings.sh
Created June 4, 2019 12:24 — forked from strezh/GStreamer-1.0 some strings.sh
GStreamer-1.0 personal cheat sheet
#!/bin/bash
# play YUV444 FULL HD file
gst-launch-1.0 -v filesrc location=size_1920x1080.yuv ! \
videoparse width=1920 height=1080 framerate=25/1 format=GST_VIDEO_FORMAT_Y444 ! \
videoconvert ! \
autovideosink
# play YUV422 FULL HD file
gst-launch-1.0 -v filesrc location=size_1920x1080.yuv ! \
@macpit
macpit / youtube-test.sh
Created May 30, 2019 14:11 — forked from joeladdison/youtube-test.sh
Test stream for YouTube Live
#!/bin/sh
YT_SERVER="rtmp://a.rtmp.youtube.com/live2"
# Needs AUTH, which is the "Stream Name" from Ingestion Settings > Main Camera
# apt-get install --assume-yes gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly gstreamer1.0-libav gstreamer1.0-tools
# https://bugzilla.gnome.org/show_bug.cgi?id=731352#c6
@macpit
macpit / install-ffmpeg-with-decklink-support-ubuntu-18.04-server.md
Last active November 11, 2022 00:39 — forked from afriza/install-ffmpeg-with-decklink-support-ubuntu-18.04-server.md
Compiling and installing `ffmpeg` with Decklink support on Ubuntu 18.04 Server
# Configuration for Alacritty, the GPU enhanced terminal emulator.
#
# Windows Path: C:\Users\Marc\AppData\Roaming\alacritty\alacritty.yaml
#
# Any items in the `env` entry below will be added as
# environment variables. Some entries may override variables
# set by alacritty itself.
#env:
# TERM variable
#
@macpit
macpit / read_mitmproxy_dumpfile.py
Created May 2, 2019 13:23 — forked from nderkach/read_mitmproxy_dumpfile.py
Read a mitmproxy dump file and generate a curl command
#!/usr/bin/env python
#
# Simple script showing how to read a mitmproxy dump file
#
### UPD: this feature is now avaiable in mitmproxy: https://github.com/mitmproxy/mitmproxy/pull/619
from libmproxy import flow
import json, sys