Skip to content

Instantly share code, notes, and snippets.

View KevinGomezDev's full-sized avatar
:electron:
To ignore truth makes you slave of a lie

Kevin Gómez KevinGomezDev

:electron:
To ignore truth makes you slave of a lie
  • Medellin - Colombia
View GitHub Profile
@KevinGomezDev
KevinGomezDev / S3-Static-Sites.md
Created June 21, 2021 17:54 — 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

//Having a list of n digits (0 <= digit <= 9), where n less than or equal to 100, arrange it to move all 0 to right in O (n) time.
//Example [4, 8, 0, 9, 2, 5, 0, 3, 3, 0] -> [4, 8, 9, 2, 5, 3, 3, 0, 0, 0]
//You must display this list in the console.
//After this, the previous list without zeros ([4, 8, 9, 2, 5, 3, 3]) will represent a fictitious integer (4892533). You should add 1 unit to it, leaving the final list as [4, 8, 9, 2, 5, 3, 4]. You must display this list in the console.
function moveCeroToRight(numbers) {
let count = 0
for (let i = 0; i < numbers.length; i++){
if(numbers[i] !== 0) {
numbers[count++] = numbers[i];
### Keybase proof
I hereby claim:
* I am kevingomezdev on github.
* I am kaxz (https://keybase.io/kaxz) on keybase.
* I have a public key ASCo06wmFllAeGm6nlA9qxGSQRIqt2bxB7XC57bAndBtpgo
To claim this, I am signing this object:

1. Clone your fork:

git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream