Skip to content

Instantly share code, notes, and snippets.

View abbe79's full-sized avatar
😎

Tobias Abstreiter abbe79

😎
  • B/S/H/
  • Bavaria, Germany
View GitHub Profile

Code Review Workflow

Start Your Work

Before starting any work, create a new branch off of the base branch your changes will be submitted to.

E.g. if you are working on a bug, your base branch would be main; if you are working on a feature, your base branch would be that feature's branch.

It is good practice to give the branch a name that is relevant to the work being done.

@tao-j
tao-j / brt.m
Last active September 2, 2023 02:17
M1 External Monitor Brightness Control over DDC
@import Darwin;
@import Foundation;
@import IOKit;
// clang -fmodules -o brt brt.m && ./brt
// credit to @zhuowei for discovering the following APIs
typedef CFTypeRef IOAVServiceRef;
extern IOAVServiceRef IOAVServiceCreate(CFAllocatorRef allocator);
extern IOReturn IOAVServiceCopyEDID(IOAVServiceRef service, CFDataRef* x2);
@marcusraitner
marcusraitner / covid-19-7-day-incidence-county.js
Last active June 6, 2023 18:12 — forked from MatzeKitt/covid-19-chart-county.js
Script for ScriptableApp displaying the 7-Day-Incidence in your county in Germany
// Variables used by Scriptable.
// These must be at the very top of the file. Do not edit.
// icon-color: deep-gray; icon-glyph: magic;
// Licence: GNU GENERAL PUBLIC LICENSE, Version 3, 29 June 2007
// Author: Marcus Raitner (https://fuehrung-erfahren.de)
// Source: https://github.com/marcusraitner/COVID-19-Dashboard
// ## Changelog
// * 1.0.1: Correction of layout of label for covid-beds
// * 1.0.2: Bug-Fix for Saar-Pfalz-Kreis (using GEN instead of county for join)
// * 1.0.3: Bug-Fix for Landsberg a. Lech (now using both GEN and county)
@n0rdlicht
n0rdlicht / ios-scriptable-widget-vaccination-rate-germany.js
Last active January 20, 2021 20:48
Scriptable Widget: Current Vaccination Numbers and Rates in Germany
// Variables used by Scriptable.
// These must be at the very top of the file. Do not edit.
// icon-color: green; icon-glyph: magic;
// Licence: Robert Koch-Institut (RKI), dl-de/by-2-0
// Vaccine API by @twesterhuys / https://github.com/n0rdlicht
// Location detection by @mkreuz
const options = [
"Germany",
@marco79cgn
marco79cgn / vaccination-stats.js
Last active January 11, 2023 21:47
A Scriptable widget that shows the amount of people who have received the corona vaccination in Germany
// Version 1.3.0
// 27.11.2021
//
// Variables used by Scriptable.
// These must be at the very top of the file. Do not edit.
// icon-color: red; icon-glyph: notes-medical;
// Mit Caching und Fallback
const cacheMinutes = 60; // 60 min
const today = new Date();
const neededTotalVaccinations = 83200000;
@kevinkub
kevinkub / incidence.js
Last active June 27, 2023 12:53
COVID-19 Inzidenz-Widget für iOS innerhalb Deutschlands 🇩🇪
// Licence: Robert Koch-Institut (RKI), dl-de/by-2-0
class IncidenceWidget {
constructor() {
this.previousDaysToShow = 31;
this.apiUrlDistricts = (location) => `https://services7.arcgis.com/mOBPykOjAyBO2ZKk/arcgis/rest/services/RKI_Landkreisdaten/FeatureServer/0/query?where=1%3D1&outFields=RS,GEN,cases7_bl_per_100k,cases7_per_100k,BL&geometry=${location.longitude.toFixed(3)}%2C${location.latitude.toFixed(3)}&geometryType=esriGeometryPoint&inSR=4326&spatialRel=esriSpatialRelWithin&returnGeometry=false&outSR=4326&f=json`
this.apiUrlDistrictsHistory = (districtId) => `https://services7.arcgis.com/mOBPykOjAyBO2ZKk/ArcGIS/rest/services/Covid19_hubv/FeatureServer/0/query?where=IdLandkreis%20%3D%20%27${districtId}%27%20AND%20Meldedatum%20%3E%3D%20TIMESTAMP%20%27${this.getDateString(-this.previousDaysToShow)}%2000%3A00%3A00%27%20AND%20Meldedatum%20%3C%3D%20TIMESTAMP%20%27${this.getDateString(1)}%2000%3A00%3A00%27&outFields=Landkreis,Meldedatum,AnzahlFall&outSR=4326&f=json`
this.stateToAbbr = {
@pamolloy
pamolloy / README.md
Last active January 23, 2024 07:28
Ubiquiti USG configuration for Wireguard

Download the latest ugw3 package from https://github.com/Lochnair/vyatta-wireguard/releases and install it on your USG using dpkg -i wireguard-ugw3-<version>.deb.

cd /config/auth
umask 077
mkdir wireguard
cd wireguard
wg genkey > wg_private.key
wg pubkey < wg_private.key > wg_public.key
@andrey-yantsen
andrey-yantsen / README.md
Last active April 1, 2020 19:54
Workaround for openhab/openhab2-addons#3522

This script monitors openhab log for messages like Terminating homekit connection and New homekit connection and saving connection state to specified MQTT. I'm running it with following parameters:

python3 homekiter.py --mqtt_host wb.286.su --mqtt_topic_prefix /custom/homekit_connected --logfile /usr/src/logs/openhab.log

In the openhab I have created following things and items:

Thing exec:command:openhab_refresh_homekit [ command="ssh -i /openhab/conf/id_rsa openhab@localhost -p 8101 bundle:refresh org.openhab.io.homekit", interval=0, autorun=false ]
@seignovert
seignovert / README.md
Last active September 7, 2023 02:01
Enable RSync with Synology DSM 6.0 without RSA SSH-key

Enable RSync with Synology DSM 6.0 without RSA SSH-key

##Enable user home service Open the Control panel, in the User section go to Advanced tab and in the section User Home:

  • Enable user home service Click Apply

##Enable SSH Go to Terminal & SNMP section and:

  • Enable SSH service