Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Lenz Grimmer LenzGr

🏠
Working from home
View GitHub Profile
@LenzGr
LenzGr / bookmarklet.js
Last active Jun 8, 2020
Bookmarklet: Show all Ceph Dashboard PRs that were merged last week
View bookmarklet.js
javascript:(function(){var LastWeek=new Date();LastWeek.setDate(LastWeek.getDate()-7);window.location.href='https://github.com/ceph/ceph/pulls?q=is%3Apr+label%3Adashboard+is%3Amerged+merged%3A%3E%3D'+LastWeek.toISOString().substring(0,10);})();
@LenzGr
LenzGr / trackball-scroll.sh
Created Mar 21, 2019
Emulating a scroll wheel on the Logitech Trackman Marble via xinput
View trackball-scroll.sh
#!/bin/sh
# http://blog.karssen.org/2010/09/11/linux-the-logitech-trackman-marble-and-emulating-a-scroll-wheel/
# http://www.robmeerman.co.uk/unix/xinput#enabling_emulation_ubuntu_1004
xinput set-prop "Logitech USB Trackball" "Evdev Wheel Emulation" 1
xinput set-prop "Logitech USB Trackball" "Evdev Wheel Emulation Button" 8
xinput set-prop "Logitech USB Trackball" "Evdev Wheel Emulation Button" 8
xinput set-prop "Logitech USB Trackball" "Evdev Middle Button Emulation" 1
xinput set-prop "Logitech USB Trackball" "libinput Horizonal Scroll Enabled" 1
xinput set-prop "Logitech USB Trackball" "libinput Middle Emulation" 1
@LenzGr
LenzGr / create-container.sh
Created Feb 18, 2015
A shell script to quickly clone an existing LXC Container (e.g. a plain CentOS6 installation) and to update the local DNS to make it accessible.
View create-container.sh
#!/bin/bash
HOSTSFILE="/etc/hosts"
if test -z "$1"
then
echo "Please provide a container/host name."
exit 1
else
NAME="$1"
@LenzGr
LenzGr / rename.py
Created Jan 6, 2015
Recursively add a prefix to all files and directories
View rename.py
#!/usr/bin/python
import os, sys
def walktree(top, callback):
for path, dirs, files in os.walk(top, topdown=False):
for filename in files:
if not filename.startswith("."):
fullPath = os.path.join(path, filename)
callback(fullPath)
View keybase.md

Keybase proof

I hereby claim:

  • I am lenzgr on github.
  • I am lenzgr (https://keybase.io/lenzgr) on keybase.
  • I have a public key whose fingerprint is 709C CE90 7684 0DAE 3965 DA37 4950 E12A B272 91F2

To claim this, I am signing this object:

You can’t perform that action at this time.