Skip to content

Instantly share code, notes, and snippets.

View iainhouston's full-sized avatar

Iain Houston iainhouston

View GitHub Profile
@iainhouston
iainhouston / URLEncodeAppleScript.applescript
Last active February 3, 2020 12:56
A Folder Action to encode a script to be Opened in Editor
property done_foldername : "URL Encoded Scripts"
on adding folder items to this_folder after receiving these_items
-- If the result folder doesn't exist, then create it
tell application "Finder"
if not (exists folder done_foldername of this_folder) then
make new folder at this_folder with properties {name:done_foldername}
set current view of container window of this_folder to list view
end if
set the target_folder to folder done_foldername of this_folder
@iainhouston
iainhouston / makepost.py
Last active March 30, 2022 03:24
This is (probably yet another) Python script to create a new post in your Jekyll blog
#!/usr/bin/env python3
# makepost.py
'''
Program to create a Jekyll _post file in the correct format
and populated with essential frontmatter
'''
import os, re, sys, argparse
from datetime import date, time, datetime
# blogcats allows you to limit the categories of new posts in your blog