Skip to content

Instantly share code, notes, and snippets.

View jorke's full-sized avatar
💭
is typing..

Jorke Odolphi jorke

💭
is typing..
View GitHub Profile
@jorke
jorke / thecleaner.sh
Created November 4, 2015 06:22
delete ec2 resources
#!/bin/bash
for s in $(aws ec2 describe-snapshots --owner-id self --output text | egrep SNAPSHOTS | cut -f6 -d$'\t'); do aws ec2 delete-snapshot --snapshot-id $s; done;
for i in $(aws ec2 describe-images --owners self --output text | egrep IMAGES | cut -f6 -d$'\t'); do aws ec2 deregister-image --image-id $i; done;
@jorke
jorke / ses.ps1
Created October 8, 2013 03:53
Send email via AWS SES using powershell one liner.
Send-MailMessage -From <from> -to <to> -subject <subject> -SmtpServer email-smtp.us-east-1.amazonaws.com -Credential
$(New-Object System.Management.Automation.PSCredential -argumentlist <AWS_ACCESS_KEY>,
$(ConvertTo-SecureString -AsPlainText -String <AWS_SECRET_KEY> -Force)
)
-UseSsl -Port 587