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 / Vagrantfile
Last active February 15, 2018 20:56
Vagrantfile for Siris
Vagrant.configure("2") do |config|
config.vm.provider "virtualbox" do |v|
v.gui = false
v.memory = 2048
end
# Use this image for a clean full install with no cached packages
# config.vm.box = "ubuntu/trusty64"
config.vm.box = "siris-cached"
# Get it from gm-accelerator.xen.prgmr.com:~will/vagrant/siris-cached.box
# Then run vagrant box add siris-cached.box --name siris-cached
@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):
@sapid
sapid / README.txt
Last active August 29, 2015 14:24
Timing chrome extension message passing
You should be able to visit chrome-extension://<extension id>/meter.html and run the tests manually. Don't forget to add the extension ID to the top of meter.js.
The timer could be better with some sort of profiling extension; as it stands, it just uses Date().getTime() when it starts and stops and takes the difference.
@sapid
sapid / blestav3.conf
Last active April 11, 2017 17:52
blesta config with nginx on ubuntu
server {
listen 80;
listen [::]:80 ipv6only=on; # This last flag can fix some issues nginx can have with binding to ports.
server_name www.example.com;
return 301 https://$server_name$request_uri; #Force SSL
}
server {