Skip to content

Instantly share code, notes, and snippets.

package auth
import (
"crypto/rsa"
"encoding/json"
"io/ioutil"
"log"
"net/http"
"time"
package models
import (
"github.com/dgrijalva/jwt-go"
)
type Claim struct {
Client `json:"client"`
jwt.StandardClaims
}
package models
type ResponseToken struct {
Token string `json:"token"`
}
package main
import (
"log"
"net/http"
"playground/auth"
)
func main() {
github.com/dgrijalva/jwt-go
openssl genrsa -out private.rsa 1024
openssl rsa -in private.rsa -pubout > public.rsa.pub
DROP TABLE IF EXISTS banking_entities CASCADE;
CREATE TABLE IF NOT EXISTS banking_entities(
id INTEGER GENERATED ALWAYS AS IDENTITY, --PRIMARY KEY
name VARCHAR(40) NOT NULL UNIQUE,
created_at DATE NOT NULL DEFAULT CURRENT_DATE,
PRIMARY KEY(id)
);
DROP TABLE IF EXISTS branches CASCADE;
CREATE TABLE IF NOT EXISTS branches(
wget --load-cookies /tmp/cookies.txt "https://docs.google.com/uc?export=download&confirm=$(wget --quiet --save-cookies /tmp/cookies.txt --keep-session-cookies --no-check-certificate 'https://docs.google.com/uc?export=download&id=FILEID' -O- | sed -rn 's/.*confirm=([0-9A-Za-z_]+).*/\1\n/p')&id=FILEID" -O FILENAME && rm -rf /tmp/cookies.txt
sudo apt-get install --reinstall libpq-dev
arangorestore --input-directory ./SG_QA --server.endpoint tcp://localhost:8529 --server.database SG_UAT_BKP --create-database true
@luisnquin
luisnquin / 0-go-os-arch.md
Created March 12, 2022 02:16 — forked from asukakenji/0-go-os-arch.md
Go (Golang) GOOS and GOARCH

Go (Golang) GOOS and GOARCH

All of the following information is based on go version go1.17.1 darwin/amd64.

GOOS Values

GOOS Out of the Box
aix
android