Skip to content

Instantly share code, notes, and snippets.

View hroncok's full-sized avatar

Miro Hrončok hroncok

View GitHub Profile
@hroncok
hroncok / fedora-livecd-3dprint.ks
Created April 19, 2014 20:05
Fedora 3D printing kickstart
# fedora-livecd-3dprint.ks
#
# Description:
# - Fedora Live Spin with the light-weight Xfce Desktop Environment and 3D printing stuff
#
# Maintainer(s):
# - Miro Hrončok <miro@hroncok.cz>
%include fedora-live-base.ks
@hroncok
hroncok / dgroc
Last active August 29, 2015 14:02
dgroc config for Python 3
[main]
username = Miro Hrončok
email = mhroncok@redhat.com
copr_url = https://copr.fedoraproject.org/
upload_command = scp %s churchyard@fedorapeople.org:public_html/SRPMS/
upload_url = http://churchyard.fedorapeople.org/SRPMS/%s
[openscad-devel]
git_url = https://github.com/openscad/openscad.git
git_folder = ~/upstream/openscad-git/
@hroncok
hroncok / pytest.log
Created April 2, 2015 12:18
DevAssistant test on Mac OS X
============================= test session starts ==============================
platform darwin -- Python 2.7.9 -- py-1.4.26 -- pytest-2.7.0
rootdir: /Users/churchyard/Documents/devassistant, inifile:
collected 911 items
test/test_actions.py ...................
test/test_argument.py ............
test/test_assistant_base.py .......
test/test_cache.py ....FF..
test/test_command_helpers.py ...............................
@hroncok
hroncok / subrnm
Last active December 10, 2015 18:58
Renames subtitles to video file name, use as a Custom action for Thunar
#!/bin/bash
# BSDL Miro Hrončok <miro@hroncok.cz>
# subrnm .avi .srt (or vice versa)
if [ $# -ne 2 ]; then
#echo "USAGE: subrnm .avi .srt (or vice versa)"
zenity --error --text "Nebyly vybrány dva soubory"
exit 1
fi
@hroncok
hroncok / gitrmdeleted
Created January 7, 2013 21:42
Used for deleting (git rm) already deleted (rm) files. Added as git alias: rmdeleted = !gitrmdelted
#!/bin/bash
for FILE in `git status | grep deleted | awk '{print $3}'`; do
echo $FILE
git rm $FILE
done
exit $?
@hroncok
hroncok / fedpk-add-patch-check.sh
Last active December 31, 2015 08:19
Link the given pre-commit hook to current pwd git repository or to those in arguments
#!/bin/bash
HOOK=/usr/lib/fedpkg-patch-check.py
function addhook {
hookdir="${1%%/}/.git/hooks"
test -d "$hookdir" || (echo "$hookdir doesn't exist or is not a directory" 1>&2 && return 1)
test -h "$hookdir/pre-commit" && echo "$hookdir/pre-commit is already a link, skipping" 1>&2 && return 1
test -f "$hookdir/pre-commit" && echo "$hookdir/pre-commit is a file, you should call $HOOK manually from that file depending on what language is your hook written in" 1>&2 && return 1
ln -s $HOOK "$hookdir/pre-commit" || (echo "Could not link the hook into $hookdir" 1>&2 && return 1)
# TABLE je ve skutečnosti instanční proměnná, ale berte to, jakože je globální
def solve():
TABLE = {} # slovník/hash kde klíče budou dvojice
for cost in MAX_COST..0:
weight, combo = _solve(NUMITEMS, cost)
if weight <= CAPACITY:
maxcombo = combo
maxcost = cost
@hroncok
hroncok / mock-mirrorlist2baseurl
Last active June 30, 2017 20:22
This Bash script helps you to replace mirrorlist with baseurl in your mock config files. It selects the first item in the mirrorlist (should be good enough). To update the mirrors, revert config from backup (.bak) and run again.
#!/usr/bin/env bash
# Copyright (c) 2013, Miro Hrončok <miro@hroncok.cz>
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
# REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
# AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
[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;
@hroncok
hroncok / pyconcz2018-twitter.asciidoc
Created June 5, 2018 20:36
Twitter statistics for #PyConCZ and #PyConCZ2018 in 2018

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