Skip to content

Instantly share code, notes, and snippets.

View Klaudioz's full-sized avatar

Claudio Canales Klaudioz

View GitHub Profile
#!/bin/bash
cd ~/chia-blockchain
. ./activate
plotman suspend all
chia stop -d all
deactivate
git fetch
git checkout latest
git reset --hard FETCH\_HEAD

Keybase proof

I hereby claim:

  • I am klaudioz on github.
  • I am klaud10z (https://keybase.io/klaud10z) on keybase.
  • I have a public key ASDslzMBPP8tuvIb4s4r7JPzMqEXSX2QXqlOuQ_7hRo4CAo

To claim this, I am signing this object:

2021-01-25 4h 23m
for region in `aws ec2 describe-regions --output text | cut -f3`
do
echo -e "\nListing Instances in region:'$region'..."
aws ec2 describe-instances --query "Reservations[*].Instances[*].{IP:PublicIpAddress,ID:InstanceId,Type:InstanceType,State:State.Name,Name:Tags[0].Value}" --output=table --region $region
done
#!/bin/bash
# Get list of S3 buckets from AWS and cleaning the output
s3_bucket_list=$(aws s3api list-buckets --query "Buckets[].Name" | sed -e 's/[][]//g' -e 's/”//g' -e 's/,//g' -e '/^$/d' -e 's/^[ \t]*//;s/[ \t]*$//' -e 's/"//g')
# Loop through the list of S3 buckets and tag them
for bucket in $(echo "$s3_bucket_list")
do
echo "Tagging: ${bucket}"
aws s3api put-bucket-tagging --bucket "$bucket" --tagging "TagSet=[{Key=aws-cost-explorer,Value=$bucket}]"

Keybase proof

I hereby claim:

  • I am klaudioz on github.
  • I am klaudioz (https://keybase.io/klaudioz) on keybase.
  • I have a public key ASDWhdnEFWhKQ5Um7OaVM71lpRX9ruBmnTd-YsP6mXCf5wo

To claim this, I am signing this object:

@Klaudioz
Klaudioz / git_examples.sh
Created October 8, 2019 17:39
Git commands needed at work
#!/bin/bash
##########
# contents
##########
# contents
# notes
# script setup
# git config files
@Klaudioz
Klaudioz / install-tensorflow.sh
Created September 30, 2016 21:40 — forked from erikbern/install-tensorflow.sh
Installing TensorFlow on EC2
# Note – this is not a bash script (some of the steps require reboot)
# I named it .sh just so Github does correct syntax highlighting.
#
# This is also available as an AMI in us-east-1 (virginia): ami-cf5028a5
#
# The CUDA part is mostly based on this excellent blog post:
# http://tleyden.github.io/blog/2014/10/25/cuda-6-dot-5-on-aws-gpu-instance-running-ubuntu-14-dot-04/
# Install various packages
sudo apt-get update