Skip to content

Instantly share code, notes, and snippets.

View dlitz's full-sized avatar

Darsey Litzenberger dlitz

View GitHub Profile
@dlitz
dlitz / config
Created June 18, 2023 11:43
My /etc/ssh/sshd_config.d/local.conf (bas
# Example ~/.ssh/config
# Used with something like:
# sshfs -o rw,reconnect,auto_unmount,noatime,idmap=user,allow_root _sshfs.syra.dlitz.net:~/ ~/mnt/syra
Host _sshfs.syra.dlitz.net
HostKeyAlias syra.dlitz.net
HostName syra.dlitz.net
ProxyCommand none
ControlPath none
ServerAliveCountMax 2
@dlitz
dlitz / .bashrc
Last active June 18, 2023 11:22
root's .bashrc., .profile, and .inputrc
# ~/.bashrc: executed by bash(1) for non-login shells.
# Note: PS1 and umask are already set in /etc/profile. You should not
# need this unless you want different defaults for root.
# PS1='${debian_chroot:+($debian_chroot)}\h:\w\$ '
# umask 022
# You may uncomment the following lines if you want `ls' to be colorized:
export LS_OPTIONS='--color=auto'
eval "$(dircolors)"
@dlitz
dlitz / btrfstune-m-breaks-btrfs-scrub.sh
Last active May 11, 2022 01:50
btrfstune -m breaks btrfs scrub
#!/bin/bash
# dlitz 2022
# This tests 'btrfstune -m' (change metadata_uuid) followed by 'btrfs scrub'.
# Apparently, changing the metadata_uuid causes btrfs scrub to spew
# uncorrectable errors, even on an empty filesystem.
# Changing the metadata_uuid back to the old value makes 'btrfs scrub' happy
# again.
set -eu
@dlitz
dlitz / djvusplit.sh
Created April 27, 2022 02:04
Shell script to split .djvu files into pages, one per file
#!/bin/bash
# dlitz 2022
# SPDX-License-Identifier: CC0-1.0
set -eu
usage() {
echo "usage: $0 [-v] inputfile.djvu output-dir"
echo "Split a DjVu document into multiple pages, one per file."
echo "Use djvm -c to reassemble the file."
@dlitz
dlitz / hello.sh
Created November 3, 2018 05:52
simple hello-world script
#!/bin/sh
echo "Hello world!"
# creates a signed cert using openssl. depends on Debian's default openssl.cnf.
def _ssl_ca_signed_certificate(self, private_key, subject,
ca_key, ca_cert):
# Generate a CSR
csr = self._ssl_self_signed_cert(
private_key, subject=subject, req=True)
# Make some FIFOs, where one end is inherited across execve()
r, w = os.pipe()
fcntl.fcntl(r, F_SETFD, fcntl.fcntl(r, F_GETFD) & ~FD_CLOEXEC)
@dlitz
dlitz / keybase.md
Created October 6, 2014 08:51
keybase.md

Keybase proof

I hereby claim:

  • I am dlitz on github.
  • I am dlitz (https://keybase.io/dlitz) on keybase.
  • I have a public key whose fingerprint is 19E1 1FE8 B3CF F273 ED17 4A24 928C EC13 39C2 5CF7

To claim this, I am signing this object:

@dlitz
dlitz / fix-python-2.2-plat-linux3.patch
Created February 22, 2014 22:40
Fix Python < 2.7 looking for 'plat-linux3' instead of 'plat-linux2'
sys.platform should return "linux2" even if the system was compiled on Linux 3.x or later.
diff -ru Python-2.2.3.orig/configure Python-2.2.3/configure
--- Python-2.2.3.orig/configure 2003-03-29 14:25:14.000000000 -0800
+++ Python-2.2.3/configure 2014-02-22 14:37:36.540457776 -0800
@@ -641,6 +641,8 @@
MACHDEP="$ac_md_system$ac_md_release"
case $MACHDEP in
+ linux1) MACHDEP="linux1";;
@dlitz
dlitz / patch-vmware-workstation-9.02_linux-3.12.sh
Created January 21, 2014 00:10
VMware Workstation kernel module patches VMware Workstation 9.0.2 & Linux kernel 3.12
#!/bin/sh
# Inspired by the vmware-any-any-update series of patches
set -e
ws_ver=`vmware-installer -l | grep vmware-workstation | awk '{ print $2 }' | cut -d. -f1-3`
if [ -z "$ws_ver" ] ; then
echo >&2 "$0: error: VMware Workstation not installed?"
exit 1
fi
diff --git a/lib/travis/github/services/fetch_config.rb b/lib/travis/github/services/fetch_config.rb
index 6d61dd7..542cd0a 100644
--- a/lib/travis/github/services/fetch_config.rb
+++ b/lib/travis/github/services/fetch_config.rb
@@ -11,7 +11,8 @@ module Travis
register :github_fetch_config
def run
- config = retrying(3) { parse(fetch) }
+ config = retrying(3) { parse(fetch(config_url)) }