Skip to content

Instantly share code, notes, and snippets.

View lucasbastianik's full-sized avatar

Lucas Bastianik lucasbastianik

View GitHub Profile
@lucasbastianik
lucasbastianik / dateTimeFormat.js
Last active April 23, 2020 12:27
ECMAScript i18n API - Date Format without Timezone
return new Intl.DateTimeFormat("pt-BR", {
timeZone: "UTC",
}).format(new Date("2020-01-01"))
@lucasbastianik
lucasbastianik / rw_ro_access.sql
Created March 17, 2020 22:37 — forked from checco/rw_ro_access.sql
How to create a read only user in AWS RDS PostgreSQL and a user with superuser privileges on AWS RDS PostgreSQL
--
-- Read only
--
-- Create a group
CREATE ROLE postgres_ro_group;
-- Grant access to existing tables
GRANT USAGE ON SCHEMA public TO postgres_ro_group;
GRANT SELECT ON ALL TABLES IN SCHEMA public TO postgres_ro_group;
@lucasbastianik
lucasbastianik / S3-Static-Sites.md
Created June 4, 2018 03:34 — 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