docs/legacy-redirects.map
: a file listing source and destination (separated by a space) ending each line with a ;
/source /destination;
/news/old-post-2005 /blog;
AFTER include
(L1) (NB: edit the domain)
[user] | |
name = wesort | |
email = ben@wesort.co.uk | |
[push] | |
default = simple | |
[alias] | |
lg = "log --oneline -n 10 --decorate --graph --format=\"%C(auto)%h%Creset %C(auto)%d%Creset %s %C(auto)(%an, %ad)%Creset\" --date=format:\"%d %b %Y\"" | |
lg-all = log --all --decorate --oneline --graph | |
conflict = diff --name-only --diff-filter=U | |
goback = !git reset --hard HEAD && git clean -fd |
<LifecycleConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/"> | |
<Rule> | |
<ID>Prune files starting with backup- after 1 days</ID> | |
<Prefix>assets/backup-</Prefix> | |
<Status>Enabled</Status> | |
<Expiration> | |
<Days>1</Days> | |
</Expiration> | |
</Rule> | |
</LifecycleConfiguration> |
Creating and configuring a new site / environment occurs occasionally. Often, to update the underlying server software.
This site has been built with:
<script> | |
/* | |
crc-reload is a script to auto reload the current page when you save the html. | |
Version 0.1 - Initial release | |
Usage: | |
Requires jquery (stable with v1.6.2+) | |
Include this js file in your html page. | |
It will ajax GET poll the current page every second and if the html is different, reload itself. | |
Useful on a dev site within an environment conditional. |
// Google Apps Script to automatically get stats within a Gmail inbox | |
// Stats logged: | |
// - current date & time | |
// - username / email address | |
// - # of message threads in inbox | |
// - Age in days of oldest message | |
// 1. Visit https://script.google.com and create a new project | |
// 2. Name the project | |
// 3. Copy and paste this gist |
location / { | |
proxy_pass http://localhost:3000/; | |
proxy_http_version 1.1; | |
proxy_set_header Upgrade $http_upgrade; | |
proxy_set_header Connection 'upgrade'; | |
proxy_set_header Host $host; | |
proxy_cache_bypass $http_upgrade; | |
} |
A command line tool for syncing with DigitalOcean Spaces or Amazon S3
I'm using this in the context of .gitignore'ing Assets from a Statamic site.
DigitalOcean Spaces with s3cmd
s3cmd
to interact with Spacesphp artisan cache:clear # Clear the Laravel application cache. | |
php artisan config:cache # Clear and refresh the Laravel config cache. | |
php artisan route:cache # Clear and refresh the Laravel route cache. | |
php artisan statamic:stache:warm # Warm the Statamic stache. | |
php artisan statamic:search:update --all # Update the search index. | |
php artisan statamic:static:clear # Clear the Statamic static cache (if you use this). | |
#php artisan statamic:static:warm --queue # Warm the Statamic static cache (if you use this). | |
echo 'warming /work ...' | |
curl -# https://example.com/large-page > /dev/null | |
echo '/work is warmed.' |
# Replace location / {...} with this: | |
location / { | |
try_files /static${uri}_${args}.html $uri /index.php?$args; | |
} | |
# Add to bottom just before closing `}`: | |
# Enable gzip compression | |
gzip on; | |
gzip_min_length 1100; | |
gzip_buffers 4 32k; |