Skip to content

Instantly share code, notes, and snippets.

Avatar

Andrej Shadura andrewshadura

View GitHub Profile
@andrewshadura
andrewshadura / eid-sk-launcher.py
Created Jun 3, 2020
eID signer launcher protocol
View eid-sk-launcher.py
#!/usr/bin/env python3
import asyncio
from functools import partial
from pathlib import Path
import os
import ssl
import subprocess
import sys
from urllib.parse import urlparse, parse_qs, urlunparse
@andrewshadura
andrewshadura / patches-applied.diff
Last active May 23, 2019
Diff between matrix-synapse 0.99.2-5 and 0.99.5.1-1, patches applied
View patches-applied.diff
This file has been truncated, but you can view the full file.
diff --git a/.buildkite/.env b/.buildkite/.env
new file mode 100644
index 0000000..85b102d
--- /dev/null
+++ b/.buildkite/.env
@@ -0,0 +1,13 @@
+CI
+BUILDKITE
+BUILDKITE_BUILD_NUMBER
@andrewshadura
andrewshadura / freebogatov.svg
Last active Jun 15, 2017
#freeBogatov poster
View freebogatov.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View keybase.md

Keybase proof

I hereby claim:

  • I am andrewshadura on github.
  • I am andrewsh (https://keybase.io/andrewsh) on keybase.
  • I have a public key whose fingerprint is 7821 30B4 C994 4247 977B 82FD 6EA4 D231 1A2D 268D

To claim this, I am signing this object:

@andrewshadura
andrewshadura / process-translations.awk
Created Apr 9, 2016
Convert an unstructured translations YAML-like file into the structured "almost YAML"
View process-translations.awk
#!/usr/bin/gawk -f
function flush_out(x) {
# debug:
if (x != "") printf x ": "
if (out["key"] == "") {
return
}
@andrewshadura
andrewshadura / unicode_to_latex.py
Last active Apr 7, 2016 — forked from beniwohli/unicode_to_latex.py
Script to convert Cyrillic unicode characters to their respective LaTeX representation
View unicode_to_latex.py
#!/usr/bin/python3
# original XML at http://www.w3.org/Math/characters/unicode.xml
# XSL for conversion: https://gist.github.com/798546
# only cyrillic symbols
unicode_to_latex = {
0x0401: "\\CYRYO",
0x0402: "\\CYRDJE",
View python3.patch
From 47946d0a8a68a8e260c9a44e8b2ab448b86f946e Mon Sep 17 00:00:00 2001
From: Andrew Shadura <andrew@shadura.me>
Date: Thu, 27 Aug 2015 18:59:12 +0200
Subject: Add Python3 compatibility
diff --git a/reconfigure/parsers/iniparse/config.py b/reconfigure/parsers/iniparse/config.py
index d007f16..cc37ac4 100644
--- a/reconfigure/parsers/iniparse/config.py
+++ b/reconfigure/parsers/iniparse/config.py
@@ -143,7 +143,7 @@ class BasicConfig(ConfigNamespace):
View autoclose.tcl
#!/usr/bin/env tclsh
namespace eval ::autofile {
}
rename ::proc ::autofile::proc
rename ::open ::autofile::open
set ::autofile::files(::) {}
::autofile::proc proc {name args body} {
View Makefile
.DEFAULT_GOAL := all
.PHONY: ${MAKECMDGOALS}
$(filter-out all,${MAKECMDGOALS}) all: .forward-all
@# no op
.forward-all:
${MAKE} -C build ${MAKECMDGOALS}
${MAKEFILE_LIST}: ;
.SUFFIXES:
@andrewshadura
andrewshadura / bpi_leds.c
Created Feb 3, 2015
Configure BananaPi LEDs
View bpi_leds.c
/*
* Configure the blue led on BananaPi
*
* based on Roman Reichel's code, which itself is
*
* based on mii-tool from David A. Hinds <dhinds@pcmcia.sourceforge.org>
*
* http://sourceforge.net/projects/net-tools
*
* which itself is based on mii-diag by Donald Becker <becker@scyld.com>