Skip to content

Instantly share code, notes, and snippets.

@brianredbeard
brianredbeard / get_token.md
Last active October 3, 2022 02:18
aws, sts, and bash

About

AWS provides a mechanism for temporarily assuming another role within their API system. While it is not a technically hard process it can be convoluted and hard to understand. This document aims to both make it easier to follow along with as well as give an in depth explanation of some of the underpinnings of the Bourne Again Shell (aka BASH) which can make this easier to utilize on a day to day basis.

Explanation

Below is an overexplained version of the following process:

  1. Using credentials stored in ~/.aws/credentials as a "profile" which are then understood by the AWS command line tools
  2. Using those AWS credentials, temporarily assume a role using the AWS Security Token Service (STS) to get temporary
@xdite
xdite / growth-hack.md
Created May 7, 2015 21:15
growth-hack.md
  • What is Growth Hack
  • Customer Life Cycle
  • Landing Page
    • What is Landing Page
    • Different types of Landing Page
    • Copywriting
    • Headline
    • Tagline
    • Resource
  • Unbounce.com
anonymous
anonymous / cmk-add-host
Created October 16, 2013 14:12
Check MK add host script in bash
#!/bin/bash
site=$1; shift
hostname=$1; shift
mk_file="/opt/omd/sites/$site/etc/check_mk/conf.d/wato/hosts.mk"
wato_file="$(dirname $mk_file)/.wato"
## exit with code 1 if host exists
(
@n8v
n8v / check_tap.pl
Created June 2, 2011 21:49
Nagios Plugin for checking Test Anything Protocol (TAP) output
#!/usr/local/bin/perl
### check_tap.pl
# By Nathan Vonnahme, n8v at users dot sourceforge dot net, June 2 2011
# Allows Nagios to check the output of anything that emits Test Anything
# Protocol.
# See http://en.wikipedia.org/wiki/Test_Anything_Protocol