Skip to content

Instantly share code, notes, and snippets.

(define-command-global ph/org-capture ()
(let* ((url (ph/url-encode (ph/buffer-url)))
(title (ph/url-encode (ph/buffer-title)))
(body (ph/url-encode (%copy)))
(org-protocol-uri
(ph/format
"'org-protocol://capture?template=w&url=~a&title=~a&body=~a'"
url title body)))
(format *error-output* "Sending to Emacs:~%~a~%" org-protocol-uri)
(uiop:run-program
@PhilHudson
PhilHudson / features.el
Created July 3, 2021 11:33
My value of `features`
(aggressive-indent
cl-print
link-hint
goto-addr
avy
highlight-symbol
cal-move
bbdb-anniv
header2
lib-requires
#!/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
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'
D: 1.623: qltk.add_signal_watch: Register Pyt
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) -
@PhilHudson
PhilHudson / shadow-file.el
Created August 30, 2019 21:32
shadow-file
;; 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 July 27, 2016 08:50
Edit OGG Vorbis tag metadata in Emacs
;;; 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 June 17, 2016 15:15
Dual-screen interactive slideshow screensaver for MATE
#!/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
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)")

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,