Skip to content

Instantly share code, notes, and snippets.

pahud /
Last active Jul 23, 2020
Update the capacity providers of your existing ECS clusters for Fargate
# 1. update your aws cli
# 2. update your existing cluster with capacity providers support
kawsark /
Created Mar 28, 2019
A guide for configuring Vault's SSH-CA

SSH CA use-case with Vault

In this scenario we are going to set up Vault to sign SSH keys using an internal CA. We will configure the SSH secrets engine and create a CA within Vault. We will then configure an SSH server to trust the CA key we just created. Finally we will attempt to SSH using a private key, and a public key signed by Vault SSH CA.


  • This guide assumes you have already provisioned a Vault server, SSH host using OpenSSH server, and a SSH client machine.
  • The client system must be able to reach the Vault server and the OpenSSH server.
  • We will refer to these systems respectively as:
nealey /
Last active Jun 6, 2020 — forked from robv8r/
List Docker Image Tags using Bourne shell (including Bash)
#! /bin/sh
image="$1"; shift
if [ -z "$image" ] || [ "$image" == "--help" ]; then
echo "Usage: $0 IMAGE"
echo "Prints all tags associated with IMAGE in a docker repository"
exit 1
DaisukeMiyamoto /
Created Sep 12, 2018
AWS Boto3 Assume Role example
import boto3
from boto3.session import Session
def assume_role(arn, session_name):
"""aws sts assume-role --role-arn arn:aws:iam::00000000000000:role/example-role --role-session-name example-role"""
client = boto3.client('sts')
account_id = client.get_caller_identity()["Account"]
jun06t / vault-golang-login
Created Jul 13, 2018
Golang Vault Login Sample
View vault-golang-login
package main
import (
magnetikonline /
Last active Jan 7, 2021
AWS CloudFormation YAML template - appending to list parameter types.

AWS CloudFormation YAML template - appending to list parameter types

Documenting this here, as I often forget (what I have found) is the best way to do this at the moment.

For example, you have a list of two existing security groups given to a stack and wish to create (and use) a third - attaching all to an ALB:

AWSTemplateFormatVersion: "2010-09-09"
Description: "Example template"

stevenringo /
Created Dec 3, 2017
Links to YouTube recordings of AWS re:Invent 2017 sessions

| Title | Description

astahlhofen /
Last active Dec 3, 2017
OpenHAB2 - Generic sleep timer

OpenHAB2 - Generic sleep timer

The following describes the necessary Functions and Procedures to create a small "Sleep Timer Library" for OpenHAB (Don't know, if Library is the correct title, but you know what I mean ;-)). Using this approach, it's easy for you to create your own custom sleep timers.

NOTE: This stuff doesn't depend on any add-on.

Usage example

The usage example does not cover initialization or recovery on system start and demonstrates a VERY BASIC example. But it's not very hard for you to integrate and customize it to your needs ;-)

1. Create a rule, e.g. inside the file SleepTimer.rules and paste in the following code.

tristanmorgan /
Last active May 1, 2019
HashiCorp Vault token-helper script using the Mac keychain.
set -e
[ -z "$VAULT_ADDR" ] && VAULT_ADDR=""
case $1 in
security add-generic-password -U -a "VAULT-$USER" -c "hvlt" -C "hvlt" -D "Hashicorp Vault" -s "$VAULT_ADDR" -w "$(cat)"
45413 / string-and-filename-manipulation.ps1
Last active Oct 20, 2020
Powershell String and Filename Manipulation
View string-and-filename-manipulation.ps1
# Working with a [System.IO.FileInfo] Object
## Get file object into variable
PS C:\DATA> $file = Get-ChildItem C:\DATA\test.xls
## Full path name
PS C:\DATA> $file.FullName
## Filename including extension
PS C:\DATA> $file.Name
You can’t perform that action at this time.