Skip to content

Instantly share code, notes, and snippets.

@ernestas
ernestas / S3-Static-Sites.md
Created July 2, 2018 18:52 — forked from bradwestfall/S3-Static-Sites.md
Use S3 and CloudFront to host Static Single Page Apps (SPAs) with HTTPs and www-redirects. Also covers deployments.

S3 Static Sites

What this will cover

  • Host a static website at S3
  • Redirect www.website.com to website.com
  • Website can be an SPA (requiring all requests to return index.html)
  • Free AWS SSL certs
  • Deployment with CDN invalidation

Resources

@ernestas
ernestas / infoq_slides.core.clj
Last active March 19, 2017 13:59
Download InfoQ Slides
(ns infoq-slides.core)
(def url-template "https://cdn.infoq.com/statics_s1_20170314-0434/resource/presentations/Deconstructing-Database/en/slides/sl%s.jpg")
(def last-slide 46)
(def file-template "/home/ernestas/Downloads/rich-hickey/2013-02-deconstructingthedb/sl%s.jpg")
(defn uri [index]
(java.net.URI. (format url-template index)))

Keybase proof

I hereby claim:

  • I am ernestas on github.
  • I am ernestas (https://keybase.io/ernestas) on keybase.
  • I have a public key whose fingerprint is A625 D6A8 C573 6EAC 18DE 398C DD0D ACF3 70EC 76A2

To claim this, I am signing this object:

@ernestas
ernestas / gist:1033461
Created June 18, 2011 20:09
KOstache layout in a layout
<?php defined('SYSPATH') or die('No direct script access.');
/**
* Mustache templates for Kohana.
*
* @package Kostache
* @category Base
* @author Jeremy Bush <jeremy.bush@kohanaframework.org>
* @author Woody Gilk <woody.gilk@kohanaframework.org>
* @copyright (c) 2010-2011 Jeremy Bush
* @copyright (c) 2011 Woody Gilk