Skip to content

Instantly share code, notes, and snippets.

Avatar

Ajeya Vempati ajeya

  • Sydney, Australia
View GitHub Profile
@ajeya
ajeya / main.go
Created October 31, 2022 22:08 — forked from clarkmcc/main.go
Get all filenames inside an Golang embedded filesystem.
View main.go
func getAllFilenames(fs *embed.FS, path string) (out []string, err error) {
if len(path) == 0 {
path = "."
}
entries, err := fs.ReadDir(path)
if err != nil {
return nil, err
}
for _, entry := range entries {
fp := filepath.Join(path, entry.Name())
@ajeya
ajeya / README.md
Created July 30, 2021 11:27 — forked from Nokius/README.md
[Terraform][proxmox] small VM created with terraform on proxmox
View README.md

terraform-provider-proxmox

simple VM created with terraform-provider-proxmox

  • one core
  • 512MB RAM
  • Ubuntu netinstall CDROM
  • 32GB IDE HDD
  • bridged network interface
@ajeya
ajeya / keybase.md
Last active August 4, 2021 01:25
Keybase Proof
View keybase.md

Keybase proof

I hereby claim:

  • I am ajeya on github.
  • I am ajeya (https://keybase.io/ajeya) on keybase.
  • I have a public key ASDIxgOo3Mf9QwRfwk2LKwJIkxRKzO83roLPPmuL64M9jgo

To claim this, I am signing this object:

@ajeya
ajeya / load_dotenv.sh
Created June 28, 2020 21:27 — forked from mihow/load_dotenv.sh
Load environment variables from dotenv / .env file in Bash
View load_dotenv.sh
if [ ! -f .env ]
then
export $(cat .env | xargs)
fi
@ajeya
ajeya / gist:044a96430023befdfafcf910d352b2e4
Created March 31, 2020 01:44 — forked from doyle/gist:92b0b34cd4804d237ed9661e20e33e5d
Use curl to upload a file to a S3 pre-signed url
View gist:044a96430023befdfafcf910d352b2e4
curl -X PUT -T test_s3.txt -L "https://your-bucket.s3.amazonaws.com/url-stuff"
@ajeya
ajeya / assume_role.py
Created April 8, 2019 21:11 — forked from DaisukeMiyamoto/assume_role.py
AWS Boto3 Assume Role example
View assume_role.py
import boto3
from boto3.session import Session
def assume_role(arn, session_name):
"""aws sts assume-role --role-arn arn:aws:iam::00000000000000:role/example-role --role-session-name example-role"""
client = boto3.client('sts')
account_id = client.get_caller_identity()["Account"]
print(account_id)
@ajeya
ajeya / twilio.go
Created November 30, 2016 23:40 — forked from rickyrobinett/twilio.go
View twilio.go
package main
import (
"net/http"
"net/url"
"fmt"
"strings"
"io/ioutil"
"encoding/json"
)