Skip to content

Instantly share code, notes, and snippets.

Avatar

Admir Trakic atrakic

  • pwnd
  • Copenhagen
View GitHub Profile
View create_btrfs_layout.sh
#!/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 Sep 26, 2017 — forked from leonardofed/README.md
A curated list of AWS resources to prepare for the AWS Certifications
View README.md


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


View .tf_alias.zsh
# __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"
View location_darkstat_nginx.conf
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;
}
View location_b_nginx.conf
server {
# ...
# apt-get install -y bandwidthd
location /b/ {
alias /var/lib/bandwidthd/htdocs/;
}
}
View netdata_nginx_location.conf
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/ {
View sync_git_repos.sh
# cd github.com
ls | xargs -P10 -I{} git -C {} stash
ls | xargs -P10 -I{} git -C {} pull
View aws_s3_delete_versions.py
#!/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')
View aws_s3_ls.sh
aws s3 ls s3://$1 --recursive --human-readable --summarize
View aws_s3_list_buckets.sh
aws s3api list-buckets --query 'Buckets[*].Name'