This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import sys | |
import libevdev | |
from libevdev import InputEvent | |
import time | |
def main(args): | |
dev = libevdev.Device() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" function to insert a printf statement at the current line when typing "mm" in normal (not insert) mode | |
" useful for sprinkling debugging statements across files quickly | |
function! InsertMarker() | |
let string = "printf(\"::::::::: %s:%d:%s() - \\n\", __FILE__, __LINE__, __func__);" | |
call append(line('.'), string) | |
endfunction | |
command Marker call InsertMarker() | |
map mm :Marker<enter> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
src_old=$HOME/libwacom-0.33 | |
src_new=$HOME/libwacom-0.34 | |
dst_old=$HOME/libwacom-inst-0.33 | |
dst_new=$HOME/libwacom-inst-0.34 | |
build() { | |
src=$1 | |
dst=$2 |
We can make this file beautiful and searchable if this error is corrected: It looks like row 2 should actually have 1 column, instead of 2 in line 1.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CSV file with all stylus ids and the tablet files they're associated with. | |
Generated with a throwaway python script, but manually sorted after that to show the grouping better. | |
Import into a spreadsheet, zoom out a bit and the groups are nicely visible. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Script that runs sudo make check and on success adds a git note, if | |
# possible. | |
# | |
# If $CWD isn't a git directory or there are local changes, no note is | |
# added. | |
# If tellme/espeak is available, it is used to notify the user about | |
# required passwords | |
# |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/gnuplot | |
# soften_delta function from libinput/src/filter.c. | |
# | |
# static double | |
# soften_delta(double last_delta, double delta) | |
# { | |
# if (delta < -1.0 || delta > 1.0) { | |
# if (delta > last_delta) | |
# return delta - 0.5; | |
# else if (delta < last_delta) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import os | |
import sys | |
if len(sys.argv) > 1: | |
sig = int(sys.argv[1]) | |
print "%d: %s" % (sig, os.strerror(sig)) | |
else: | |
for err, strerrno in os.errno.errorcode.items(): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" Vim syntas file for diffs in an email reply: | |
" Unmodified diff.vim, all the matches simply have a "> " prepended. | |
" | |
" Vim syntax file | |
" Language: Diff (context or unified) | |
" Maintainer: Bram Moolenaar <[email protected]> | |
" Last Change: 2005 Jun 20 | |
" Quit when a (custom) syntax file was already loaded |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#compdef xinput | |
# ZSH completion for `xinput` | |
# Copyright © 2013 Red Hat, Inc. | |
# Author: Peter Hutterer | |
# License: http://opensource.org/licenses/MIT | |
_xinput() | |
{ |