Skip to content

Instantly share code, notes, and snippets.

@owindsor
owindsor / provisions-all.sh
Created July 17, 2020 23:56
provision extra tools
#!/bin/bash
#increase swap to 8gb
swapoff -a
rm -i -f /swapfile
dd if=/dev/zero of=/swapfile bs=1M count=8192
chmod 600 /swapfile
mkswap /swapfile
swapon /swapfile
@owindsor
owindsor / gist:21b289d480d931d457c3
Created January 6, 2015 01:05
SilverStripe Varnish Cookie handling
# Remove all cookies that do not match the following rules
if (
# Any HTTP POST request
!(req.request == "POST") &&
# Admin URLs
!(req.url ~ "^/admin|Security/") &&
# Allow /dev/build and /dev/tasks URLs