Skip to content

Instantly share code, notes, and snippets.

@cryptorick
cryptorick / lp2pass.l
Created January 2, 2018 05:02
lp2pass.l -- Convert LastPass vault to password store
#!/usr/local/bin/pil
#
# lp2pass.l -- Convert LastPass vault to password store (pass db).
# This script processes Secure Notes as well as regular site entries.
#
# Usage: Given the exported LastPass db (vault records) are in a CSV
# file called lp.csv, call this script in any one of the following
# ways.
#
# $ cat lp.csv | lp2pass.l
@cryptorick
cryptorick / print-include-tree.oh
Created September 2, 2018 01:53
Print a tree of include filenames in depth-first order and indented
#!/usr/bin/env oh
#--------------------------------------------------------------------------
# Utilities
define defun: syntax (name args: body) e = {
e::eval: list define $name : list method (list @$args) = @$body
}
define fn: syntax (args: body) e = {
@cryptorick
cryptorick / stat-funcs.awk
Last active September 18, 2018 19:29
I stole some stat functions from the newLISP (C) source code; so I could compute a confidence interval in awk. :D
BEGIN {
ITMAX = 100
EPS7 = 3.0e-7
}
function fatalError(msg, errcode) {
print msg > "/dev/null"
exit(errcode+0)
}
@cryptorick
cryptorick / lilypond-issue-no-lyrics-freebsd-11.2.md
Last active November 8, 2018 22:40
lilypond issue: no lyrics rendered (FreeBSD 11.2)

lilypond issue: no lyrics rendered (FreeBSD 11.2)

Yeah, I knew it was a missing font thing, but dang, there are a lot of moving parts.

First, make sure that the gsfonts package is installed (here's the FYI about it: https://www.freshports.org/print/gsfonts/)

$ sudo pkg install gsfonts
@cryptorick
cryptorick / ispell-with-org.el
Created December 8, 2018 15:22
Make ispell work better with Org
;;; Stolen from
;;; https://github.com/grettke/help/blob/master/help.org#spell-checking
;; Make ispell work better with Org by skipping parts you don't want
;; spellchecked like code blocks and metadata. This is a standalone
;; version of this from Grant's help repo. Thanks, Grant!
(defconst help/org-special-pre "^\s*#[+]")
(defun help/block-regex (special)
@cryptorick
cryptorick / add-to-your-HOME.gitconfig
Created May 2, 2023 00:24
Impersonate people in git
;; Add this, if you want, to the bottom of your $HOME/.gitconfig.
;; Impersonate people: add personages (like the 3 below here); then say
;; $ git impersonate bob
;; Now, git thinks you are Bob (locally of course). This is good for helping
;; your team do git surgery on a branch (and retain the credit for the original
;; person's work). Don't forget to set yourself back (unmask) when you are done.
;; $ git impersonate me
;;
[user-me]
@cryptorick
cryptorick / init.el
Last active June 10, 2023 16:23
Example Emacs init using Elpaso. (For my friend Raoul)
;;----------------------------------------------------------------------
;; Elpaso package manager
;; Bootstrap it outside of Emacs: these commands will install cask and elpaso,
;; respectively, to ~/.emacs.d/elpa.
;;
;; $ cd builds # go somewhere where you usually build software.
;; $ git clone https://github.com/cask/cask && make -C cask install
;; $ git clone https://github.com/commercial-emacs/elpaso && make -C elpaso install