I hereby claim:
- I am bruvio on github.
- I am bruvio (https://keybase.io/bruvio) on keybase.
- I have a public key ASASgWfYm_d4PHObVM5lCFXgOX6d7hKFa4NTiS6GpHu8OAo
To claim this, I am signing this object:
| import os | |
| import subprocess | |
| folder_path = '' | |
| for filename in os.listdir(folder_path): | |
| if filename.endswith(".txt"): | |
| file_path=os.path.join(folde_path,filename) | |
| output_path = os.path.splitext(file_path[0]) + ".mp3" | |
| print(f"input: {file_path}") |
| poetry to requirements.txt | |
| poetry export -f requirements.txt --output requirements.txt | |
| cat requirements.txt|xargs poetry add ##||==> to install requirements fils |
| terraform_install(){ | |
| local version=${1:-1.0.11} | |
| cwd=$PWD | |
| cd ~/Downloads | |
| wget https://releases.hashicorp.com/terraform/${version}/terraform_${version}_darwin_amd64.zip | |
| unzip -o terraform_${version}_darwin_amd64.zip | |
| VERSIONNUMBER=$( echo ${version} | tr '.' '_' ) | |
| echo "${VERSIONNUMBER}" | |
| mv terraform terraform_${VERSIONNUMBER} |
| RPROMPT="[%D{%f/%m/%y}|%D{%L:%M:%S}|]" |
| aws_login() | |
| { | |
| local profile=${1:-dev_admin} | |
| local enviroment=${2:-dev} | |
| aws sso login --profile ${profile} ; export AWS_PROFILE=${profile}; export ENV=${enviroment}; | |
| case ${enviroment} in | |
| dev) | |
| export account_id=1 | |
| ;; | |
| test) |
| # my awesome git log replacement | |
| alias glol='git log --graph --pretty=format:"%C(auto)%h%d%Creset %C(cyan)(%cr)%Creset %C(green)%cn <%ce>%Creset %s"' | |
| # same as above, but ISO date | |
| alias glog='git log --graph --pretty=format:"%C(auto)%h%d%Creset %C(cyan)(%ci)%Creset %C(green)%cn %Creset %s"' | |
| # using build-in standards | |
| alias glol2='git log --oneline --graph --decorate' | |
| # shows branches and their last commits | |
| alias glol3='git log --all --graph --decorate --oneline --simplify-by-decoration' |
| aws_cred() | |
| { | |
| local role=${1:-arn:aws:iam::xxxxx:role/yyyyyy} | |
| local rolesessionname=${2:-runner-promotion} | |
| creds_json=$(aws sts assume-role --role-arn ${role} --role-session-name ${rolesessionname}) | |
| export AWS_ACCESS_KEY_ID=$(echo "$creds_json" | jq .Credentials.AccessKeyId |tr -d '"') | |
| export AWS_SECRET_ACCESS_KEY=$(echo "$creds_json" | jq .Credentials.SecretAccessKey| tr -d '"') | |
| export AWS_SESSION_TOKEN=$(echo "$creds_json" | jq .Credentials.SessionToken|tr -d '"') | |
| export AWS_REGION=eu-west-2 | |
| cp /dev/null ~/.aws/credentials |
| aws_identity(){ | |
| aws sts get-caller-identity | |
| } |
| aws_login() | |
| { | |
| local profile=${1:-dev_admin} | |
| local enviroment=${2:-dev} | |
| aws sso login --profile $profile ; export AWS_PROFILE=$profile; export ENV=$enviroment | |
| } |
I hereby claim:
To claim this, I am signing this object: