Skip to content

Instantly share code, notes, and snippets.

@hadess
hadess / systemd-services.spec
Created January 20, 2012 16:42
RPM spec file for systemd-services
Name: systemd-services
Url: http://www.freedesktop.org/wiki/Software/systemd
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Version: 38
Release: 1%{?dist}
License: GPLv2+
Group: System Environment/Base
Summary: A System and Service Manager
BuildRequires: libudev-devel >= 160
BuildRequires: libcap-devel
@hadess
hadess / 0001-don-t-build-systemd-journald-don-t-need-it.patch
Created January 20, 2012 16:46
Don't build systemd-journald with systemd 38
From 542f9eb30e664a93cca58249e9424cfbc0cc2f5d Mon Sep 17 00:00:00 2001
From: Bastien Nocera <[email protected]>
Date: Fri, 20 Jan 2012 16:10:32 +0000
Subject: [PATCH] don't build systemd-journald, don't need it
---
Makefile.am | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/Makefile.am b/Makefile.am
@hadess
hadess / list-wacom.txt
Created January 27, 2012 12:50
list-wacom output in GNOME 3.3
Device 'Wacom Intuos 4 M 6x9' (type: Stylus)
Reversible: yes
Screen Tablet: no
Generic settings: schema: org.gnome.settings-daemon.peripherals.wacom (path: /org/gnome/settings-daemon/peripherals/wacom/usb:0x56a:0xb9/)
Stylus: 'Intuos4 General Pen' (Type: General, ID: 0x802)
Settings: schema: org.gnome.settings-daemon.peripherals.wacom.stylus (path: /org/gnome/settings-daemon/peripherals/wacom/usb:0x56a:0xb9/0x802/)
Icon name: wacom-stylus
Has Eraser: yes
Buttons: 2 buttons
Stylus: 'Intuos4 Marker Pen' (Type: Marker, ID: 0x804)
@hadess
hadess / git-web-show.lua
Last active September 5, 2019 14:06
Launch gitweb/cgit view of repo in browser
Moved to https://gitlab.freedesktop.org/hadess/git-web-show
@hadess
hadess / 0001-Generate-URLs-instead-of-rtmpdump-command-lines.patch
Created July 20, 2012 12:19
get_iplayer debugging tool for quvi's iPlayer support
From 2518ed3cade2e18bb99adf613fa5ddf68f15e56c Mon Sep 17 00:00:00 2001
From: Bastien Nocera <[email protected]>
Date: Fri, 20 Jul 2012 13:16:56 +0100
Subject: [PATCH] Generate URLs instead of rtmpdump command-lines
To make it easy to compare with the quvi script, using
http://code.google.com/p/google-diff-match-patch/
---
get_iplayer | 12 +++---------
1 file changed, 3 insertions(+), 9 deletions(-)
@hadess
hadess / gist:6149812
Last active December 20, 2015 14:49
2 things left to fix up before sending upstream: * we need a key for "maximise the window" in input.h * somebody with actual hardware need to change the usb identifier to match :) See also: * https://bugzilla.gnome.org/show_bug.cgi?id=705434 * https://bugzilla.gnome.org/show_bug.cgi?id=705432 for GNOME support
diff --git a/hwdb/60-keyboard.hwdb b/hwdb/60-keyboard.hwdb
index 0ee65d7..70f77bb 100644
--- a/hwdb/60-keyboard.hwdb
+++ b/hwdb/60-keyboard.hwdb
@@ -341,6 +341,24 @@ keyboard:usb:v0458p0708d*dc*dsc*dp*ic*isc*ip*in01*
KEYBOARD_KEY_0900fc=screenlock
###########################################################
+# Google
+###########################################################
@hadess
hadess / disable-right-click-area.sh
Created October 1, 2013 14:30
This script disables the right-click area on Thinkpad touchpads, so as to require either the physical right-click button above it to be clicked, or to use a two-finger click. This matches the behaviour of touchpads on Macs (which I'm more used to).
#!/bin/sh
#
# This script disables the right-click area on Thinkpad touchpads, so as
# to require either the physical right-click button above it to be clicked,
# or to use a two-finger click. This matches the behaviour of touchpads
# on Macs (which I'm more used to).
#
# Set the script to be used with:
# gsettings set org.gnome.settings-daemon.peripherals.input-devices hotplug-command /path/to/script/input-devices.sh
#
@hadess
hadess / tmp.c
Created October 5, 2013 23:19
Hack to control the keyboard backlight level on a Thinkpad Lenovo X1 Carbon Touch
/* gcc -o tmp `pkg-config --libs --cflags glib-2.0` tmp.c
*
* # modprobe ec_sys
*
* # watch -n 0.1 hexdump -C /sys/kernel/debug/ec/ec0/io
*
* 00000000 a7 05 a0 e2 00 86 05 00 00 00 47 00 00 03 00 10 |..........G.....|
* 00000000 a7 05 a0 e2 00 86 05 00 00 00 47 00 00 43 00 10 |..........G..C..|
* 00000000 a7 05 a0 e2 00 86 05 00 00 00 47 00 00 83 00 10 |..........G.....|
@hadess
hadess / 0001-Add-support-for-Intel-Rapid-Start.patch
Last active December 25, 2015 11:19
Intel Rapid Start support for systemd
From 3c48ec58d20a33d9514b76a36b7c53226ee69815 Mon Sep 17 00:00:00 2001
From: Bastien Nocera <[email protected]>
Date: Sun, 13 Oct 2013 21:32:01 +0200
Subject: [PATCH] Add support for Intel Rapid Start
Instead of using the kernel's hybrid sleep, use the firmware for
laptops that support Intel Rapid Start, as explained in:
http://mjg59.dreamwidth.org/26022.html
and implemented in:
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/log/drivers/platform/x86/intel-rst.c
@hadess
hadess / setup-fedora-chroot.sh
Created August 4, 2014 11:57
Fedora chroot for Android device
#!/system/bin/sh
# Don't add a trailing slash, the script is fragile
ROOT=/mnt/sdcard
error()
{
echo '*** ' $1 ' ***'
exit 1;
}