Skip to content

Instantly share code, notes, and snippets.

View ben-bourdin451's full-sized avatar

Ben Bourdin ben-bourdin451

View GitHub Profile
@ben-bourdin451
ben-bourdin451 / golangci.yaml
Last active August 23, 2021 15:13
golangci
linters-settings:
depguard:
list-type: blacklist
packages:
# logging is allowed only by logutils.Log, logrus
# is allowed to use only in logutils package
- github.com/sirupsen/logrus
packages-with-error-message:
- github.com/sirupsen/logrus: "logging is allowed only by logutils.Log"
dupl:
@ben-bourdin451
ben-bourdin451 / production_checklist.md
Last active September 20, 2020 17:55
Production ready checklist

Production ready checklist

[] Application logs are streamed and available in a different service
[] Logs are rotated & expired appropriately
[] Continuous integration pipeline builds & runs tests for every commit
[] Continuous deployment pipeline make deployment of any tagged version a single click
[] Service has been deployed and tested in multiple environments with minimal configuration changes

@ben-bourdin451
ben-bourdin451 / aws_mfa.sh
Created July 2, 2018 13:20
Bash script to refresh session tokens for assuming roles that require MFA
#!/bin/bash
read -p 'MFA Token: ' mfavar
line=$(aws sts get-session-token --profile $AWS_IDENTITY_ACCOUNT --serial-number $MFA_SERIAL --token-code $mfavar --output text)
echo $line | awk 'BEGIN {FS=" "}; {printf("[default]\naws_access_key_id=%s\naws_secret_access_key=%s\naws_session_token=%s\n#expiry %s",$2,$4,$5,$3)}' > ~/.aws/credentials