Skip to content

Instantly share code, notes, and snippets.

View docgonzo2015's full-sized avatar
🏠
Working from home

docgonzo2015

🏠
Working from home
  • Germany
View GitHub Profile
@m-radzikowski
m-radzikowski / script-template.sh
Last active October 9, 2025 00:41
Minimal safe Bash script template - see the article with full description: https://betterdev.blog/minimal-safe-bash-script-template/
#!/usr/bin/env bash
set -Eeuo pipefail
trap cleanup SIGINT SIGTERM ERR EXIT
script_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd -P)
usage() {
cat <<EOF
Usage: $(basename "${BASH_SOURCE[0]}") [-h] [-v] [-f] -p param_value arg1 [arg2...]
@arogulin
arogulin / VortexRace3ForMac.md
Last active March 19, 2025 12:19
How to setup Vortex Race 3 keyboard for Mac and move Fn key to Home

How to setup Vortex Race 3 for Mac with latest (on 2020-01-05) firmare V1.02.05.

For better understanding we will use the following naming convention:

  [ L1 ][ L2 ][ L3 ][ Space ][ R1 ][ R2 ][ R3 ]
  1. Reset everything by pressing L3+R1 for 5 seconds. Left LED will blink white color while you're holding the keys. Release them after it stopeed blinking.
  2. Get into one of the programmable layers (R2+RShift) – I like red, the super bright laser LED is the least super annoying in red.
  3. Put the keyboard in Windows Mode (Pn+W), it's the least problematic one.
#!/bin/bash
for key in "$@"
do
key="$1"
flipSubs=false
tenbit=false
case $key in
@DroidFreak32
DroidFreak32 / mkvextract-helper.sh
Created October 17, 2018 14:49 — forked from konfou/mkvextract-helper.sh
extract all tracks/attachments/chapters from an mkv file
#!/usr/bin/env bash
#
# Extract all tracks/attachments/chapters from an mkv file.
# depends
type -p mkvmerge &>/dev/null || exit 3
type -p mkvextract &>/dev/null || exit 3
# trap SIGINT
trap 'trap - INT; kill -s INT "$$"' INT
@jfeilbach
jfeilbach / gist:fd109c7dbc9798ce6e47358b82d0be76
Last active January 10, 2025 10:22
DNS over TLS (knot resolver) setup using 1.1.1.1 on macOS
# Configuring DNS-over-TLS on macOS
# Worked on macOS 10.13.4
brew -v update
brew -v doctor
# Next two commands are optional
sudo chown -R $(whoami) $(brew --prefix)/*
echo 'export PATH="/usr/local/sbin:$PATH"' >> ~/.bash_profile
# Install DNS client
brew install knot-resolver
# Should be installed to something like: /usr/local/Cellar/knot-resolver/2.3.0/sbin/kresd
#!/bin/bash
# Creates a report with all files in listed directories.
# Checks if those files are x265 compression or not.
# Outputs all files that are not.
# Created on Nov 7th 2015 by steelbox.
# Modified on Nov 26th 2016 for Github.
# Verify script usage.
@chak10
chak10 / rapidgator_api.php
Last active October 26, 2023 11:39
Class based on Rapidgator Api
<?php
class Rg {
/*
Based on Rapidgator Api
https://support.rapidgator.net/index.php?/Knowledgebase/Article/View/89/9/do-you-have-api
*/
@japicoder
japicoder / video-convert.sh
Created January 24, 2018 14:17
Convert all the MP4 mobile video of a folder to HEVC/M4V using ffmpeg
#!/bin/bash
DIR=`dirname $(readlink -f $0)`
HEVC_ACTIVE=1
for FILE in *.mp4; do
[ -f "$FILE" ] || break;
FILENAME=`basename $FILE .mp4`
if [[ $HEVC_ACTIVE = 1 ]]; then
@JamesJJ
JamesJJ / video_encode.sh
Last active May 12, 2022 18:15
FFMpeg commands for various video encoding
# val vrTranscodeMp4Args = AppConfigLib.getConfig[String]("CONTENT_VERIFY_TRANSCODE_MP4_ARGS").getOrElse(
# "-movflags faststart -c:v libx264 -s 1920x1080 -b:v 6M -c:a aac -b:a 128k -loglevel warning -y -nostats")
# val vrTranscodeWebmArgs = AppConfigLib.getConfig[String]("CONTENT_VERIFY_TRANSCODE_WEBM_ARGS").getOrElse(
# "-c:v libvpx -s 1920x1080 -crf 20 -b:v 6M -c:a libvorbis -slices 2 -threads 4 -loglevel warning -y -nostats")
# val mvrTranscodeMp4Args = AppConfigLib.getConfig[String]("CONTENT_VERIFY_TRANSCODE_MVR_MP4_ARGS").getOrElse(
# "-movflags faststart -pix_fmt yuv420p -profile:v main -level 4.1 -c:v libx264 -s 1280x720 -b:v 2M -c:a aac -b:a 128k -loglevel warning -y -nostats")
# val mvrTranscodeWebmArgs = AppConfigLib.getConfig[String]("CONTENT_VERIFY_TRANSCODE_MVR_WEBM_ARGS").getOrElse(
@rwenz3l
rwenz3l / hetzner-proxmox-docker.sh
Created September 2, 2017 15:29
Hetzner Dedicated with Debian 9 (Stretch) and Proxmox 5 (LXC) + Docker-CE + Portainer [NAT]
#############################################
### Proxmox V & Docker-CE + Portainer #
#############################################
## Rescue System
# Erase other disks
dd if=/dev/zero of=/dev/sda bs=1M count=100
dd if=/dev/zero of=/dev/sdb bs=1M count=100
# You can install debian 9 via the guide: