Skip to content

Instantly share code, notes, and snippets.

View egrath's full-sized avatar
😁
I may be slow to respond.

Egon A. Rath egrath

😁
I may be slow to respond.
  • Austria
View GitHub Profile
@egrath
egrath / appify.sh
Created February 7, 2024 06:35
create appbundle for scripts with icon
#!/bin/bash
# script to generate a application bundle with icon for a shell script
if [ $# -ne 2 ]; then
echo usage: $(basename $0) script icon
echo
exit 0
fi
SCRIPTNAME=${1}
@egrath
egrath / lbForth.c
Created October 10, 2023 18:12 — forked from lbruder/lbForth.c
A minimal Forth compiler in ANSI C
/*******************************************************************************
*
* A minimal Forth compiler in C
* By Leif Bruder <leifbruder@gmail.com> http://defineanswer42.wordpress.com
* Release 2014-04-04
*
* Based on Richard W.M. Jones' excellent Jonesforth sources/tutorial
*
* PUBLIC DOMAIN
*
@egrath
egrath / debian11.sh
Last active November 28, 2022 14:22
Script for running Debian in Podman
#!/bin/bash
#
# Debian 11
#
# USB Device ACR122 Notes:
#
# /etc/udev/rules.d/99-acr.rules:
# SUBSYSTEM=="usb",ATTRS{idVendor}=="072f",ATTRS{idProduct}=="2200",MODE="0666"
#
# /etc/modprobe.d/blacklist.conf:
#!/bin/bash
#
# set mouse speed in Xorg
#
# used references:
# https://www.x.org/wiki/Development/Documentation/PointerAcceleration/
# https://askubuntu.com/questions/172972/configure-mouse-speed-not-pointer-acceleration
DEVICE="Logitech B330/M330/M331"
SPEED=0.5
@egrath
egrath / set-cursor.sh
Last active March 27, 2024 07:03
Set the Cursor Theme and Size for GTK, GNOME and Xorg
#!/bin/bash
if [ $# -eq 0 ]; then
echo usage: $(basename $0) icon-name
exit 0
fi
THEME=${1}
SIZE=36
@egrath
egrath / scale-gnome
Created December 28, 2020 17:54 — forked from maxmil/scale-gnome
#!/bin/bash
#
# scale-gnome: Utiltity for HDPI screens. Gnome settings only support integer scale values. This uses xrandr to scale to fractional values.
#
usage() {
cat << EOF
Usage: scale-gnome [-o|--output <output>] [-d|--dry-run] <scale>
-o, --output: The xrandr output of the display to update. If not provided the output for the first connected screen found is used.
@egrath
egrath / ubuntu.sh
Last active September 19, 2021 15:53
Quick'n'Dirty Podman Container Management for Endless OS to run a Ubuntu Docker Image
#!/bin/bash
#
# For USB Devices to work in unprivileged containers, you need to set up a UDEV rule
# to set the permission correctly.
#
# SUBSYSTEM=="usb",ATTRS{idVendor}=="072f",ATTRS{idProduct}=="2200",MODE="0666"
#
# Special note for ACR122 NFC device: Blacklist the following modules in /etc/modprobe.d/blacklist.conf:
# blacklist nfc
# blacklist pn533