Skip to content

Instantly share code, notes, and snippets.

import * as qs from "qs";
import { PathLike } from "fs";
export const apiConfig = {
returnRejectedPromiseOnError: true,
withCredentials: true,
timeout: 30000,
baseURL: "https://jsonplaceholder.typicode.com/",
headers: {
common: {
@andreswebs
andreswebs / signal.go
Created December 15, 2020 10:42 — forked from reiki4040/signal.go
signal handling example for golang
package main
import (
"fmt"
"os"
"os/signal"
"syscall"
)
func main() {
@andreswebs
andreswebs / aws_sso.py
Last active February 16, 2021 01:00 — forked from sgtoj/aws_sso.py
AWS SSO Credentials external process
#!/usr/bin/env python3
import json
import os
import sys
import hashlib
from configparser import ConfigParser
from datetime import datetime
from pathlib import Path

Github Two-Factor Authentication (2FA) for Brazil via SMS

The Github doesn't provide country code for Brazil (+55). To add this option, just run the code below in your console:


🇧🇷 [pt-BR]

Autenticação em dois fatores (2FA) do GitHub para o Brasil via SMS

@andreswebs
andreswebs / aws_iam_secret_to_smtp_password.md
Created April 25, 2021 01:59 — forked from damusix/aws_iam_secret_to_smtp_password.md
Convert AWS IAM credentials to AWS SMTP credentials

Convert AWS IAM credentials to AWS SMTP credentials

If you do, or want to, use AWS to deploy your apps, you will end up using AWS SES via SMTP when you're launching an app that sends out emails of any kind (user registrations, email notifications, etc). For example, I have used this configuration on various Ruby on Rails apps, however, it is just basic SMTP configurations and crosses over to any framework that supports SMTP sendmail.

There are two ways to go about this:

Luckily, you found this MD file and the NOT SO EASY WAY is suddenly copy-pasta... sudo yum....

@andreswebs
andreswebs / android-backup-apk-and-datas.md
Created June 2, 2021 00:43 — forked from AnatomicJC/android-backup-apk-and-datas.md
Backup android app, data included, no root needed, with adb

Backup android app, data included, no root needed, with adb

adb is the Android CLI tool with which you can interact with your android device, from your PC

You must enable developer mode (tap 7 times on the build version in parameters) and install adb on your PC.

Fetch application APK

To get the list of your installed applications:

@andreswebs
andreswebs / Clean Samsung Galaxy A40 bloatwares
Created June 2, 2021 01:10 — forked from joaofl/Clean Samsung Galaxy A40 bloatwares
Script I used to clean preinstalled shit out of my brand new Samsung A40 (while there is still no LineageOS for it)
#!/bin/sh
# ref: https://piunikaweb.com/2019/03/25/samsung-galaxy-s10-remove-bundled-bloatwares-without-root/
# install the following app to see the packages names:
# use the following command to generate the unistall command, for easy copy and paste:
# adb shell 'pm list packages' | sed -e 's/^/adb uninstall --user 0 /' | grep FILTER_HERE | sort
#things to install if removing keyboard
# F-Droid
# APK Analyser
#!/bin/sh
set -eufo pipefail
if [ "$#" -ne 2 ]; then
echo "usage: $0 source_repo_url target_repo_url" >&2
exit 1
fi
SOURCE_URL="$1"
@andreswebs
andreswebs / visual_studio_msbuild_manual.md
Created December 14, 2021 15:09 — forked from nicolasdao/visual_studio_msbuild_manual.md
Visual Studio & MSBuild manual. Keywords: msbuild visual studio visualstudio
@andreswebs
andreswebs / list.txt
Created December 22, 2021 21:06 — forked from shortjared/list.txt
List of AWS Service Principals
a4b.amazonaws.com
access-analyzer.amazonaws.com
account.amazonaws.com
acm-pca.amazonaws.com
acm.amazonaws.com
airflow-env.amazonaws.com
airflow.amazonaws.com
alexa-appkit.amazon.com
alexa-connectedhome.amazon.com
amazonmq.amazonaws.com