Skip to content

Instantly share code, notes, and snippets.

View gerthurb.user.js
// ==UserScript==
// @name gerthurb
// @namespace asottile
// @include https://**
// @include*
// @run-at document-start
// @version 1
// @grant none
// ==/UserScript==
chriskuehl /
Last active Feb 20, 2021
Fixing Ctrl-C in `less` when using systemd's `journalctl`

journalctl is the systemd tool for viewing and tailing system logs. It's cool but has one infuriating bug: when you hit ^C, it kills both journalctl and your pager. less has lots of useful behavior based on ^C (such as to stop tailing a log), so this makes journalctl practically useless in my view :)

It sets the K option on less which has this effect, but then it also sends SIGTERM itself when journalctl receives SIGINT, so unsetting that K is not effective, either.

Enter dumb-init

View gist:6a7ef34273629d68aaae
root@hal:/# mdadm --detail /dev/md127
Version : 1.2
Creation Time : Sun Sep 13 12:42:04 2015
Raid Level : raid10
Array Size : 544657408 (519.43 GiB 557.73 GB)
Used Dev Size : 272328704 (259.71 GiB 278.86 GB)
Raid Devices : 4
Total Devices : 4
Persistence : Superblock is persistent
View gist:4da02e5fe1a500eb0bc5
From: Chris Kuehl <>
Date: Fri, 23 Jan 2015 14:54:24 -0800
Subject: [PATCH] Don't raise IncompleteRead if response reads fails
This is a backport of the following commits onto the python-pip package.
This fixes Debian bug#744145 by allowing pip to continue to work with
View gist:a52986e115cb86037833
#!/bin/bash -e
if [ "$EUID" -ne 0 ]; then
echo "You are not root." >&2
exit 1
remote_ip="" #
View gist:d14dfa27906eb9c57d98
#!/bin/bash -e
apt-get update
apt-get -y install sudo apache2 w3c-markup-validator git default-jdk python \
adduser --system --group --shell /bin/false --disabled-login \
--home /opt/html5-validator validator
# set up html5 validator
sudo -u validator sh -e <<EOF