Skip to content

Instantly share code, notes, and snippets.

@ambakshi
ambakshi / iam-assume-role.sh
Last active October 25, 2021 15:50
Assume an IAM role. An interesting way of doing IAM roles is to give the instance permissions to assume another role, but no actual permissions by default. I got this idea while setting up security monkey: http://securitymonkey.readthedocs.org/en/latest/quickstart1.html#setup-iam-roles.
#!/bin/bash
#
# Assume the given role, and print out a set of environment variables
# for use with aws cli.
#
# To use:
#
# $ eval $(./iam-assume-role.sh)
#
@pajp
pajp / cryptsync.sh
Created June 24, 2011 13:25
cryptsync - rsync a folder to an encrypted disk image
#!/bin/bash
# cryptsync.sh - a simple script for keeping an encrypted backup of a folder
#
# Author: Rasmus Sten <cryptsync@dll.nu>
#
# For example, to make an encrypted backup of my ~/Documents folder to Dropbox:
#
# ./cryptsync.sh --init ~/Documents/ ~/Dropbox/
#