Skip to content

Instantly share code, notes, and snippets.

View rymir's full-sized avatar
🏠
Working from home

Alexej Tessaro rymir

🏠
Working from home
View GitHub Profile

Coding Maxims

  • code is debt (and bad code is a unhedged call option)
    • cant have 0-days or bugs if I dont write any code
    • our users dont care about the code
    • every line of code has costs (your time, readability, maintainability, complexity)
      • its like owning a house with lots of rooms. its nice when your friends come over once a month, but you pay rent every day
    • dont add features unless you're sure it is necessary
    • dont optimize prematurely
@rymir
rymir / awsauth
Created April 23, 2017 18:28
A simple helper script to generate dynamic AWS credentials using vault, authenticating using LDAP
#!/bin/bash
#
# This script:
# - Authorises a user against vault using LDAP
# - Generates AWS Access keys
# - Sets AWS Access key environment variables in all known formats
# - Writes ~/.aws/credentials
#
export VAULT_ADDR="https://YOUR_VAULT_HOSTNAME:8200"