This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/sh | |
# /etc/init.d/foobar | |
# The following part always gets executed. | |
echo "This part always gets executed" | |
# The following part carries out specific functions depending on arguments. | |
case "$1" in | |
start) | |
echo "Starting foobar" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git push origin $(git branch -r --merged origin/master | sed "s/origin\\//:/" | egrep -v "HEAD|master|dev") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function confirm () { | |
# call with a prompt string or use a default | |
read -r -p "${1:-Are you sure? [y/N]} " response | |
case $response in | |
[yY][eE][sS]|[yY]) | |
true | |
;; | |
*) | |
false | |
;; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#cloud-config | |
apt_update: true | |
apt_upgrade: false | |
apt_preserve_sources_list: true | |
packages: | |
- openjdk-7-jre-headless | |
- awscli | |
- git |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apt-get install gcc make libssl-dev | |
cd /usr/src | |
wget https://cache.ruby-lang.org/pub/ruby/2.2/ruby-2.2.6.tar.gz | |
tar -xvzf ruby-2.2.6.tar.gz | |
cd ruby-2.2.6 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for x in $(aws iam list-users --output text --query 'Users[*].UserName'); | |
do | |
echo "$x?" | |
read choice | |
case "$choice" in | |
y|Y ) echo $(aws iam update-login-profile --user-name $x --password-reset-required);; | |
n|N ) echo "no";; | |
* ) echo "invalid";; | |
esac | |
; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
terraform { | |
required_version = ">= 0.12" | |
} | |
# default region required. | |
provider "aws" { | |
region = "us-east-1" | |
} | |
provider "aws" { |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
OlderNewer