Skip to content

Instantly share code, notes, and snippets.

Avatar

Miro Hrončok hroncok

View GitHub Profile
View rpmlua
#!/usr/bin/python3
# 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
View close-rawhide-bzs.py
#!/usr/bin/python3
import bugzilla
import sys
import logging
assert sys.version_info[0] > 2, 'Needs Python 3'
PKG = sys.argv[1]
@hroncok
hroncok / myfailures.py
Last active Jul 28, 2020
Watch my FTBFSes
View myfailures.py
#!/usr/bin/env python3
# usage: $ watch -n 300 myfailures.py $(whoami)
import re
import sys
from urllib.request import urlopen
URL = 'https://kojipkgs.fedoraproject.org/mass-rebuild/f33-failures.html'
USER = sys.argv[1]
View versioned_commands.sh
(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
hroncok / shebangs.ipynb
Created Oct 15, 2018
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
M107
G90
@hroncok
hroncok / pyconcz2018-twitter.asciidoc
Created Jun 5, 2018
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
hroncok / micro-bindings.json
Last active Jul 1, 2020
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",
View ccviewer.desktop
[Desktop Entry]
Version=1.1
Name=CloudCompare Viewer
GenericName=3D point cloud viewer
Comment=Application for 3D point cloud (and triangular mesh) viewing
Type=Application
Exec=ccViewer %U
Icon=ccviewer
Terminal=false
Categories=Graphics;
View g2.c
/* 3SAT instance generator G2(n,m) */
/* created by M.Motoki */
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
void gen_unique_instance(int, int); /* generate 3CNF with at least 1 solution t*/
void sat_alloc(int n, int m, int k);
void write_sat(FILE *fp, int n, int m, int k);