Skip to content

Instantly share code, notes, and snippets.

Sean Smith wwsean08

Block or report user

Report or block wwsean08

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View sample_wasm.go
func sendMessage(_ js.Value, _ []js.Value) interface{} {
doc := js.Global().Get("document")
msg := doc.Call("getElementById", "message").Get("value").String()
user := doc.Call("getElementById", "username").Get("value").String()
doc.Call("getElementById", "message").Set("value", "")
println(user, msg)
location := js.Global().Get("window").Get("location")
scheme := "ws"
if location.Get("protocol").String() == "https:" {
@wwsean08
wwsean08 / ami_prune.py
Last active Aug 25, 2017
A lambda function that can be used to prune AMIs based on how old they are
View ami_prune.py
from __future__ import print_function
import os
import boto3
from datetime import datetime, timedelta
from dateutil.parser import parse
THRESHOLD = int(os.getenv('threshold_days', 30))
ENABLE_DELETE = os.getenv('enable_delete', False)
REGION = os.getenv('region', 'us-east-1')
You can’t perform that action at this time.