Skip to content

Instantly share code, notes, and snippets.

Avatar
🤔
Thinking…

rugk rugk

🤔
Thinking…
View GitHub Profile
@rugk
rugk / Notrufnummern.vcf
Last active February 14, 2023 08:27
Deutsche Notrufnummern als VCARD zum Importieren in die Kontakte
View Notrufnummern.vcf
BEGIN:VCARD
VERSION:3.0
PRODID:-//Sabre//Sabre VObject 4.4.1//EN
UID:020b3274-6fb5-4997-887a-2a22cb93c4f2
REV;VALUE=DATE-AND-OR-TIME:20200318T210544Z
FN:Polizei (Deutschland)
ADR;TYPE=HOME:;;;;;;
EMAIL;TYPE=HOME:
TEL;TYPE=VOICE:110
CATEGORIES:Notrufnummern
@rugk
rugk / attackRedirect.html
Created February 10, 2020 16:18
iFrame messaging vulnerabilities in Riot.im, see https://github.com/vector-im/riot-web/issues/6173
View attackRedirect.html
<html>
<head>
<script>
// get when tab is switched
(function() {
var hidden = "hidden";
// Standards:
if (hidden in document)
document.addEventListener("visibilitychange", onchange);
@rugk
rugk / emojicoun.md
Created June 3, 2019 19:42
only missing
View emojicoun.md
Country Users % of Total
Germany 1700 31.1%
United States 613 11.2%
France 427 7.8%
United Kingdom 303 5.5%
Italy 227 4.2%
Australia 134 2.5%
Poland 129 2.4%
@rugk
rugk / playground.ftl
Last active January 19, 2019 22:20
OSM "level" translation in fluent with alternative versions when travelling in foreign countries
View playground.ftl
### input data: ground floor = level 0
### for OSM "level" tag, see https://wiki.openstreetmap.org/wiki/Key:level
### KNOWN BUGS:
### 1. I cannot remove the minus (-) sign from negative levels. See https://github.com/projectfluent/fluent/issues/228
### 2. I cannot properly calculate +1 for the US style. See https://github.com/projectfluent/fluent/issues/227
## SYNTAX: floor_<userlanguage>_<country-travelling-to>
## i.e. e.g. floor_DE_EUROP = German-speaking user travelling to Germany (or any other country with basement=level 0)
@rugk
rugk / playground.ftl
Created January 19, 2019 19:38
OSM "level" translation in fluent
View playground.ftl
### input data: ground floor = level 0
### for OSM "level" tag, see https://wiki.openstreetmap.org/wiki/Key:level
### KNOWN BUGS:
### 1. I cannot remove the minus (-) sign from negative levels. See https://github.com/projectfluent/fluent/issues/228
### 2. I cannot properly calculate +1 for the US style. See https://github.com/projectfluent/fluent/issues/227
## Style, where floor = level 0 = input data
@rugk
rugk / instructions.md
Created January 1, 2019 18:41
old manual notification zenity proxy method for borbbackup-cron-helper
View instructions.md
  1. In the borg script you need to set, at least:

    # variable from user where notification should be shown, is usually static
    DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus

    If it does not work, you may need to set export DISPLAY=:0.

  2. In some cases (e.g. when using Wayland) you may additionally need to allow the user to access your Xorg server. Note that only root should be allowed to do that or a user, who is really only running borg. As the user where the notification should be shown execute: xhost +SI:localuser:<user running borg> This has to be done at each login, as the setting does not persist.

@rugk
rugk / revealjs-custom-navigation.js
Last active June 16, 2018 23:00
RevealJS – manually specify order/way to move through slides
View revealjs-custom-navigation.js
var customSlideOrder = (function () {
var me = {};
let cycleMode = null;
function customNavigate(navigate) {
const pos = Reveal.getIndices();
// use if's so keywords like "rightdown" are allowed
if (navigate.includes("right")) {
pos.h += 1
@rugk
rugk / 95-latinimegoogle.sh
Created December 21, 2017 11:12
OTA survival script for AOSP keyboard swipe (LatinME)
View 95-latinimegoogle.sh
#!/sbin/sh
#
# /system/addon.d/95-latinimegoogle.sh
# During an OS upgrade, this script backs up /system/lib/libjni_latinimegoogle.so,
# /system is formatted and reinstalled, then the file is restored.
#
. /tmp/backuptool.functions
list_files() {
@rugk
rugk / git-signing-key-proof.txt
Created October 3, 2017 10:14
Proof that the git signing key belongs to the other key
View git-signing-key-proof.txt
The PGP key for signing git commits (ABA9 B8F6 F448 B07F D7EA 4A1A 05D4 0A63 6AFA B34D) belongs to me, rugk <at> posteo.de.
Here is a copy of the full key:
- -----BEGIN PGP PUBLIC KEY BLOCK-----
mQINBFfIWIwBEADiNf/o13G2RlKSSQH5sriR5ReRwZ6rbuZjisaJzmQ9KKu7o+a9
T7XE88EwcyX3jwTH+mspvtjHNn4eyZHUYm3NmNI/8ZcsGMss6xMq7/27KvhYHvT8
uI+Y3Aszj3OZ1r/bne+D0lW+eY5obH+AR4wMnxLd9AggaQVDOCJ90S0lQJR3gc15
Sn6OdUZdTFc4VyxhsnJu0G/xGTTsxLO4ciBqUYbqDhaiFMNRijjiw601lxri/Cdu
@rugk
rugk / keybase.md
Created October 3, 2017 09:33
Keybase verification
View keybase.md

Keybase proof

I hereby claim:

  • I am rugk on github.
  • I am rugk (https://keybase.io/rugk) on keybase.
  • I have a public key whose fingerprint is 7046 C1B2 8644 9EAF 9F3F F5C1 8F16 2AE4 4088 F1BE

To claim this, I am signing this object: