Skip to content

Instantly share code, notes, and snippets.

View gist:d14dfa27906eb9c57d98
#!/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
View gist:a52986e115cb86037833
#!/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"
View gist:4da02e5fe1a500eb0bc5
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
View gist:6a7ef34273629d68aaae
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
View gerthurb.user.js
// ==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 Feb 20, 2021
Fixing Ctrl-C in `less` when using systemd's `journalctl`
View fix-journalctl.md

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