Skip to content

Instantly share code, notes, and snippets.

View marcsello's full-sized avatar
🐧
Compiling Gentoo....

Marcell Pünkösd marcsello

🐧
Compiling Gentoo....
View GitHub Profile
@marcsello
marcsello / stream_to_youtube.sh
Last active September 1, 2016 22:02 — forked from olasd/stream_to_youtube.sh
Stream video to youtube via ffmpeg
#! /bin/bash
# Youtube streaming stuff, original by: https://gist.github.com/olasd/9841772
# Configuration of stream; pootis bitrate here, resolution will be the video's
VBR="2500k" # Bitrate of ze stream
FPS="24" # FPS of ze stream
QUAL="medium" # Quality preset (ultrafast, superfast, veryfast, faster, fast, medium, slow, slower, veryslow, placebo)
YOUTUBE_URL="rtmp://a.rtmp.youtube.com/live2" # URL of ze Youtube, (default is ze main)
@marcsello
marcsello / burnsub.bat
Created July 12, 2017 18:03
burnsub subtitle burner script for ffmpeg on windows
@echo off
REM THIS SCRIPT WORKS ONLY WITH FFMPEG VERSION 20150628-git-d62657e-win64-static FOR SOME FUCKING WEIRD REASON
REM Put this script next to your ffmpeg executable
REM Put fonts.conf into fonts/ folder relative to ffmpeg
if [%1]==[] goto :eof
if [%2]==[] goto :eof
if [%3]==[] goto :eof
#!/bin/bash
echo -e "Fetching station list...\n"
list=$(curl "--station_lising--" 2>/dev/null)
streaming_links=()
link_cnt="0"
while read -r i; do
@marcsello
marcsello / autoconnectdb.py
Created September 7, 2018 15:03
Auto (re)connecting DB connection thingy. For stuff that should be always connected to a db.
#!/usr/bin/env python3
import MySQLdb
import _mysql_exceptions
import time
class AutoconnectDB():
def __init__(self,user,password,db,host=None,unix_socket=None):
self.__user = user
@marcsello
marcsello / motd.template
Created March 21, 2019 21:47
Update /etc/motd with a quote downloaded using the QOTD protocol
This is an example motd:
The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
{} <-- This is where the Quote goes
@marcsello
marcsello / my_fucking_data_visualizer.py
Created November 8, 2019 13:59
My fucking data visualizer
#! /usr/bin/env python3
#
# I seriously had to write this, to have an easy to use data explorer...
# It's not quick, or flexible, but it get's the job done, with minimal memory footprint. (achieved by a lot of disk access, sorry...)
#
# Usage:
# 1) Install matplotlib and pythondialog (later may be provided by your distribution)
# 2) run `python3 my_fucking_data_visualizer.py my_data.csv` where my_data.csv is a CSV file with the following properties:
# - The first row is the column headers
@marcsello
marcsello / influxdumper.py
Created November 8, 2019 17:10
InfluxDB to CSV dumper
#!/usr/bin/env python3
from influxdb import InfluxDBClient # <- install this first
import csv
import os
import argparse
#
# This script dumps all avliliable measurements into separate CSV files from InfluxDB
#
@marcsello
marcsello / bettersocket.py
Created December 26, 2019 02:52
Better socket handling for python
#!/usr/bin/env python3
import socket
import select
from typing import Optional
class BetterSocketReader():
"""
This socket reader is designed to read delimited chunks from the socket efficently
"""
@marcsello
marcsello / README.md
Created April 15, 2020 15:28
NETLOCK

NETLOCK

This is a simple application that can broadcast cryptographically signed commands to all computers in the same broadcast domain using a pre-shared key.

Usage

Daemon

The Daemon should run on computers which should execute the commands. The pre-shared key should be provided as an evironmental variable NETLOCK_PSK. Optionally a --debug argumentum could be provided to the daemon so that it will print out debug messages.

@marcsello
marcsello / ezobackup.sh
Created October 20, 2020 19:42
Script that safely creates the backups for the EZO.TV Minecraft server
#!/bin/bash
# Requirements:
# - mcrcon: https://github.com/Tiiffi/mcrcon
# - sentry-cli: https://github.com/getsentry/sentry-cli
# configure
SENTRY_DSN=
export SENTRY_DSN