Skip to content

Instantly share code, notes, and snippets.

@evil5hadow
evil5hadow / sources.list
Created August 2, 2018 07:45
Ubuntu 18.04 Bionic default /etc/apt/sources.list
#deb cdrom:[Ubuntu 18.04 LTS _Bionic Beaver_ - Release amd64 (20180426)]/ bionic main restricted
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://us.archive.ubuntu.com/ubuntu/ bionic main restricted
# deb-src http://us.archive.ubuntu.com/ubuntu/ bionic main restricted
## Major bug fix updates produced after the final release of the
## distribution.
deb http://us.archive.ubuntu.com/ubuntu/ bionic-updates main restricted
@evil5hadow
evil5hadow / Documentation.md
Created July 9, 2018 14:51 — forked from KartikTalwar/Documentation.md
Rsync over SSH - (40MB/s over 1GB NICs)

The fastest remote directory rsync over ssh archival I can muster (40MB/s over 1gb NICs)

This creates an archive that does the following:

rsync (Everyone seems to like -z, but it is much slower for me)

  • a: archive mode - rescursive, preserves owner, preserves permissions, preserves modification times, preserves group, copies symlinks as symlinks, preserves device files.
  • H: preserves hard-links
  • A: preserves ACLs
@evil5hadow
evil5hadow / S3 buckets copy.md
Created May 21, 2018 15:41 — forked from ushu/S3 buckets copy.md
Copy between S3 buckets w/ different accounts

This is a mix between two sources:

basically the first resource is great but didn't work for me: I had to remove the trailing "/*" in the resource string to make it work. I also noticed that setting the policy on the source bucket was sufficient. In the end these are the exact steps I followed to copy data between two buckets on two accounts

Basically the idea there is:

  • we allowe the destination account to read the source bucket (in the console for the source account)
  • we log as the destination and start the copy
@evil5hadow
evil5hadow / gist:4c2f1c032743f978ad545df02ed54f83
Created April 13, 2018 13:07 — forked from calkan/gist:eaad0bc4458da16a72dd
Michael Hoffman's crazy bash_history backer upper on git
1 - Create a *private* GitHub/Bitbucket or similar git repo. Here I assume the repo is:
https://github.com/calkan/bash_history.git
2 - Create .history directory and initialize it for the repo:
mkdir $HOME/.history
cd $HOME/.history
git init
touch README.md