What this will cover
- Host a static website at S3
- Redirect
www.website.comtowebsite.com - Website can be an SPA (requiring all requests to return
index.html) - Free AWS SSL certs
- Deployment with CDN invalidation
| # to generate your dhparam.pem file, run in the terminal | |
| openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |
| package com.chapters.training; | |
| import java.util.ArrayList; | |
| import java.util.HashSet; | |
| import java.util.List; | |
| import java.util.Set; | |
| public class HashMap<K , V> { |
| // The following code is a series of test that were written in the order you'll read them. After | |
| // each test was written it was run against the HashMap and the implementation was updated if it | |
| // failed. The HashMap code is the final implementation that was built naively to pass each test. | |
| // The Tests: | |
| public class HashMapTest { | |
| private HashMap map; | |
| // Set up an empty map before each test |
All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.
elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParentelem.clientLeft, elem.clientTop, elem.clientWidth, elem.clientHeightelem.getClientRects(), elem.getBoundingClientRect()npm install -g create-react-app
create-react-app your-app-name
cd your-app-name| @mixin for-size($size) { | |
| @if $size == phone-only { | |
| @media (max-width: 599px) { @content; } | |
| } @else if $size == tablet-portrait-up { | |
| @media (min-width: 600px) { @content; } | |
| } @else if $size == tablet-landscape-up { | |
| @media (min-width: 900px) { @content; } | |
| } @else if $size == desktop-up { | |
| @media (min-width: 1200px) { @content; } | |
| } @else if $size == big-desktop-up { |
| -server | |
| -Xms2048m | |
| -Xmx2048m | |
| -XX:NewSize=512m | |
| -XX:MaxNewSize=512m | |
| -XX:PermSize=512m | |
| -XX:MaxPermSize=512m | |
| -XX:+UseParNewGC | |
| -XX:ParallelGCThreads=4 | |
| -XX:MaxTenuringThreshold=1 |
| public Observable<FilesWrapper> download(List<Thing> things) { | |
| return Observable.from(things) | |
| .flatMap(thing -> { | |
| File file = new File(getExternalCacheDir() + File.separator + thing.getName()); | |
| if (file.exists()) { | |
| return Observable.just(file); | |
| } | |
| Request request = new Request.Builder().url(thing.getUrl()).build(); |