Skip to content

Instantly share code, notes, and snippets.

@DaytonG
DaytonG / awsmfa.py
Last active November 28, 2020 18:49
Create a new token auth AWS session using an MFA device
#!/bin/env python3
"""
Create a new token auth AWS session using an MFA device.
Usage:
$(python3 awsmfa.py 123456)
You can also install this into your shell profile, like ~/.bashrc
```
setawsmfa() {
@lunny
lunny / diskinfo.go
Created March 28, 2014 08:59
Disk Info for Golang
package main
import (
"fmt"
"syscall"
)
type DiskStatus struct {
All uint64 `json:"all"`
Used uint64 `json:"used"`