Skip to content

Instantly share code, notes, and snippets.

View charlires's full-sized avatar

Carlos Andonaegui charlires

  • Brightcove
  • Guadalajara, MX
View GitHub Profile
@charlires
charlires / merge_files.go
Created August 21, 2024 14:55
A go script to merge multiple go files in a dir tree into one single file per dir
package main
import (
"bufio"
"flag"
"fmt"
"io/fs"
"os"
"path/filepath"
"strings"
@charlires
charlires / java_for_algorithms.md
Last active November 3, 2023 03:41
java_for_algorithms.md
@charlires
charlires / jwt_es256.go
Last active August 26, 2022 19:05
Go Snippets
privateKey := "YOU-PRIVATE-KEY"
// atClaims := jwt.MapClaims{}
// atClaims["exp"] = time.Now().Add(time.Minute*15).UnixMilli()
// atClaims["aud"] = "Audience" // OPTIONAL AUDIENCE
atClaims := jwt.StandardClaims{
IssuedAt: time.Now().Unix(),
ExpiresAt: time.Now().Add(30 * time.Second).unix(),
}
@charlires
charlires / p1.go
Last active March 11, 2022 18:15
Go Async
package main
import (
"fmt"
"net/http"
)
func main() {
// A slice of sample websites
urls := []string{
@charlires
charlires / README.md
Last active February 7, 2022 22:08
learn-css
@charlires
charlires / main.md
Last active August 5, 2021 18:33
Android WLS
@charlires
charlires / ionic.md
Last active August 5, 2021 03:40
react

ionic build

npx cap add android

ionic capacitor run android

@charlires
charlires / utils.md
Last active July 21, 2021 01:17
Utils
# with_role bc-videocloud-prod arn:aws:iam::749779118921:role/dev-admin

function with_role() {
    >&2 echo "Generating Temporary Session Creds..."
    CREDS=$(aws sts assume-role \
      --profile $1 \
      --role-arn $2 \
      --role-session-name "${USER}-session" \
      --query Credentials \