Skip to content

Instantly share code, notes, and snippets.

View DerEnderKeks's full-sized avatar

DerEnderKeks DerEnderKeks

View GitHub Profile
@DerEnderKeks
DerEnderKeks / filters.txt
Last active July 13, 2024 19:08
My personal uBlock Origin filters
! www.der-postillon.com - hide steady floating button
www.der-postillon.com###steady-floating-button-wrapper
! www.youtube.com - hide Premiere garbage (hides any premiering/announced videos until they are an actual video) and shorts [https://www.reddit.com/r/uBlockOrigin/comments/143mdqv/code_to_block_youtube_shorts_june_2023/]
youtube.com##:xpath(//ytd-rich-item-renderer[descendant::span[contains(text(),"UPCOMING")]])
youtube.com##:xpath(//ytd-rich-item-renderer[descendant::p[contains(text(),"PREMIERE")]])
youtube.com##:xpath(//ytd-rich-item-renderer[descendant::span[contains(@aria-label,"Shorts")]])
youtube.com##:matches-path(/feed/subscriptions) ytd-rich-grid-row, #contents.ytd-rich-grid-row:style(display:contents !important;)
youtube.com##:matches-path(/feed/subscriptions) ytd-rich-section-renderer:has-text(Shorts)
youtube.com##:matches-path(/feed/subscriptions) ytd-rich-shelf-renderer:has-text(Shorts)
@DerEnderKeks
DerEnderKeks / generator.html
Created March 18, 2021 15:36
Avatar animation "generator"
<!DOCTYPE html>
<!--
This page can be used to generate multiple frames of my avatar with the eyes rotated. Could probably be adjusted to do other stuff as well..
-->
<html>
<head>
<title>Generator</title>
</head>
@DerEnderKeks
DerEnderKeks / print-minecraft-stats.sh
Created November 15, 2020 14:13
Script to print a specific Minecraft statistic for all players
#!/usr/bin/env bash
# This script prints the uuid, username and value of a minecraft statistic from the json files (located at world/stats/*.json).
PROFILE_URL="https://sessionserver.mojang.com/session/minecraft/profile"
usage() { echo "Usage: $0 [-d <stats directory>] [-1 <first json path, default 'custom'>] [-2 <second json path, default 'deaths'>]" 1>&2; exit 1; }
while getopts ":d:1:2:" o; do
case "${o}" in
@DerEnderKeks
DerEnderKeks / mfcuk_r65.md
Created March 11, 2019 20:50 — forked from ceres-c/mfcuk_r65.md
Using mfcuk r65 with libnfc 1.5.1 in 2018

You first need to download both libnfc 1.5.1 and mfcuk r65. The former is available among github releases wile the latter can be obtained via git rebase.

If you're on Arch you'll need pcsclite, if on Debian derivates libpcsclite-dev

Let's compile libnfc (<user> is your username)

mkdir -p ~/builds/nfc
cd ~/builds/nfc
wget https://github.com/nfc-tools/libnfc/releases/download/libnfc-1.5.1/libnfc-1.5.1.tar.gz

tar zxf libnfc-1.5.1.tar.gz

@DerEnderKeks
DerEnderKeks / clearDownloads.sh
Created January 20, 2019 15:14
Delete old files from the Downloads folder
#!/usr/bin/env bash
# Works with Git-Bash
echo "Deleting files..."
find "$HOME/Downloads/" -type f -mtime +3 -exec rm -f {} \;
echo "Deleting empty directories..."
find "$HOME/Downloads/" -type d -empty -delete
echo "Done."
@DerEnderKeks
DerEnderKeks / ^^.ahk
Created August 3, 2018 17:14
Replace ^^,`` and `` with a single one of them
#NoEnv
#SingleInstance, force
SendMode Input
SetWorkingDir %A_ScriptDir%
:*B0:^^::
SendInput, {bs}
return
:*B0:``::
@DerEnderKeks
DerEnderKeks / LOL.ahk
Created July 10, 2018 13:47
Automatically login to League of Leagends
; This AutoHotkey script automatically enters your League of Leagends password as soon as you press <CTRL>+<y> in the LOL client.
; You probably have to change the position for the mouse click if your LOL windows isn't set to 1920x1080.
#NoTrayIcon
#SingleInstance, force
#UseHook
#IfWinActive, ahk_class RCLIENT
^y::
SendMode Event
CoordMode, Mouse, Window
MouseClick, left, 1650, 375
@DerEnderKeks
DerEnderKeks / fcbackup.py
Last active July 9, 2018 15:35
Script to backup the configuration of betaflight/INAV flight controllers
#!/usr/bin/env python3
import io
import time
from time import gmtime, strftime
import serial
import serial.tools.list_ports
if __name__ == '__main__':
#!/bin/bash
##
# File:
# nginx-modsite
# Description:
# Provides a basic script to automate enabling and disabling websites found
# in the default configuration directories:
# /etc/nginx/sites-available and /etc/nginx/sites-enabled
# For easy access to this script, copy it into the directory:
@DerEnderKeks
DerEnderKeks / WebhookTutorial.md
Last active December 4, 2023 20:28
Simple Webhook Tutorial (Twitter -> Discord using IFTTT)

Simple Webhook Tutorial

In this tutorial, I will be explaining how to set up a simple webhook to relay your tweets to a Discord channel.

Step 1 - Register on IFTTT

  1. Go to https://ifttt.com/ and create an account (if you don't already have one).

Step 2 - Make a Discord Webhook

  1. Find the Discord channel in which you would like to send Tweets.

  2. In the settings for that channel, find the Webhooks option and create a new webhook.