Skip to content

Instantly share code, notes, and snippets.

@benkulbertis
benkulbertis / cloudflare-update-record.sh
Last active October 22, 2024 19:31
Cloudflare API v4 Dynamic DNS Update in Bash
#!/bin/bash
# CHANGE THESE
auth_email="[email protected]"
auth_key="c2547eb745079dac9320b638f5e225cf483cc5cfdda41" # found in cloudflare account settings
zone_name="example.com"
record_name="www.example.com"
# MAYBE CHANGE THESE
ip=$(curl -s http://ipv4.icanhazip.com)
@fevangelou
fevangelou / my.cnf
Last active November 14, 2024 18:42
Optimized my.cnf configuration for MySQL/MariaDB (on Ubuntu, CentOS, Almalinux etc. servers)
# === Optimized my.cnf configuration for MySQL/MariaDB (on Ubuntu, CentOS, Almalinux etc. servers) ===
#
# by Fotis Evangelou, developer of Engintron (engintron.com)
#
# ~ Updated September 2024 ~
#
#
# The settings provided below are a starting point for a 8-16 GB RAM server with 4-8 CPU cores.
# If you have different resources available you should adjust accordingly to save CPU, RAM & disk I/O usage.
#
@CannonballSkippy
CannonballSkippy / Video-and-Subtitle-merger-batch-for-mkvmerge.bat
Created May 15, 2017 13:27
This is a batch script that will merge subtitles with a video file, resulting in an *.mkv file with internal subtitles.
@echo off
echo ----------------------------------------------------------------------
echo VIDEO AND SUBTITLE MERGER
echo version 1.0.0 by Seyoum
echo ----------------------------------------------------------------------
:: Set file video extention
:VIDEOFILEEXTENTION
echo.
set /p videofileformat=Enter the video file type extension (e.g mp4):
if /I "%videofileformat%" EQU "webm" echo You have chosen %videofileformat% as your video file format&goto:SUBTITLEFILEEXTENTION
@lepiaf
lepiaf / unbound.conf
Last active April 3, 2024 21:36
Unbound configuration IPv4 and IPv6
server:
interface: 0.0.0.0
interface: ::0
access-control: 192.168.42.0/24 allow
access-control: 127.0.0.0 allow
access-control: 2001:db8:dead:beef::/48 allow
# unbound optimisation
num-threads: 4
@Nyoob
Nyoob / installcommands.sh
Created November 15, 2017 00:20
Osu! compile commands for easy copy&pasta
git clone https://github.com/ppy/osu
cd osu
git submodule update --init --recursive
wget https://dist.nuget.org/win-x86-commandline/latest/nuget.exe
mono ./nuget.exe restore
xbuild
cd osu.Desktop/bin/Debug/
mono 'osu!.exe'
@pzillmann
pzillmann / dtube-sprite.sh
Created February 13, 2018 19:42
d.tube Sprite Generation Script. License: CC0 / Public Domain
#!/bin/bash
if [ $# -ne 2 ]; then
echo
echo call: $0 input_file.mp4 output_file.jpg
exit 1
fi
if [ "$(command -v ffmpeg)" = "" ]; then
echo
@opus-x
opus-x / Spotify_Eliminate_Advertisements
Last active November 6, 2024 18:34
Eliminate Spotify Advertisements + Complete Server List
##################################################################################
# ELIMINATE SPOTIFY ADS (VERSION 1.2 - 8.5) - ABANDONED FOR NOW #
##################################################################################
#
# NOTE: SOMETIMES ONLY ANNOUNCEMENT OF AN AD WHILE USING APP VERSION 7.5-7.9?-8.x.
# USING AN OFFICIAL OLDER VERSION SOLVES THIS. TEST IT (APKMIRROR). THIS WILL NOT
# OCCUR USING CHROMECAST / GOOGLE HOME.
#
# COULD NOT SOLVE THE AUDIO AD INRO/OUTRO IN THE APP.
# SUGGESTIONS? WRITE A COMMENT BELOW.
@kekru
kekru / traefik-redirect-path.md
Last active October 16, 2024 09:52
Traefik redirect / (root) to sub path with Docker labels

Traefik: redirect base or root path to a subpath

This is tested with Traefik 1.7

This is how to redirect the root or base path to a sub path in Traefik using Docker labels:
Goals

  • https://example.com -> https://example.com/abc/xyz/
  • https://example.com/ -> https://example.com/abc/xyz/
  • https://example.com/something -> no redirect
@yvesh
yvesh / proxmox-zfs-encryption.md
Last active October 19, 2024 04:29
Proxmox 6.1 ZFS native full disk (ZFS root) encryption.

Simple guide for fulldisk encryption with Proxmox and ZFS native encryption

Install normally using the installer, after the setup reboot into recovery mode (from the USB stick). Make sure to install in UEFI mode (you need systemd-boot).

If the USB stick is not working for you, because of the old Kernel version (2.6.x), you can also use an Ubuntu 19.10 / 20.04 boot stick. ZFS suport is enabled there out of the box.

Steps:

@Xarkam
Xarkam / .imwheelrc
Last active July 21, 2024 23:07
imwheel configuration vscode, jetbrains ide, slack, discord, rocket.chat, microsoft teams, gimp, firefox, chrome/chromium, vivaldi, spotify
"^(code|discord|rocket.chat|slack|microsoft teams - preview)$"
None, Up, Button4, 2
None, Down, Button5, 2
".*-chrome*"
None, Up, Button4, 2
None, Down, Button5, 2
Shift_L, Up, Shift_L|Button4, 2
Shift_L, Down, Shift_L|Button5, 2
Control_L, Up, Control_L|Button4