Skip to content

Instantly share code, notes, and snippets.

View alphapapa's full-sized avatar

Adam Porter alphapapa

  • USA
View GitHub Profile
@alphapapa
alphapapa / fitness.org
Last active March 11, 2024 06:38
An Emacs food/weight/workout tracker self-contained in a single Org file

Plots

/home/me/org/double-plot.png

Tasks

@alphapapa
alphapapa / org-link-github.el
Last active January 22, 2024 23:38 — forked from stefanv/org-gh-links.el
GitHub links for org mode
@alphapapa
alphapapa / emacs-29.1.scm
Created August 12, 2023 02:26
Guix Emacs 29.1 interim packaging
(define-module (gnu packages emacs-29.1)
#:use-module (guix packages)
#:use-module (guix download)
#:use-module (guix build-system gnu)
#:use-module (guix licenses)
#:use-module (gnu packages emacs)
#:use-module (gnu packages sqlite)
#:use-module (gnu packages autotools)
#:use-module (guix utils)
#:use-module ((guix licenses) #:prefix license:)
@alphapapa
alphapapa / python-mode-outline-mode.el
Last active September 7, 2023 00:03
Emacs: Python: outline-minor-mode headings for both Python keywords and standard commented-starred headings
(defun python-mode-outline-hook ()
(setq outline-level 'python-outline-level)
(setq outline-regexp
(rx (or
;; Commented outline heading
(group
(* space) ; 0 or more spaces
(one-or-more (syntax comment-start))
(one-or-more space)
@alphapapa
alphapapa / emacs-raise-or-run.sh
Last active August 12, 2023 06:39
Raise an Emacs window or run Emacs
#!/bin/bash
# ** Vars
# *** Emacs version
emacs="emacs"
emacsclient="emacsclient"
emacsWindowClass="Emacs"
# ** Functions
@alphapapa
alphapapa / helm-org-tag-completion.el
Last active December 21, 2022 15:45
Complete multiple org-mode tags with helm
;;;;;; Fix Helm org tag completion
;; From Anders Johansson <https://groups.google.com/d/msg/emacs-helm/tA6cn6TUdRY/G1S3TIdzBwAJ>
;; This works great! He posted it on 3 Mar 2016, on a thread that was
;; started in Oct 2013. He also posted this message on 2 Apr 2014,
;; maybe an earlier attempt at a solution:
;; <http://article.gmane.org/gmane.emacs.orgmode/84495> I've just
;; tidied it up a bit and adjusted the prompt.
(add-to-list 'helm-completing-read-handlers-alist '(org-capture . aj/org-completing-read-tags))
@alphapapa
alphapapa / wget-page.sh
Created November 23, 2018 09:07
Archive web pages with wget, optionally compressing with tar
#!/bin/bash
# * Defaults
compression=xz
subdir="web"
# * Functions
function debug {
@alphapapa
alphapapa / elfeed-config.el
Created September 13, 2018 10:41
Elfeed config
;;; elfeed configuration
(use-package elfeed
;;;; Keymaps
:general
(:keymaps '(shr-map)
"a" 'pocket-reader-shr-add-link)
(:keymaps '(elfeed-show-mode-map elfeed-search-mode-map)
@alphapapa
alphapapa / Firefox-Gtk2-build-1.patch
Last active January 26, 2022 03:05
Patch Firefox 49.0.2 to build with Gtk2
This 1) adjusts the Mozilla mozconfig.gtk file according
to the comments in it, and 2) removes a directory from
the debian/firefox.install.in file that comes up empty
when building with Gtk2, which then causes the package
build to fail due to trying to include files from an
empty directory (don't ask me why the gtk2 directory
is empty when built with Gtk2).
---
build/unix/mozconfig.gtk | 25 +------------------------
debian/firefox.install.in | 1 -
@alphapapa
alphapapa / org-kbd.el
Created December 16, 2018 10:24
Org mode: Add syntax to export HTML KBD elements
;;; org-kbd
;; (setq org-emphasis-alist '(("%" org-kbd verbatim)
;; ("*" bold)
;; ("/" italic)
;; ("_" underline)
;; ("=" org-verbatim verbatim)
;; ("~" org-code verbatim)
;; ("+"
;; (:strike-through t))))