Skip to content

Instantly share code, notes, and snippets.

@chriskuehl
chriskuehl / gerthurb.user.js
Last active February 10, 2017 20:45 — forked from asottile/gerthurb.user.js
@chriskuehl hates the dark header
// ==UserScript==
// @name gerthurb
// @namespace asottile
// @include https://*.github.com/*
// @include https://github.com/*
// @run-at document-start
// @version 1
// @grant none
// ==/UserScript==
document.querySelector('.header-dark').classList.remove('header-dark');
@chriskuehl
chriskuehl / fix-journalctl.md
Last active March 4, 2024 20:39
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

root@hal:/# mdadm --detail /dev/md127
/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
From: Chris Kuehl <ckuehl@ocf.berkeley.edu>
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.
https://github.com/pypa/pip/commit/53eab2357e4425436b51e109bfaedcb9f3772072
https://github.com/pypa/pip/commit/e77c0c573c059bb4a86b2c5c06835f57e4af6c47
This fixes Debian bug#744145 by allowing pip to continue to work with
#!/bin/bash -e
if [ "$EUID" -ne 0 ]; then
echo "You are not root." >&2
exit 1
fi
remote_ip="169.229.10.47" # vpn.ocf.berkley.edu
port="1194"
proto="udp"
#!/bin/bash -e
apt-get update
apt-get -y install sudo apache2 w3c-markup-validator git default-jdk python \
daemontools-run
adduser --system --group --shell /bin/false --disabled-login \
--home /opt/html5-validator validator
# set up html5 validator
sudo -u validator sh -e <<EOF