Skip to content

Instantly share code, notes, and snippets.

View andrewshadura's full-sized avatar

Andrej Shadura andrewshadura

View GitHub Profile
xkb_keycodes "sun" {
// include "sun(type6_usb)"
<LSGT> = 94;
<LALT> = 133;
<RWIN> = 105;
<LWIN> = 64;
<RALT> = 134;
<RCTL> = 108;
<COMP> = 135;
@andrewshadura
andrewshadura / debbugs.rb
Created March 27, 2012 18:02
Jekyll plugin that allows posting links to Debian BTS.
# A Liquid tag for Jekyll sites that allows posting links to Debian BTS.
# by: Andrew Shadura
#
# Example usage: {% bts 123456 %} //adds a link to a bug #123456
#
# Or, you can just use debian/changelog format, like closes: #123456
# Launchpad bugs are also supported.
require 'cgi'
require './plugins/post_filters'
@andrewshadura
andrewshadura / eid-sk-launcher.py
Created June 3, 2020 15:56
eID signer launcher protocol
#!/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 07:25
Diff between matrix-synapse 0.99.2-5 and 0.99.5.1-1, patches applied
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
+BUILDKITE_BRANCH
@andrewshadura
andrewshadura / freebogatov.svg
Last active June 15, 2017 23:05
#freeBogatov poster
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@andrewshadura
andrewshadura / keybase.md
Created August 9, 2016 05:37
Keybase.io proof

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 April 9, 2016 13:08
Convert an unstructured translations YAML-like file into the structured "almost YAML"
#!/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 April 7, 2016 11:00 — forked from beniwohli/unicode_to_latex.py
Script to convert Cyrillic unicode characters to their respective LaTeX representation
#!/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",
@andrewshadura
andrewshadura / fix-narrow.xslt
Created January 22, 2014 11:06
XSLT transformations to fix Slovak addresses
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:exslt="http://exslt.org/common"
xmlns:math="http://exslt.org/math"
xmlns:date="http://exslt.org/dates-and-times"
xmlns:func="http://exslt.org/functions"
xmlns:set="http://exslt.org/sets"
xmlns:str="http://exslt.org/strings"
xmlns:dyn="http://exslt.org/dynamic"
xmlns:saxon="http://icl.com/saxon"
Subject: Detect available Tcl headers automatically.
From: Andrew Shadura <bugzilla@tut.by>
--- a/lib/critcl/critcl.tcl
+++ b/lib/critcl/critcl.tcl
@@ -3647,7 +3647,13 @@
}
proc ::critcl::MinTclVersion {file} {
- return [GetParam $file mintcl 8.4]