Skip to content

Instantly share code, notes, and snippets.

View TopperBG's full-sized avatar

Dimitar "Topper" Maznekov TopperBG

View GitHub Profile

Bitbake Cheatsheet

Verbose as possible

bitbake -vDDD your-recipe

List recipes

bitbake -s
@TopperBG
TopperBG / daemon.json
Last active April 24, 2024 06:38
Run PMM detached removable container when Tautulli detect movie/series import in Plex
#/etc/docker/daemon.json <- where to save a file, remove that line after that
{
"hosts": ["tcp://0.0.0.0:2375", "unix:///var/run/docker.sock"]
}
@TopperBG
TopperBG / docker curl access
Last active October 26, 2023 12:17
Run/restart docker container with API post (PMM example)
#!/bin/bash
curl -X POST --unix-socket /var/run/docker.sock -H "Content-Type: application/json" "http:/v1.41/containers/create?name=pmm-temp" -d '{
"Image": "meisnate12/plex-meta-manager",
"Cmd": ["--overlays", "--run", "-ig", "--ignore-schedules", "--no-missing"],
"HostConfig": {
"Binds": ["/root/docker/etc/plexmetamanager:/config"],
"AutoRemove": true
}
}'
@TopperBG
TopperBG / bukvibg.py
Last active April 23, 2024 10:33
Kodi Bukvi.bg parse
# -*- coding: utf-8 -*-
from nsub import log_my, savetofile
from common import *
import requests
import re
try:
import urllib.request
except:
pass
@TopperBG
TopperBG / webserver.sh
Created December 2, 2022 06:24
HTTP server in bash oneliner
#!/bin/bash
while true; do echo -e "HTTP/1.1 200 OK\n\n$($1)" | nc -l -k -p 8080 -q 1; done
@TopperBG
TopperBG / run
Created November 10, 2022 08:01
TorrServer update file
#!/bin/bash
#TorrServer don't have docker image at least not often updated so I create script to build one from latest github tag
REPO="YouROK/TorrServer"
WORKDIR="/root/Docker/TorrServer/"
cd $WORKDIR
TARGETVER=$(curl -s "https://api.github.com/repos/$REPO/releases/latest" | awk -F '"' '/tag_name/{print $4}')
CURRENTVER=$(< current.ver)
@TopperBG
TopperBG / run
Created November 10, 2022 07:54
File to update docker container and parsed with containers_update.sh
TARGET=lscr.io/linuxserver/bazarr:latest
LATEST=$(docker image inspect $TARGET --format '{{.Created}}' | grep -Eo '[[:digit:]]{4}-[[:digit:]]{2}-[[:digit:]]{2}')
CURRENT=$(< image.date)
if [[ "$LATEST" != "$CURRENT" ]]; then
echo "$LATEST" > image.date
docker stop bazarr
docker rm bazarr
docker pull $TARGET
docker run -d \
@TopperBG
TopperBG / container_update.sh
Created November 10, 2022 07:48
Find dirs with docker update file "run" end execute them
#!/bin/bash
for i in $(find /root/Docker/ -type f -name "run")
do (
cd $(dirname $(realpath $i));
bash run;
)
done
count=$(docker ps | wc -l)
let "count-=1" #remove first line of description
@TopperBG
TopperBG / termux-debian-jackett.sh
Last active November 22, 2022 07:19
termux host install jackett in debian (according host architecture)
#!/bin/sh
pkg update && pkg upgrade -y && pkg install proot-distro wget && pkg clean && pkg autoclean
ver=$( curl -s -H 'Pragma: no-cache' "https://api.github.com/repos/Jackett/Jackett/releases/latest" | awk -F '"' '/tag_name/{print $4}' | tr -d '[:cntrl:]' )
echo ">>> Latest Jackett version $ver"
case $( uname -m | tr '[:upper:]' '[:lower:]') in
x86_64 )
targetos=LinuxAMD
;;
aarch64 )
Contrast=1 ; Contrast [Min:0, Max:7]
Saturation=6 ; Saturation [Min:0, Max:7]
Sharpness=7 ; Sharpness [Min:0, Max:7]
Gamma=2 ; Gamma [Min:0, Max:7]
StillSize=0 ; Size: 0 ~ submenu - 1 [Min.: 0, Max.: 7]
StillQuality=0 ; Quality [SuperHigh:0, High:1]
MicSensitivity=1 ; Microfon sens, 0:High, 1:Standart
Scene=0 ; 0:Auto, [Min:0, Max:6]
EV=6 ; Exposition 0: -2,0, 1: -1,66, 2: -1,33, 3: -1,00, 4: -0,66, 5: -0,33, 6: 0,00, 7: +0,33, 8: +0,66, 9: +1.00, 10: +1.33, 11: +1,66, 12: +2.0