Skip to content

Instantly share code, notes, and snippets.

View pfandie's full-sized avatar
Kifflom!

Hans Mayer pfandie

Kifflom!
  • Germany
View GitHub Profile
@pfandie
pfandie / encrypt_decrypt.txt
Last active October 8, 2021 16:41
Encrypt and decrypt with kms key with AWS cli (with different profiles)
# How to encrypt/decrypt your text secret with AWS KMS in AWS cli
## NOTE: the encrypted string is only a dummy for documentation ;)
KMS_KEY="alias/aws_kms_key"
SECRET_STRING="super_safe_string"
PROFILE="my-aws-profile-to-use"
CIPHERTEXT_BLOB="1235jFCFui9IzEWhXSrkM5IQl6sQsveW3jlyQ/eEVvX0m6XFk8L25mFhMZX7UQeKm0mFFQM93I123456789HSaEd1WnrAL7Qirs7iQ1n2nEUkFn8tcoVZVMgxJq2Qpw2gn6qfv1th0BefRMKJU4uWSHdWYKfz8I63ezlErQF9uIMWVQkxtmhrSKjVfwbCFMP4IGl7SfsNwrH7G+XYaaVY+lBWmEfuCHHTD68GAvK5IGwkGUDEnzd36MkZz9+Eg9HDOdR9kZ2LgJkMeB9vYfDRKfZz+f9qsuwmdFAbVPd/i7v/sc82rH3BzbgGoXpKLvULCAqc1f6ZoMTtjGdpaaPOo3vRBGLvJJxHDHd18IuV+suwE9LUkO3wE1U68VhlGK81aj+snZ1zyBuUn2s7QCUDSSl2xtYXhne9oTtZlLoRwT7h7bCRsdUn7L8pEg6CwnPxIwrhMsTRcvkNNZrP6zXgpO+IbwqTyEO88eeKYulgZfJoDKSdBRe52oV0a3do0w9PXDw1/8eu1nS4IKxyrLzlYMvRVo5HxFT8cg1zIjQfu1vwgKUwB43GtS81DS0n/1234567891bQC8SNNYN1EGFojVRZfF7whkeoXToWqFrBQXRUZJR4ZXssH5/eSaHeEaq6uwPPm/1234567898/CO1jG3DMnzoT2OZgskzaeRaE="
# if not set in config use manual region
#REGION="eu-central-1"
@pfandie
pfandie / config
Created August 25, 2020 06:31
.ssh/config file
ForwardAgent yes
AddKeysToAgent yes
IdentityFile ~/.ssh/MY_PRIVATE_KEY
ForwardX11 yes
ForwardX11Trusted yes
TCPKeepAlive yes
ServerAliveInterval 60
ServerAliveCountMax 2
############## EXTERNAL EXAMPLE (AWS) ##############
@pfandie
pfandie / .gitconfig
Created August 25, 2020 06:35
gitconfig containing some helpful git commands (like pretty log output)
[user]
name = My git Username
email = my_email_address@example.com
[mergetool]
keepBackup = true
[branch]
autosetuprebase = remote
autosetupmerge = true
[advice]
pushNonFastForward = false
@pfandie
pfandie / docker_mac.md
Created September 22, 2020 14:35
get into docker vm on mac

screen $(cat ~/Library/Containers/com.docker.docker/Data/vms/0/tty) or ocker run -it --rm --privileged --pid=host justincormack/nsenter1