Skip to content

Instantly share code, notes, and snippets.

View LenzGr's full-sized avatar
🏠
Working from home

Lenz Grimmer LenzGr

🏠
Working from home
View GitHub Profile
@LenzGr
LenzGr / bookmarklet.js
Created September 13, 2021 08:25
Bookmarklet: show last week's PR activity
javascript:(function(){var LastWeek=new Date();LastWeek.setDate(LastWeek.getDate()-7);var Today=new Date();window.location.href='https://github.com/pulls?q=involves%3Alenzgr+updated%3A'+LastWeek.toISOString().substring(0,10)+'..'+Today.toISOString().substring(0,10);})();
@LenzGr
LenzGr / bookmarklet.js
Last active June 8, 2020 13:03
Bookmarklet: Show all Ceph Dashboard PRs that were merged last week
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 March 21, 2019 10:13
Emulating a scroll wheel on the Logitech Trackman Marble via xinput
#!/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 February 18, 2015 11:02
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.
#!/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 January 6, 2015 12:26
Recursively add a prefix to all files and directories
#!/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)

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: