Skip to content

Instantly share code, notes, and snippets.

@hho
hho / xvfb
Last active May 25, 2016 09:15 — forked from dloman/xvfb
#!/bin/sh -e
### BEGIN INIT INFO
# Provides: Xvfb
# Required-Start: $local_fs $remote_fs
# Required-Stop:
# X-Start-Before:
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Loads X Virtual Frame Buffer

Keybase proof

I hereby claim:

  • I am hho on github.
  • I am hho (https://keybase.io/hho) on keybase.
  • I have a public key whose fingerprint is A29D 85B4 6658 5B11 C003 7010 9D94 F3F5 8358 25C0

To claim this, I am signing this object:

@hho
hho / sensehat.py
Created March 6, 2017 22:48
RasPi Sense Hat Experiments
#!/usr/bin/python
# -*- coding: latin1 -*-
from sense_hat import SenseHat, ACTION_PRESSED, ACTION_HELD, ACTION_RELEASED
from time import sleep
from signal import pause
sense = SenseHat()
def readout():
@hho
hho / TomcatNoCacheCustomizer.java
Created March 7, 2017 10:54
Turn off Tomcat's static resource cache (written for Spring Boot 1.3.5)
import org.apache.catalina.Context;
import org.apache.catalina.webresources.StandardRoot;
import org.springframework.boot.context.embedded.ConfigurableEmbeddedServletContainer;
import org.springframework.boot.context.embedded.EmbeddedServletContainerCustomizer;
import org.springframework.boot.context.embedded.tomcat.TomcatContextCustomizer;
import org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainerFactory;
import org.springframework.stereotype.Component;
@Component
public class TomcatNoCacheCustomizer implements EmbeddedServletContainerCustomizer {
@hho
hho / 99-synaptics-norightclick.conf
Created August 11, 2017 09:06
Disable right click on Synaptics clickpads in X.Org
Section "InputClass"
Identifier "Disable Right Click"
MatchDriver "synaptics"
Option "SoftButtonAreas" "0 0 0 0 0 0 0 0"
EndSection
04d5d66380615332f112cb61f67803a5c8d12a9cac0af7e906e7b2c0f6afb5607f6bd4722c626b5a2006d21125f1ec5f8c2dbb351dbab1fffe6a02df8a891f83dc
@hho
hho / wsl.conf
Created August 3, 2018 15:35
Make WSL use sensible permissions for host files (/etc/wsl.conf)
[automount]
options = "metadata,uid=1000,gid=1000,umask=22,fmask=111"