Skip to content

Instantly share code, notes, and snippets.

@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": "*"
},
@siddolo
siddolo / unpack-unitywebdata1.0.py
Last active February 1, 2026 15:09
Unpack UnityWebData1.0 used in Unity WebGL games
#!/usr/bin/env python3
# Ref: https://github.com/HearthSim/UnityPack/issues/74
import sys
import os
from unitypack.utils import BinaryReader
SIGNATURE = 'UnityWebData1.0'
class DataFile:
// empty spotify liked songs
const elements = document.querySelectorAll('button[aria-label="Elimina da La tua libreria"]');
Array.from(elements).forEach((element, index) => {
element.click()
});
@siddolo
siddolo / MATRIX.md
Last active September 10, 2021 16:43
@siddolo
siddolo / matrix.js
Created September 10, 2021 16:13
Enter the matrix (thechoiceisyours.whatisthematrix.com reverse engineering)
function stringToBytes(t) {
for (var e = [], i = 0; i < t.length; i++) e.push(255 & t.charCodeAt(i));
return e;
}
function bytesToString(t) {
for (var e = [], i = 0; i < t.length; i++) e.push(String.fromCharCode(t[i]));
return e.join('');
}
@siddolo
siddolo / myservice.service
Created March 30, 2021 10:16
Systemd start script after docker service startup
#/etc/systemd/system/myservice.service
[Unit]
Description=My Scipt Description
After=docker.service
BindsTo=docker.service
#ReloadPropagatedFrom=docker.service
[Service]
ExecStart=/path/to/script.sh
@siddolo
siddolo / README.md
Last active August 5, 2025 22:04
Raspberry Pi 4 arm64 + Docker + Portainer on USB3 storage

Raspberry Pi 4 arm64 + Docker + Portainer on USB3 storage

assume that /dev/sda1 is USB3 storage

Install docker and stop daemon

curl -sSL https://get.docker.com | sh
usermod -aG docker pi
service docker stop
@siddolo
siddolo / git-gource-mp4.md
Created February 10, 2021 23:00
Gource to mp4

Gource to mp4

gource \
  --auto-skip-seconds .1 \
  --multi-sampling \
  --seconds-per-day .06 \
  --hide filenames,progress \
  --highlight-users \
 --user-scale 4 \
@siddolo
siddolo / policy.json
Created December 30, 2020 18:26
Minimum permission policy for Synology CloudSync s3 source backup job
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "AllowSepcificBucket",
"Effect": "Allow",
"Action": [
"s3:Get*",
"s3:List*"
],