Skip to content

Instantly share code, notes, and snippets.

View HarHarLinks's full-sized avatar
🐞
filing those issues

Kim Brose HarHarLinks

🐞
filing those issues
  • Germany
View GitHub Profile
@HarHarLinks
HarHarLinks / init.lua
Last active August 10, 2016 18:40 — forked from thorwe/init.lua
Teamspeak 3 Channel Join Monitor - Lua script
-- written by https://github.com/thorwe aka philosound in the teamspeak forums
-- Installation:
-- Go to your Teamspeak program folder -> plugins -> lua_plugin
-- Create a new folder, rename it to "notifier"
-- Put this init.lua file in the "notifier" folder
-- Adjust user config below to your needs
-- Start Teamspeak, make sure the lua plugin is enabled in options->plugins
-- Enter the plugin settings, enable the notifier script
@HarHarLinks
HarHarLinks / message.html
Last active September 22, 2023 13:08
Send the same server notice to a number of users of your synapse matrix.org homeserver at once
<h1>this is a title</h3>\n
<p>here comes a paragraph</p>\n
<p>and another</p>\n
#!/usr/bin/env python
# This code is provided free of charge without any liability or guarantees.
# (c) HarHarLinks (https://github.com/HarHarLinks)
# This tool is supposed to ease interaction with matrix-reminder-bot
# https://github.com/anoadragon453/matrix-reminder-bot
# This tool builds upon matrix.sh and you need to install (download) it yourself
# https://github.com/fabianonline/matrix.sh
@HarHarLinks
HarHarLinks / gist:e06363c4b61d6be2f0941193bacf1879
Last active January 21, 2022 15:41
Tasmota BME280 + generic HT16K33 7 segment display cycle
// This is for a "DisplayMode 11" generic common anode 7 segment display such as the Adafruit one with HT16K33
// Rule sets updates the display every 15 seconds on a cycle:
// 1. the 24h time, using DisplayMode 2. This has the advantage of animated blinking colon, and updating if necessary, but the drawback that the display blanks at the start of the cycle
// 2. the Temperature value from BME280 sensor formatted as `XX.Y°` a 2+1 digit float with degree sign. Mostly useful with Celsius scale, adapt to your needs.
// 3. the Humidity value from BME280 sensor formatted as `XX.YH` where H is the indicator that this is the humidity value, since the display can't render %
// 4. the Air Pressure value from BME280 sensor formatted as `XXXX` or `XXX.Y` depending on whether it's greater or less than 1000
// The DisplayText [x4]r99 and DisplayText [x4]r118 are raw values setting the "fourth" digit of the display to the ° symbol/letter H as the driver doesn't support them
// Backlog0 is used since we need multiple Display
@HarHarLinks
HarHarLinks / Mixcloud RSSifier
Last active October 9, 2024 14:30 — forked from ilevantis/Mixcloud RSSifier
Turn mixcloud streams into an RSS feed e.g. for mixcloud.com/<mixcloudstream>/playlists/<streamplaylist-if-there-is-one>/ go to mysite.com/mixcloud-rssifier/?fname=<mixcloudstream>&lname=<streamplaylist-if-there-is-one> to get an RSS feed of the stream or the playlist from the stream
<?php
header('Content-Type: application/rss+xml; charset=UTF-8');
// suck in the query string variables
$feed_name = htmlspecialchars($_GET['fname']);
$list_name = htmlspecialchars($_GET['lname']);
// compose the api urls + other stuff depending on presence of playlist
if(isset($_GET['lname'])) {
$json_url = 'http://api.mixcloud.com/'.$feed_name.'/playlists/'.$list_name.'/cloudcasts/';
@HarHarLinks
HarHarLinks / rest.ps1
Created August 12, 2022 11:57
How to trigger an action (here: PowerShell script calling a REST service) on Windows 10 upon Power On/Off/Sleep/Resume
Param([string]$cmd)
$on = '{"button": "poweron"}'
$off = '{"button": "poweroff"}'
$toggle = '{"button": "toggle_power"}'
$louder = '{"button": "vol_inc"}'
$quieter = '{"button": "vol_dec"}'
$multichannel = '{"button": "multichannel"}'
$uri = 'http://myrestservice.local:8000/button_press_post'
@HarHarLinks
HarHarLinks / mirror_reposh.sh
Last active November 12, 2023 15:52
bash script that will pull all changes from one remote and push them to another
#!/usr/bin/env bash
# the following hardcoded assumtions are made:
# - before running this script, you must locally checkout the source repo
# - set the source remote's name in the remote variable
# - create a target repo and add it to the local checkout with the name "mirror"
# - branch names containing "dependabot" and "renovate" are ignored
# - the repo must have a "default branch" called master, main, or develop which will be used in that order
remote=origin
#!/usr/bin/env python3
# import ...
k = event.key["k"]
key = base64.urlsafe_b64decode(k + "=" * (-len(k) % 4))
iv = base64.urlsafe_b64decode(event.iv + "=" * (-len(event.iv) % 4))
cypher = AES.new(key, AES.MODE_CTR, nonce=iv[:8])
print(cypher.decrypt(response.body))
#!/usr/bin/env bash
if [[ ! -z "$1" ]];
then
channelid=$(curl --silent "$1" | grep "externalId" | sed -E 's/.+"externalId":"([[:alnum:]]+)".+/\1/')
if [[ ! -z "$channelid" ]];
then
echo -n "https://www.youtube.com/feeds/videos.xml?channel_id=$channelid"
echo ""
exit 0
https://stickeroperation.center/how-to-sticker/
https://www.stickma.de
https://www.wir-machen-druck.de
https://disyouth.net (closed 2024-05-01)