Skip to content

Instantly share code, notes, and snippets.

View sapid's full-sized avatar

Will Crawford sapid

  • Seattle, WA
View GitHub Profile
@evgenius
evgenius / onchange.sh
Last active December 15, 2018 22:17 — forked from senko/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
@rolo
rolo / html_compile.py
Created August 1, 2012 16:37
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):
@boxbilling
boxbilling / Hook_Custom.php
Created February 14, 2012 07:18
Custom Event Hook which uses product plugin for BoxBilling
<?php
/**
* Example product plugin usage
*/
class Hook_Custom
{
public static function onAfterOrderActivate(Box_Event $event)
{
$order = $event->getSubject();
$plugin = $order->Product->plugin;