Skip to content

Instantly share code, notes, and snippets.

Avatar

Phil Hudson PhilHudson

View GitHub Profile
View ssh_bzr_merge.bash
#!/usr/bin/env bash
# $1 (optional): triggering host
source "${HOME}/bin/sec-utils/agent.source.bash"
# Mainly called remotely, often from eshell, so 'less' messes things up
export PAGER=cat
# Pull changes from central repo into local repo
View gist:a402777b54e84f5db13f94fe61a2843c
This file has been truncated, but you can view the full file.
D: 0.176: quodlibet._init_gettext: LANGUAGE: 'en_GB.UTF-8:C:en_US.ISO8859-1:C:en:C:C'
D: 0.176: quodlibet._init_gettext: LANG: 'en_GB.UTF-8'
D: 0.177: quodlibet._init_gettext: No translation found in '/usr/share/locale'
D: 0.486: formats._misc.init: MimeType=application/x-flac;audio/aac;audio/aiff;audio/midi;audio/mp3;audio/mp4;audio/mpeg;audio/mpeg4;audio/mpg;audio/ogg;audio/vorbis;audio/wav;audio/wave;audio/x-aac;audio/x-aiff;audio/x-flac;audio/x-m4a;audio/x-midi;audio/x-mp3;audio/x-mpc;audio/x-mpeg;audio/x-ms-wma;audio/x-ms-wmv;audio/x-musepack;audio/x-oggflac;audio/x-speex;audio/x-tta;audio/x-wav;audio/x-wavpack;audio/x-wma;video/ogg;video/x-ms-asf;video/x-theora;video/x-wmv;
D: 0.486: formats._misc.init: Supported formats: aac, aiff, midi, mod, monkeysaudio, mp3, mp4, mpc, spc, trueaudio, vgm, wav, wavpack, wma, xiph
D: 1.351: quodlibet._init_gtk_debug: Initializing debugging extensions
D: 1.623: qltk.add_signal_watch: Register Python signal handler: 'SIGHUP'
View next browser stderr
WARNING: Setting locale failed.
Check the following variables for correct values:
LC_ALL=en_GB.UTF-8
LANG=en_GB.UTF-8
Next version 1.3.4
<INFO> [21:28:37] next remote.lisp (initialize-instance :after remote-interface) -
D-Bus addresses: (#<Unix socket address: @"/tmp/dbus-cuENar4m4a">)
<INFO> [21:28:37] next remote.lisp (initialize-instance :after remote-interface) -
Bus connection name: :1.1
<INFO> [21:28:38] next port.lisp (run-program port) -
View shadow-file.el
;; Adapted from
;; http://muublog.blogspot.com/2018/01/for-various-reasons-i-needed-to-sync.html
(eval-and-compile
(require 'dash)) ; for `-lambda'
(defcustom ph/shadow-file-mappings nil
"Each key is the regular expression matching the file(s)
that should be copied, and the value is the target directory."
:group 'files
@PhilHudson
PhilHudson / vorbiscomment.el
Created Jul 27, 2016
Edit OGG Vorbis tag metadata in Emacs
View vorbiscomment.el
;;; vorbiscomment.el --- Edit comments in Ogg Vorbis files
;; Copyright (C) 2003 Jesper Harder
;; Author: Jesper Harder <harder@ifa.au.dk>
;; Created: 19 Aug 2003
;; Version: 1.1
;; Location: <http://purl.org/harder/>
;; Keywords: multimedia, data
@PhilHudson
PhilHudson / active_user
Created Jun 17, 2016
Dual-screen interactive slideshow screensaver for MATE
View active_user
#!/usr/bin/env bash
# Standard-repo requirements:
# w, awk, head, mktemp, split, grep, ck-list-sessions, sed, getent, cut
# TODO Check whether awk can't exit immediately after first match
ACTIVE_USER=`w --no-header -s | awk '/ :0 / {print $1}' | head -1`
[ -n "$ACTIVE_USER" ] && {
echo "$ACTIVE_USER"
exit 0
View Org capture backtrace
Debugger entered--Lisp error: (error "Capture abort: (wrong-type-argument stringp nil)")
signal(error ("Capture abort: (wrong-type-argument stringp nil)"))
error("Capture abort: %s" (wrong-type-argument stringp nil))
byte-code("\301\302!\203\nebugger entered--Lisp error: (error "Capture abort: (wrong-type-argument stringp nil)")
signal(error ("Capture abort: (wrong-type-argument stringp nil)"))
error("Capture abort: %s" (wrong-type-argument stringp nil))
byte-code("\301\302!\203\nebugger entered--Lisp error: (error "Capture abort: (wrong-type-argument stringp nil)")
signal(error ("Capture abort: (wrong-type-argument stringp nil)"))
error("Capture abort: %s" (wrong-type-argument stringp nil))
byte-code("\301\302!\203\nebugger entered--Lisp error: (error "Capture abort: (wrong-type-argument stringp nil)")
View economist.org

The Economist has always been a staunch defender and exponent of the values of what the philosopher Karl Popper called the “open society”: a certain democratic pluralism, never carried too far of course; civil society; the rule of law; enduring non-state institutions; fulsome, open, public debate, though not about everything, which would obviously just be silly; checks, balances and accountability for state power, and perhaps to some lesser extent corporate power too; and its own special area of interest and expertise: a free, fearless, fair-ish and independent press, entitled to its own robustly expressed opinions and agendas, but with certain inviolable absolute obligations to inform the public honestly – more or less, within reason – and to uphold simple,

View capture-call.el
;; An Org-mode capture template for scheduling a phone call to a BBDB contact.
;; Shortcut key: c
;; Target location: Under headline "Incoming" in file "~/org/ToDo.org".
;; Default tags: @phone
;; The function `ph/capture-bbdb' (see below) handles BBDB contacts with either a name or only an organization.
;;
;; To use this capture template, first mark the whole of the specific phone number you
;; want within the contact record in the *BBDB* buffer, then hit C-c t c.
;;
;; Prompts for:
View sub_screen
#!/usr/bin/env bash
# Did caller pass in an epoch time to compare?
if [ $# = 1 ]; then
"${HOME}/bin/test-host-times-match" "$1" || echo 'WARNING: Time out of sync' 1>&2
fi
# Primes the (possibly new) screen session with a (possibly new) remote DISPLAY
echo "${DISPLAY:-:10.0}" > "${HOME}/tmp/display"