Skip to content

Instantly share code, notes, and snippets.

@shaiesto
shaiesto / redshift_md5pass.sh
Created November 6, 2018 14:14
One liner to create md5 for redshift user password.
sh -r <(base64 -D <<< IyEvYmluL3NoCnByaW50ZiAnJXMgJyAnVXNlcm5hbWU6JwpyZWFkIC1lIFVTRVJOQU1FCnByaW50ZiAnJXMgJyAnUGFzc3dvcmQ6JwpyZWFkIC1lcyBQQVNTV09SRApwcmludGYgJyVzJXMnICIkUEFTU1dPUkQiICIkVVNFUk5BTUUiIHwgbWQ1IHwgeGFyZ3MgcHJpbnRmICdtZDUlcycKcHJpbnRmICdcbicK)

Keybase proof

I hereby claim:

  • I am shaiesto on github.
  • I am andrer (https://keybase.io/andrer) on keybase.
  • I have a public key whose fingerprint is 0185 CAF2 3A3E 2017 8B6E CEA8 8B3F 7D90 EE49 9C22

To claim this, I am signing this object:

@shaiesto
shaiesto / awsSnapshot.sh
Created December 12, 2016 13:58
Take snapshots of aws instance based on the name tag.
#!/usr/bin/env sh
### aj@22seven.com
### script to snapshot aws instances based in instance name.
# Great big construct to remind me how it all works.
# Also happens to be a multiline self-documenting comment.
THIS=$(basename "$0" .sh)
DOCZ=$(cat <<-docz
AWS Instance snapshotter.\n\n
Usage: $THIS [-n | --name] {INSTANCE NAME}\n\n
-n --name The name of the instance to snapshot. Should be unique.\n
@shaiesto
shaiesto / aws-disable-termination-protection.sh
Last active July 11, 2018 08:32
aws ec2:disable termination protection on all stopped instances
#!/bin/bash
for i in $(aws ec2 describe-instances --query 'Reservations[?Instances.State.Name=='stopped'].Instances[].[InstanceId]' --output text); do
aws ec2 modify-instance-attribute --no-disable-api-termination --instance-id $i --dry-run
done

Keybase proof

I hereby claim:

  • I am shaiesto on github.
  • I am xox (https://keybase.io/xox) on keybase.
  • I have a public key whose fingerprint is 2B25 BCCA 6E45 66B7 E91E 390C F708 E500 CAE7 48B2

To claim this, I am signing this object: