Skip to content

Instantly share code, notes, and snippets.


Miro Hrončok hroncok

View GitHub Profile
import functools
import sys
import dnf
import hawkey
DNF_CACHEDIR = "_dnf_cache_dir"
ARCH = "x86_64"
KOJI = ""
View macros.licenses
%spdx() %{lua:
local licenses = require 'fedora.licenses'
local expr = rpm.expand('%*')
local function convert(spdx)
if spdx == '' then
return ''
local fedoras = licenses.spdx2fedora[spdx]
if fedoras == nil then
rpm.expand('%{warn:Unknown SPDX license "' .. spdx .. '", using literally}')
View rpmlua
# Copyright (c) 2020-2021 Fedora Project
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
import bugzilla
import sys
import logging
assert sys.version_info[0] > 2, 'Needs Python 3'
PKG = sys.argv[1]
hroncok /
Last active July 28, 2020 07:48
Watch my FTBFSes
#!/usr/bin/env python3
# usage: $ watch -n 300 $(whoami)
import re
import sys
from urllib.request import urlopen
URL = ''
USER = sys.argv[1]
(repoquery --repo=rawhide -f '/usr/bin/*3.7*' --qf "%{NAME}" 2>/dev/null;
repoquery --repo=rawhide -f '/usr/bin/*3' --qf "%{NAME}" 2>/dev/null;
repoquery --repo=rawhide -f '/usr/bin/python3-*' --qf "%{NAME}" 2>/dev/null) | sort | uniq > py3_cmd_pkgnames
(for pkg in $(cat py3_cmd_pkgnames); do
repoquery --repo=rawhide -l $pkg 2>/dev/null
done) | grep ^/usr/bin | grep 3 | sort | uniq > py3_cmds
for command in $(cat py3_cmds); do
normalized=$(echo $command | sed 's|/usr/bin/python3-|/usr/bin/|' | sed -E 's|-?3(\.7)?||')
hroncok / shebangs.ipynb
Created October 15, 2018 11:24
Shebang mangling stats
View shebangs.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View BedLeveling.gcode
; generated by Slic3r 1.2.9 on 2017-03-12 at 16:07:38
; external perimeters extrusion width = 0.40mm
; perimeters extrusion width = 0.48mm
; infill extrusion width = 0.48mm
; solid infill extrusion width = 0.48mm
; top infill extrusion width = 0.48mm
hroncok / pyconcz2018-twitter.asciidoc
Created June 5, 2018 20:36
Twitter statistics for #PyConCZ and #PyConCZ2018 in 2018
View pyconcz2018-twitter.asciidoc

Twitter statistics for #PyConCZ and #PyConCZ2018 in 2018

Includes tweets created between 2018-05-01 and 2018-06-06

  • Number of tweets (excluding RTs): 198

  • Number of likes: 1747

  • Number of retweets: 223

  • Number of tweeting users: 77

hroncok / micro-bindings.json
Last active July 1, 2020 17:21
My micro key bindings to simulate what I'm used to in bash, ipython and geany
View micro-bindings.json
"CtrlLeft": "WordLeft",
"CtrlRight": "WordRight",
"CtrlShiftLeft": "SelectWordLeft",
"CtrlShiftRight": "SelectWordRight",
"CtrlUp": "MoveLinesUp",
"CtrlDown": "MoveLinesDown",
"CtrlShiftHome": "SelectToStart",
"CtrlShiftEnd": "SelectToEnd",
"CtrlW": "DeleteWordLeft",