Creating a serverless redirect requires four AWS services:
- S3
- Certificate Manager
- Cloudfront
- Route 53
Use the template below to create index.html. Include the URL you are redirecting to in place of {{ URL }}
/* | |
Timer | |
- utilises animation frames (with a fallback to setTimeout when using the polyfill, below) | |
- returns remaining (or running) time | |
- pass a callback [fn], with an optional duration [ms] and autotart [bool], to the constructor or 'init' method | |
eg. new Timer(foo, 1000) *or* (new Timer()).init(foo, 0, true) | |
- for uniform x-browser support combine with the requestAnimationFrame polyfill from Erik Möller, et. al. | |
[https://github.com/darius/requestAnimationFrame] | |
*/ |
// ---- | |
// Sass (v3.3.9) | |
// Compass (v1.0.0.alpha.20) | |
// ---- | |
$a: 'body[data-type]'; | |
$b: 'body[data-type]', | |
'body[data-type=none]'; | |
@mixin parent ($vars) { |
// ---- | |
// Sass (v3.3.0.rc.2) | |
// Compass (v1.0.0.alpha.17) | |
// ---- | |
@function calculate-ranges($breaks) { | |
$ranges: (); | |
$length: length($breaks); | |
@for $i from 1 through $length - 1 { |
package.json
where you develop .. say ~/www
npm run launchpack
Follow the steps below to get Node and NPM running cleanly on your machine.
npm uninstall npm -g
rm -rf /usr/local/lib/node /usr/local/lib/node_modules /var/db/receipts/org.nodejs.*
rm -rf /usr/local/include/node /Users/$USER/.npm
rm /usr/local/bin/node
The below was completed on a Vultr 1xCPU / 1GB VC2 running Ubuntu 18.04, based on tutorials from Digital Ocean and SSDNodes, alongside various other helpful resources. Instructions do not work on Ubuntu 18.10.
Using this system I currently pay US$5.00 per month to host 2x wordpress sites (1x ecommerce) and 1x static nginx.
If you like the guide, consider signing up to Vultr with my affiliate code. Thanks!
Improvements to the guide (or better explanations) are most appreciated!
const functions = require('firebase-functions'); | |
const path = require('path'); | |
const glob = require('glob'); | |
const ENDPOINT_FOLDER = './endpoints'; | |
const DO_NOT_DEPLOY = /^(admin|a|debug|d)$/; | |
const IGNORE = /^(ignore|i)$/; | |
const BREAK_ON_ERROR = true; | |
const is = { |
Back in 2018 I was chatting to some shark researcher mates about their GPS tracking efforts, and how they were using video to manually animate their tagged sharks’ movements across the Great Barrier Reef. I love maps, and I thought I could speed up their workflow with a web-based animation they could screen record. I think they were dubious at the time, but I spent a few hours knee-deep in mapbox and codepen and sent through a rough demo anyway [1].
We didn’t really discuss it again until January 2019 when one of their whale sharks (GBR1), who I’d included in the demo, started pinging in frequently while tracking north towards Papua New Guinea. It was a real thrill to watch and became one of the longest recorded tracks for a whale shark.
I run the tech side of things at a very “4 people” small conser