Skip to content

Instantly share code, notes, and snippets.

@jcenters
jcenters / maclinkhandler
Created October 16, 2019 14:38
Link Handler for the Mac
#!/usr/bin/env sh
# Feed script a url or file location.
# If an image, it will view in the default image view (probably Preview),
# if a video or music file, it will view in mpv
# otherwise it opens link in browser.
# If no url given. Opens browser. For using script as $BROWSER.
[ -z "$1" ] && { "$BROWSER"; exit; }
@jcenters
jcenters / md-footer-organizer.pl
Created May 5, 2014 21:29
Rearranges Markdown footer links so that the relevant links appear under each paragraph, instead of at the end of a document.
@jcenters
jcenters / inline-to-lazy.pl
Last active August 29, 2015 14:01
Converts standard Markdown inline links to lazy links.
#!/usr/bin/perl
use strict;
use warnings;
use diagnostics;
# Converts standard Markdown inline links to lazy links.
# Serving Suggestions: Pipe text into inline-to-lazy.pl
# from the command line or install as a BBEdit Text Filter.
@jcenters
jcenters / lazy-to-footer.pl
Last active August 29, 2015 14:00
Converts Markdown lazy link asterisks into standard footer link reference numbers.
@jcenters
jcenters / lazy-link-counter.pl
Created April 29, 2014 09:11
Markdown lazy link counter.
@jcenters
jcenters / CriticMarkup.pl
Created April 23, 2014 05:05
A Perl parser for the CriticMarkup language.
#!/usr/bin/perl
# Critic Markup Processor
# Based on CriticMarkup by Gabe Weatherhead and Erik Hess.
# http://criticmarkup.com/
# Strips CriticMarkup tags and performs the appropriate substitutions:
# Addition {++ ++} - Removes tags surrounding the Addition text.
# Deletion {-- --} - Deletes the tags and the text.