Instantly share code, notes, and snippets.

View keybase.md

Keybase proof

I hereby claim:

  • I am gavinhungry on github.
  • I am gavinhungry (https://keybase.io/gavinhungry) on keybase.
  • I have a public key whose fingerprint is 1450 B358 FCC7 992D 8C61 60F3 52CC 07C8 C7F4 A2F0

To claim this, I am signing this object:

View owa-direct.user.js
// ==UserScript==
// @name OWA Direct Links
// @version 0.1.0
// @description Rewrite OWA Links to direct URL
// @author Gavin Lloyd <gavinhungry@gmail.com>
// @match https://webmail.example.tld/*
// @require https://cdn.jsdelivr.net/jquery/2/jquery.min.js
// @grant none
// ==/UserScript==
View hand-scroll.user.js
// ==UserScript==
// @name Hand Scroll
// @namespace https://gavinhungry.io
// @version 1.5.0
// @description Drag scrolling with mouse movement
// @author Gavin Lloyd <gavinhungry@gmail.com>
// @include *
// @grant none
// ==/UserScript==
View org.gnome.ScreenSaver.py
#!/usr/bin/env python2
import dbus
import dbus.mainloop.glib
import dbus.service
import gobject
import psutil
class ScreenSaver(dbus.service.Object):
def __init__(self):
View thinkpad-input.sh
synclient VertScrollDelta=-125 HorizScrollDelta=-125
synclient PalmDetect=1 PalmMinZ=100 PalmMinWidth=7
synclient RightButtonAreaTop=0 RightButtonAreaLeft=0
synclient CoastingFriction=75
TOUCHPAD='SynPS/2 Synaptics TouchPad'
xinput set-prop "$TOUCHPAD" 'Device Accel Profile' 2
xinput set-prop "$TOUCHPAD" 'Device Accel Constant Deceleration' 40
xinput set-prop "$TOUCHPAD" 'Device Accel Velocity Scaling' 10000
View devtools.html
<script type='application/javascript' src='devtools.js'></script>
View service-worker-killer.user.js
// ==UserScript==
// @name Service Worker Killer
// @version 0.3.0
// @description Unregister ServiceWorker(s) before page unload
// @author Gavin Lloyd <gavinhungry@gmail.com>
// @match *
// @grant none
// ==/UserScript==
(() => {
View js-date-formats.js
// because I can never remember what all of the Date output formats look like
Object.getOwnPropertyNames(Date.prototype).filter(m => m.startsWith('to')).forEach(m => {
console.log(m.padEnd(20), new Date()[m]());
});
View PKGBUILD
# $Id$
# Maintainer: Sven-Hendrik Haase <sh@lutzhaase.com>
# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Contributor: Thomas Baechler <thomas@archlinux.org>
pkgbase=nvidia
pkgname=(nvidia nvidia-dkms)
pkgver=387.34
_extramodules=extramodules-4.15-ARCH
pkgrel=23
View 50-battery.rules
SUBSYSTEM=="power_supply", ACTION=="change", RUN+="/etc/scripts/battery.sh"