Skip to content

Instantly share code, notes, and snippets.

View MaG21's full-sized avatar
💭
Statically typed languages and VIM

MaG21

💭
Statically typed languages and VIM
View GitHub Profile
@MaG21
MaG21 / trc20.py
Created November 20, 2023 01:17 — forked from andelf/trc20.py
Get TRC20 balance and Transfer TRC20 tokens
import requests
import base58
import base64
from pprint import pprint
ADDRESS = "T....your address"
PRIV_KEY = 'hex private key'
CONTRACT = "TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t" # USDT
@MaG21
MaG21 / main.tf
Created August 10, 2021 06:53 — forked from monostere0/main.tf
Terraform VPC
provider "aws" {
version = "~> 2.0"
region = "eu-central-1"
}
# VPC
resource "aws_vpc" "tf_vpc" {
cidr_block = "10.0.0.0/16"
tags = {
@MaG21
MaG21 / RDS.tf
Created August 9, 2021 06:00 — forked from dedunumax/RDS.tf
resource "aws_db_instance" "mydb" {
engine = "mysql"
engine_version = "5.6.40"
instance_class = "db.t1.micro"
name = "initial_db"
username = "example"
password = "1234"
allocated_storage = "20"
publicly_accessible = "true"
}
@MaG21
MaG21 / elgordino-hasura.tf
Created August 9, 2021 05:13 — forked from coco98/elgordino-hasura.tf
Terraform spec for Hasura on Fargate and RDS
provider "aws" {
region = "${var.region}"
}
### VPC
# Fetch AZs in the current region
data "aws_availability_zones" "available" {}
resource "aws_vpc" "datastore" {
cidr_block = "172.17.0.0/16"
@MaG21
MaG21 / vpc.tf
Created August 8, 2021 04:26 — forked from shaselton/vpc.tf
VPC template
# Rough Implementation of the pattern found here: https://medium.com/aws-activate-startup-blog/practical-vpc-design-8412e1a18dcc
provider "aws" {
region = "us-east-1"
}
# create a vpc
resource "aws_vpc" "shaselton" {
cidr_block = "10.0.0.0/16"
enable_dns_hostnames = true