This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: weedcam-live-ffmpeg | |
namespace: default | |
spec: | |
strategy: | |
type: Recreate | |
template: | |
metadata: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import ipaddress | |
import requests | |
import socket | |
from sys import argv, exit | |
def getIPs() -> ipaddress.ip_network: | |
r4 = requests.get("https://www.cloudflare.com/ips-v4") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ffmpeg -f lavfi -i anullsrc -f v4l2 -r 5 -video_size 1920x1080 -i "/dev/video0" -c:v h264_omx -preset ultrafast -b:v 1000k -c:a aac -f flv 'rtmp://x.x.x.x/live/streamkey' | |
# rotate and crop | |
ffmpeg -f lavfi -i anullsrc -f v4l2 -r 1 -video_size 1920x1080 -i "/dev/video0" -vf "transpose=2,crop=1080:1080:960:540" -c:v h264_omx -preset ultrafast -b:v 1000k -c:a aac -f flv 'rtmp://x.x.x.x:xxxx/live/streamkey' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
from yt_dlp import YoutubeDL | |
URLS = [] | |
for i in range(1,36): | |
URLS.append(f"https://www.arte.tv/de/videos/089024-{str(i).zfill(3)}-A/in-therapie-staffel-1-{i}-35/") | |
URLS.append(f"https://www.arte.tv/de/videos/102958-{str(i).zfill(3)}-A/in-therapie-staffel-2-{i}-35/") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
from PIL import Image | |
from os import stat | |
from glob import glob | |
import subprocess | |
try: | |
subprocess.check_output('rm *.gs.png temp_no_ocr.pdf output.pdf', shell=True, executable="/bin/bash") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Found here: https://webapps.stackexchange.com/questions/106093/how-do-i-bulk-delete-all-of-my-youtube-comments-and-replies#comment140001_115717 | |
*/ | |
function sleep(ms) { | |
return new Promise(resolve => setTimeout(resolve, ms)); | |
} async function d() { | |
var i=0; | |
document.body.querySelectorAll('.VfPpkd-Bz112c-LgbsSe.yHy1rc.eT1oJ').forEach( | |
async (e) => { await sleep(1000 * i++); e.click(); }); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: "3.4" | |
services: | |
postgres: | |
image: postgres:14 | |
restart: always | |
volumes: | |
- ./src/build/docker/postgres/create_db.sh:/docker-entrypoint-initdb.d/20-create_db.sh | |
# To persist your PostgreSQL databases outside of the Docker image, | |
# to prevent data loss, modify the following ./path_to path: | |
- ./data/postgresql:/var/lib/postgresql/data |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3.7' | |
services: | |
traefik: | |
image: traefik:latest | |
restart: always | |
container_name: traefik | |
command: | |
#- --api.insecure=true | |
#- --api.dashboard=true | |
#- --api.debug=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
files=`find . -newermt "0000-12-31 23:59:59" ! -newermt "1970-00-01 23:59:59"` | |
for filename in $files; do | |
touch -a -m "${filename}" | |
done | |
# You need to run | |
# php occ files:scan --all |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# restart icinga2 service on all hosts | |
ansible -i hosts.live.yml all -b -m service -a "name=nginx state=restarted" | |
# check if host is reachable from Ansible hosts | |
ansible -i hosts.live.yml all -m wait_for -a "host=google.com port=443" |
NewerOlder