Skip to content

Instantly share code, notes, and snippets.

View oieduardorabelo's full-sized avatar

Eduardo Rabelo oieduardorabelo

View GitHub Profile
import type {
FirehoseTransformationHandler,
FirehoseTransformationResultRecord,
} from "aws-lambda";
function base64Encode(str: string): string {
return Buffer.from(str).toString("base64");
}
function base64Decode(str: string): string {
@oieduardorabelo
oieduardorabelo / remove-twitter-interests.js
Created November 30, 2022 22:31
Remove all Twitter Interests matched to you based on your profile, activity, and the Topics you follow.
// https://mobile.twitter.com/settings/your_twitter_data/twitter_interests
$$('[checked=""]').forEach((x, index) => { setTimeout(() => { x.click(); }, ++index * 1000) });

DenyRootUserActions

It is generally a best practice not to use the root user to do your tasks in your AWS account. Instead, you should create an IAM admin user and use that to do administrative tasks.

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Condition": {
@oieduardorabelo
oieduardorabelo / readme.md
Created July 5, 2022 05:35
Remove folder or file from Git history with clean up

I already had committed the folder before and want to remove the directory in the history as well.

I did the following:

Add folder to .gitignore:

echo Folder_Name/ >> .gitignore

Remove from all commits:

@oieduardorabelo
oieduardorabelo / template-database.yaml
Created February 28, 2021 11:20
Network and Database Layers Teample
#
# Creates one RDS PostgreSQL instance and RDS Proxy
# with connections allowed in ports 443 and 5432
#
AWSTemplateFormatVersion: "2010-09-09"
Transform: AWS::Serverless-2016-10-31
Description: "Database Layer"
@oieduardorabelo
oieduardorabelo / .env.example
Created February 24, 2021 05:11
Sample of Cognito with Server-Sider Authentication
PORT=xxx
COGNITO_USER_POOL_ID=xxx
COGNITO_CLIENT_ID=xxx
COOKIE_SESSION_SECRET=xxx
COOKIE_SESSION_NAME=xxx
AWS_REGION=xxx
AWS_ACCESS_KEY_ID=xxx
AWS_SECRET_ACCESS_KEY=xxx
@oieduardorabelo
oieduardorabelo / acloudguru-filter.js
Created August 13, 2020 07:36
A Cloud Guru list filter
$$('[ng-if="vm.isCompleted"]').forEach(el => { el.parentNode.parentNode.parentNode.removeChild(el.parentNode.parentNode) })
@oieduardorabelo
oieduardorabelo / help-samsung-internet.md
Last active August 15, 2019 22:52
Looking for help about Samsung Internet vs others browsers in PWA manifest.json

hello pwa gurus!

we've this app deployed, with https, everything is working as expected, except the manifest in Samsung Internet only,

app link: https://app.zbarista.co.nz/

we are testing in multiple devices and android versions (tablets, oreo, samsung s7, pixel, etc) and it happens every time, only in Sasmsung Internet, even after a fresh install of the app in Android.

any idea what might be happening here?

@oieduardorabelo
oieduardorabelo / basic-example-accordion-rtg.tsx
Created March 17, 2019 05:48
`react-transition-group/Transition` example
import React from "react";
import Transition from "react-transition-group/Transition";
const duration = 300;
const Accordion = ({ in: inProp, children }) => {
const childrenType = typeof children.type;
if (childrenType === "undefined" || childrenType === "symbol") {
throw new Error(