Skip to content

Instantly share code, notes, and snippets.


Vít Šesták v6ak

View GitHub Profile
v6ak /
Last active Mar 12, 2019
Creates grid from SVG. Note that full image can be recovered from any piece, because any piece contain the full image just with modified boundaries.
#!/usr/bin/env python3
import argparse
import xml.etree.ElementTree
import re
import os
from collections import namedtuple
from decimal import Decimal
from fractions import Fraction
v6ak / ms-force-en.user.js
Last active Nov 14, 2018
Forces desired language on MS website. You need GreaseMonkey / TamperMonkey. Then click the “RAW” button to install it.
View ms-force-en.user.js
// ==UserScript==
// @name Microsoft: force desired language
// @version 1
// @grant none
// @include*/*
// ==/UserScript==
const DESIRED_LANGUAGE='en-us';
var locParts = /^(https:\/\/docs\\/([a-z]+-[a-z]+)\/(.*)$/.exec(location.href);
v6ak / webex-teams-notifications-icon.user.js
Last active Nov 5, 2018
Webex Teams notification icon adjustment. Needs GreaseMonkey (or equivalent). After installing GM, just click the “Raw” button.
View webex-teams-notifications-icon.user.js
// ==UserScript==
// @name WebEx Teams notification icon
// @version 1
// @namespace v6ak
// @description This script will show a notification icon on WebEx Teams when there is a new message. It distinguishes between direct messages (or mentions or other higher-priority messages) and group messages.
// @grant none
// @include*
// ==/UserScript==

Keybase proof

I hereby claim:

  • I am v6ak on github.
  • I am v6ak ( on keybase.
  • I have a public key ASDURjCbEyGvCwJmhptv8h0d4O8Xux6si85udZiFyvM3Ego

To claim this, I am signing this object:

# safety settings
set -u
set -e
set -o pipefail
VERSION="$(sed -n 's#^.*bin/robozonky-app-\([0-9a-z.-]\+\).jar.*$#\1# p' Dist/ | head -n1)"
echo Trying to build native image for RoboZonky version $VERSION
v6ak / gist:b6e1c18b85ad2dc19c03cac1669b65d0
Created May 19, 2018
Removes titlebar from maximized windows
View gist:b6e1c18b85ad2dc19c03cac1669b65d0
# Inspired by
# Replaced polling by events
xdotool getwindowfocus behave %@ blur get_num_desktops | while read _; do
for id in $(xdotool search --class '.*'); do
View pom.xml
<project xmlns=""
View gist:b67ce6f501c74f7e617b4a12b38820cb
$ for i in /var/log/Xorg.0.log /var/log/Xorg.0.log.old; do cat $i | sed 's/\[[ 0-9.]\+]/[TIME]/' | sort -u > /tmp/$(basename $i); done; diff /tmp/Xorg.0.log.old /tmp/Xorg.0.log
< [TIME] Current Operating System: Linux dom0 4.9.56-21.pvops.qubes.x86_64 #1 SMP Tue Oct 17 23:58:50 UTC 2017 x86_64
> [TIME] Current Operating System: Linux dom0 4.14.18-1.pvops.qubes.x86_64 #1 SMP Thu Feb 8 19:37:36 UTC 2018 x86_64
< [TIME] (**) evdev: Dell WMI hotkeys: Device: "/dev/input/event9"
> [TIME] (**) evdev: Dell WMI hotkeys: Device: "/dev/input/event10"
v6ak /
Created Mar 25, 2018
Rough edge of Java 10 type inference
package test;
import java.util.List;
import java.util.ArrayList;
public class Main {
private static void trick(List list){
// WARNING: black magic with non-generic code on a generic List…
v6ak /
Created Mar 14, 2018
Simple DNS server intended for responding ACME challenges. Assumes ownership of /etc/authbind/byport/53.
#/usr/bin/env authbind python3
from dnslib.label import DNSLabel
from dnslib.server import DNSServer, DNSLogger, DNSRecord, RR
from dnslib.dns import TXT
import re
import sys
import os
from os import listdir