Skip to content

Instantly share code, notes, and snippets.


Ashley ablwr

View GitHub Profile
wcaleb /
Last active Jan 16, 2021
Pandoc filter to replace Link URLs with Wayback Machine URLs
# -*- coding: utf-8 -*-
# Usage: pandoc input
# Install pandocfilters and requests with pip before using
# Warning: may take a while to process input with lots of links
# Note: Links that can't be saved to WBM or already point to WBM are left as is
from pandocfilters import toJSONFilter, Link
import requests
matthewmcvickar / .bash_prompt
Last active May 11, 2020
Get the current phase of the moon and use it to print an emoji moon phase image. OS X only, requires some shell knowledge. (Emoji moon phases will not show up here, but they will when you copy and paste or download the file.)
View .bash_prompt
# Get the current phase of the moon for use as prompt
# Adapted from:
function moonphase() {
/usr/bin/env ruby <<-EORUBY
# Convert a date to Julian.
def julian(year, month, day)
a = (14-month)/12
y = year+4800-a
m = (12*a)-3+month