Skip to content

Instantly share code, notes, and snippets.

#!/bin/sh
set -eo
echo "This script creates rsnapshot_root btrfs enabled. Pls edit me $(basename $0) before proceed."
exit 0
NAME=foo
FILE=/.$NAME.fs
FSIZE=1
DIR=/mnt/$NAME
KEYDIR=/root
logical=crsnapshot
@atrakic
atrakic / README.md
Created September 26, 2017 21:06 — forked from leonardofed/README.md
A curated list of AWS resources to prepare for the AWS Certifications


A curated list of AWS resources to prepare for the AWS Certifications

A curated list of awesome AWS resources you need to prepare for the all 5 AWS Certifications. This gist will include: open source repos, blogs & blogposts, ebooks, PDF, whitepapers, video courses, free lecture, slides, sample test and many other resources.

For more about AWS and AWS Certifications and updates to this Gist you should follow me @leonardofed


# __terraform__
export TF_LOG=info
alias tg-apply="terragrunt apply"
alias tg-apply-suni="terragrunt apply --terragrunt-source-update --terragrunt-non-interactive"
alias tg-apply-all="terragrunt apply-all"
alias tg-apply-all-suni="terragrunt apply-all --terragrunt-source-update --terragrunt-non-interactive"
alias tg-plan="terragrunt plan"
alias tg-plan-suni="terragrunt plan --terragrunt-source-update --terragrunt-non-interactive"
alias tg-plan-all="terragrunt plan-all"
server {
# ...
# apt-get install -y darkstat
location /d/ {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header Host $host;
proxy_pass http://127.0.0.1:666;
rewrite /d/(.*) /$1 break;
}
server {
# ...
# apt-get install -y bandwidthd
location /b/ {
alias /var/lib/bandwidthd/htdocs/;
}
}
upstream backend {
# the netdata server
server 127.0.0.1:19999;
keepalive 64;
}
server {
# ...
# bash <(curl -Ss https://my-netdata.io/kickstart.sh)
location /n/ {
# cd github.com
ls | xargs -P10 -I{} git -C {} stash
ls | xargs -P10 -I{} git -C {} pull
#!/usr/bin/python
import boto3
import argparse
parser = argparse.ArgumentParser(description='delete s3 bucket incl versions.')
parser.add_argument('-b','--bucket', help='s3 bucket name',required=True)
args = parser.parse_args()
BUCKET = args.bucket
print (BUCKET)
s3 = boto3.resource('s3')
aws s3 ls s3://$1 --recursive --human-readable --summarize
aws s3api list-buckets --query 'Buckets[*].Name'