Skip to content

Instantly share code, notes, and snippets.

View morxa's full-sized avatar

Till Hofmann morxa

View GitHub Profile
@morxa
morxa / run_and_notify.bash
Last active April 14, 2021 12:00
Run a command repeatedly and send a notification when it succeeds.
#! /bin/bash
#
# run_and_notify.bash
# Copyright (C) 2021 Till Hofmann <hofmann@kbsg.rwth-aachen.de>
#
# Distributed under terms of the MIT license.
#
set -e
set -u
@morxa
morxa / README.md
Last active June 6, 2024 14:23
Fedora Zoom auto update

To install:

  1. Copy both services to /etc/systemd/system/
  2. Enable with sudo systemctl enable --now zoom-update.timer
@morxa
morxa / droidcam-kmod.spec
Created March 23, 2020 10:11
DroidCam on Fedora
%define buildforkernels akmod
Name: droidcam-kmod
Version: 081219
Release: 1%{?dist}
Summary: droidcam
License: unknown
URL: https://dev47apps.com
Source0: https://www.dev47apps.com/files/linux/droidcam_%{version}_64bit.tar.bz2
@morxa
morxa / vimrc
Created November 21, 2019 13:05
My vimrc
set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')
" let Vundle manage Vundle, required
@morxa
morxa / gist:3db2be3262633e72b0b012b6c2290742
Created November 30, 2018 21:28
Barman Solution example MongoDB entry
MongoDB shell version v3.4.11
connecting to: mongodb://enterprise:27017/macro_planning
MongoDB server version: 3.4.11
{
"_id" : ObjectId("5bef198a31eaa60001a439fc"),
"planner" : "fast-downward",
"domain" : ObjectId("5bef0c18caa44127395c7e15"),
"problem" : ObjectId("5bef0c18caa44127395c7e16"),
"raw" : "(GRASP LEFT SHAKER1)\n(GRASP RIGHT SHOT13)\n(LEAVE LEFT SHAKER1)\n(FILL-SHOT SHOT13 INGREDIENT2 RIGHT LEFT DISPENSER2)\n(GRASP LEFT SHAKER1)\n(POUR-SHOT-TO-CLEAN-SHAKER SHOT13 INGREDIENT2 SHAKER1 RIGHT L0 L1)\n(LEAVE RIGHT SHOT13)\n(GRASP RIGHT SHOT14)\n(LEAVE LEFT SHAKER1)\n(FILL-SHOT SHOT14 INGREDIENT3 RIGHT LEFT DISPENSER3)\n(GRASP LEFT SHAKER1)\n(LEAVE RIGHT SHOT14)\n(GRASP RIGHT SHOT13)\n(LEAVE LEFT SHAKER1)\n(CLEAN-SHOT SHOT13 INGREDIENT2 RIGHT LEFT)\n(FILL-SHOT SHOT13 INGREDIENT2 RIGHT LEFT DISPENSER2)\n(GRASP LEFT SHAKER1)\n(LEAVE RIGHT SHOT13)\n(GRASP RIGHT SHOT9)\n(LEAVE LEFT SHAKER1)\n(FILL-SHOT SHOT9 INGREDIENT1 RIGHT LEFT DISPENSER1)\n(POUR-SHOT-TO-USED-SHAKER SHOT9 INGREDIENT1 SHAKER1 RIGHT L1
@morxa
morxa / barman.pddl
Created November 30, 2018 21:24
PDDL Barman Domain
(define (domain barman)
(:requirements :strips :typing)
(:types hand level beverage dispenser container - object
ingredient cocktail - beverage
shot shaker - container)
(:predicates (ontable ?c - container)
(holding ?h - hand ?c - container)
(handempty ?h - hand)
(empty ?c - container)
(contains ?c - container ?b - beverage)
@morxa
morxa / git-reauthor.sh
Last active November 22, 2021 11:58
Bash script to change author information
#!/bin/bash
if [ $# -lt 3 ] ; then
echo "Wrong number of arguments. Got $#, expected 3 or 4."
echo "usage: $0 [-f] <old_email> <new_email> <first_commit>"
exit 1
fi
if [ "$1" = "-f" ] ; then
FORCE=-f
@morxa
morxa / bearrc
Last active July 20, 2017 15:15
bash/zsh function to automatically find compile_commands.json for the Build Ear (BEAR) tool
# Add this to your bashrc or zshrc
# or put it into a seperate .bearrc and load that file from your bashrc or zshrc
# You will need to create the initial BEAR_FILE manually, e.g., with "bear make"
# in the right directory.
# After that, simply call "m" to build and add the compiler commands to the BEAR_FILE.
BEAR_FILE=compile_commands.json
function m () {
TOPDIR=$PWD
while [ ! -f $TOPDIR/$BEAR_FILE ] ; do
@morxa
morxa / rcll_domain_production_nondurative.pddl
Created March 1, 2017 09:11
RCLL non-durative domain for production
;****************************************************************************
; rcll_domain_production.pddl: RoboCup Logistics League Production Model
;
; Created: Fri Feb 24 23:20:38 2017
; Copyright 2017 Tim Niemueller [www.niemueller.de] Till Hofmann
;****************************************************************************
; 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
@morxa
morxa / chinagadgets.bash
Created December 15, 2016 15:45
minkorrekt china gadgets
#! /bin/bash
#
# chinagadgets.bash
# Created: Thu 15 Dec 2016 15:53:11 CET
# Copyright 2016 Till Hofmann <till.hofmann@posteo.de>
#
# This work is free. You can redistribute it and/or modify it under the
# terms of the Do What The Fuck You Want To Public License, Version 2,
# as published by Sam Hocevar. See http://www.wtfpl.net/ for more details.