Skip to content

Instantly share code, notes, and snippets.

View anotherwally's full-sized avatar

Walter Gómez anotherwally

View GitHub Profile
@anotherwally
anotherwally / athena-s3-access-logs.sql
Created March 14, 2020 02:18
AWS S3 Access Logs Athena Template
create database s3_access_logs_db;
CREATE EXTERNAL TABLE IF NOT EXISTS s3_access_logs_db.mybucket_logs(
BucketOwner STRING,
Bucket STRING,
RequestDateTime STRING,
RemoteIP STRING,
Requester STRING,
RequestID STRING,
Operation STRING,
@anotherwally
anotherwally / treeView
Created June 18, 2017 03:36
Prints out the structure of current folder.
alias tree="find . -print | sed -e 's;[^/]*/;|____;g;s;____|; |;g'"
@anotherwally
anotherwally / git-delete-branches.sh
Created June 2, 2017 15:52
Delete all merged branches (locally and remotely)
# Deletes local branches have been merged with master or develop
git branch --merged | egrep -v "(^\*|master|develop)" | xargs git branch -d
# Delete remote branches
git branch -r --merged | awk -F'/' '/^ *origin/{if(!match($0, /(>|master)/)){print $2}}' | xargs git push origin --delete

1. Clone your fork:

git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream