Skip to content

Instantly share code, notes, and snippets.

View sapid's full-sized avatar

Will Crawford sapid

  • Seattle, WA
View GitHub Profile
@sapid
sapid / onchange.sh
Created February 15, 2018 18:10 — forked from evgenius/onchange.sh
#!/bin/bash
#
# Watch current directory (recursively) for file changes, and execute
# a command when a file or directory is created, modified or deleted.
#
# Written by: Senko Rasic <senko.rasic@dobarkod.hr>
#
# Requires Linux, bash and inotifywait (from inotify-tools package).
#
# To avoid executing the command multiple times when a sequence of
@sapid
sapid / html_compile.py
Created February 20, 2017 22:19 — forked from rolo/html_compile.py
Python script to compile .shtml files with server side includes down to flat HTML suitable for hosting on S3 or where SSIs aren't supported.
#! /usr/bin/env python
import os
import re
import shutil
from os.path import splitext
SOURCE = os.getcwd() + "/www/"
TARGET = os.getcwd() + "/compiled/"
if not os.path.exists(TARGET):