Skip to content

Instantly share code, notes, and snippets.

View mschmitt's full-sized avatar
🥾
Busier than a one-legged man in an ass-kicking contest.

Martin Schmitt mschmitt

🥾
Busier than a one-legged man in an ass-kicking contest.
View GitHub Profile
@nakov
nakov / http-get.js
Created February 20, 2023 14:09
Shelly HTTP GET
Shelly.call(
"HTTP.GET",
{"url": "https://api.zippopotam.us/us/90210"},
function (response) {
if (response && response.code && response.code === 200) {
print(JSON.stringify(response.body));
Shelly.emitEvent("HTTP-result", response.body);
}
else {
print("Error: HTTP request failed.");
@rkallensee
rkallensee / Gemfile
Last active April 11, 2024 01:59
Script to convert datetimes in an icalendar ics file to local time
source 'https://rubygems.org'
gem 'icalendar'
gem 'activesupport'
# gem 'pry'
@BusterNeece
BusterNeece / video_stream.liq
Last active March 22, 2025 03:49
Liquidsoap 2.1 Video Stream with HLS
# What is This Script?
# This script allows you to broadcast your AzuraCast radio signal to a remote video stream, using a
# static video file that loops in the background and dynamically writing the currently playing track
# on top of that video file.
#
# This script replaces the previous "radio-video-stream" project, allowing you to manage files directly from
# within AzuraCast and not requiring any changes to your Docker configuration at all.
#
# To use this script, you must be running at least AzuraCast 0.19.0 or a later Rolling Release version.
#
@gladiatx0r
gladiatx0r / gist:c52d529ea268f7e74295c2c492cf9774
Created October 6, 2020 21:05 — forked from jeffmcjunkin/gist:d5fb8dbf15cbd5d37a77fafccda4d969
Retrieving SSSD plain text passwords (krb5_store_password_if_offline)
for who ever this interest, if you enable krb5_store_password_if_offline in the SSSD configuration, the AD password for accounts is stored in plaintext in the kernel keyring
to dump the clear text password you can do :
```
gdb -p <PID_OF_SSSD>
call system("keyctl show > /tmp/output")
```
From the /tmp/output locate the key_id for the user you want
Example of an output is :
{
"info": {
"_postman_id": "16236cd9-63ed-4d5e-805b-5d25781090b0",
"name": "Audi Authentication",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
"item": [
{
"name": "Auth - 1 - Get OpenID configuration",
"protocolProfileBehavior": {
@ThomasLeister
ThomasLeister / rspamd-whitelisting.md
Last active February 15, 2025 06:19
How to whitelist IP addresses or domains in Rspamd

Whitelist IP addresses based on pre-filter policy

/etc/rspamd/local.d/multimap.conf:

  IP_WHITELIST {
      type = "ip";
      prefilter = true;
      map = "/${LOCAL_CONFDIR}/local.d/ip_whitelist.map";
 action = "accept";
@gboudreau
gboudreau / AuthyToOtherAuthenticator.md
Last active March 25, 2025 11:44 — forked from Ingramz/AuthyToOtherAuthenticator.md
Export TOTP tokens from Authy

Exporting your 2FA tokens from Authy to transfer them into another 2FA application

IMPORTANT - Update regarding deprecation of Authy desktop apps

Past August 2024, Authy stopped supported the desktop version of their apps:
See Authy is shutting down its desktop app | The 2FA app Authy will only be available on Android and iOS starting in August for details.

And indeed, after a while, Authy changed something in their backend which now prevents the old desktop app from logging in. If you are already logged in, then you are in luck, and you can follow the instructions below to export your tokens.

If you are not logged in anymore, but can find a backup of the necessary files, then restore those files, and re-install Authy 2.2.3 following the instructions below, and it should work as expected.

@webghostx
webghostx / day-night-detection.py
Last active October 2, 2021 18:02
simple Day/Night detection in Python
#!/usr/bin/python
# -- coding: utf-8 --
'''
simple Day/Night detection in Python
require pyephem https://pypi.python.org/pypi/pyephem/
'''
import ephem
import time
@jamesmacwhite
jamesmacwhite / Workarounds for Netflix and the blocking of IPv6 tunnels.md
Last active March 22, 2025 23:33
Prevent proxy/VPN streaming error messages from Netflix when using a Hurricane Electric IPv6 tunnel.

Workarounds for Netflix and the blocking of Hurricane Electric IPv6 tunnels

The dreaded "You seem to be using an unblocker or proxy." error message. Cool story bro.

This gist was essentially created out of my own rant about Netflix being hostile to IPv6 tunnel services since June 2016. You are welcome to read my opinion on the matter, this is the more technical side to the issue and how to combat it within your own network.

Since I wrote this, various GitHub users have contributed their thoughts and ideas which has been incorporated into this gist. Thank you to everyone who have contributed their own methods and implementations.

The problem

Netflix now treats IPv6 tunnel brokers (such as Hurricane Electric) as proxy servers. A while ago it became apparent to users and Netflix that somewhat by accident, IPv6 tunnel users were being served content outside of their geolocation because of the way Netflix was identifyi

@lukas-h
lukas-h / license-badges.md
Last active March 16, 2025 17:04
Markdown License Badges for your Project

Markdown License badges

Collection of License badges for your Project's README file.
This list includes the most common open source and open data licenses.
Easily copy and paste the code under the badges into your Markdown files.

Notes

  • The badges do not fully replace the license informations for your projects, they are only emblems for the README, that the user can see the License at first glance.

Translations: (No guarantee that the translations are up-to-date)