Skip to content

Instantly share code, notes, and snippets.

@trjh
trjh / zsh_eternal_to_atuin.py
Created June 23, 2025 21:39
Import my .zsh_eternal_history to the atuin db
#!/usr/bin/env python3
# Load history from ~/.zsh_eternal_history and save it to the atuin history database
# Modified from Mark Hepburn's code
# https://blog.markhepburn.com/posts/atuin-and-per-directory-history-import/
# My eternal history command was copied from someone elses, *years* ago.
# ZSH_ETERNAL_HISTORY=~/.zsh_eternal_history
# [[ ! -f $ZSH_ETERNAL_HISTORY ]] && touch $ZSH_ETERNAL_HISTORY
@trjh
trjh / macaddcert.sh
Created March 11, 2022 12:20
macaddcert.sh -- pull TLS cert from a URL and add it to trusted keystore
#!/bin/bash
# add the security certificate of a host to macos keychain
if [[ -z $1 ]]; then
echo USAGE: $0 hostname
exit
fi
host=$1
tmpfile=/tmp/${host}.pem
@trjh
trjh / Dockerfile
Last active June 17, 2019 15:09
Dockerfile to build rteplayer_dl -- https://github.com/philroche/rteplayer_dl
#
# Dockerfile for rteplayer_dl,
# based on vimagick/youtube-dl
#
FROM alpine
MAINTAINER Tim Hunter <[email protected]>
RUN set -xe \
&& apk add --no-cache ca-certificates \
ffmpeg \