Skip to content

Instantly share code, notes, and snippets.

View alivxlive's full-sized avatar
💭
our business is life itself

Alivx alivxlive

💭
our business is life itself
View GitHub Profile
# Connectiong by SSH from Android Termux to Desktop and vice-versa.md
# Copyright (c) 2019 Evandro Coan
# 
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
@alivxlive
alivxlive / prune-log-stream.sh
Created October 6, 2019 11:50 — forked from holstvoogd/prune-log-stream.sh
Removes empty log streams from a given log group
#!/bin/bash
loggroup=$1
dryrun=$2
if [[ -z $loggroup || $loggroup == '--dryrun' ]]; then
echo "Usage: $0 LogGroup [--dryrun]"
exit 1
fi
@alivxlive
alivxlive / audit.rules
Created August 26, 2019 07:10 — forked from Neo23x0/audit.rules
Linux Auditd Best Practice Configuration
# IMPORTANT!
# This gist has been transformed into a github repo
# You can find the most recent version there:
# https://github.com/Neo23x0/auditd
# ___ ___ __ __
# / | __ ______/ (_) /_____/ /
# / /| |/ / / / __ / / __/ __ /
# / ___ / /_/ / /_/ / / /_/ /_/ /
# /_/ |_\__,_/\__,_/_/\__/\__,_/
@alivxlive
alivxlive / AWSRegionsAndAZs.md
Created December 5, 2018 10:06
List of AWS availability zones for each AWS region
AWS region code AWS region name Number of AZs AZ names
us-east-1 Virginia 4 us-east-1a, us-east-1b, us-east-1c, us-east-1e
us-west-1 N. California 2 us-west-1a, us-west-1b
us-west-2 Oregon 3 us-west-2a, us-west-2b, us-west-2c
eu-west-1 Ireland 3 eu-west-1a, eu-west-1b, eu-west-1c
eu-central-1 Frankfurt 2 eu-central-1a, eu-central-1b
ap-southeast-1 Singapore 2 ap-southeast-1a, ap-southeast-1b
ap-southeast-2 Sydney 2 ap-southeast-2a, ap-southeast-2b, ap-southeast-2c
ap-northeast-1 Tokyo 2 ap-northeast-1a, ap-nort
@alivxlive
alivxlive / resolving_dns_issues.txt
Created November 27, 2018 13:07 — forked from kvz/resolving_dns_issues.txt
Amazon resolving DNS issues
root@cuc:~# grep nameserver /etc/resolv.conf
nameserver 172.16.0.23
root@cuc:~# time ssh git@github.com
ssh: Could not resolve hostname github.com: Temporary failure in name resolution
real 0m40.043s
user 0m0.000s
sys 0m0.008s
@alivxlive
alivxlive / git-clearHistory
Created October 10, 2018 11:48 — forked from stephenhardy/git-clearHistory
Steps to clear out the history of a git/github repository
-- Remove the history from
rm -rf .git
-- recreate the repos from the current content only
git init
git add .
git commit -m "Initial commit"
-- push to the github remote repos ensuring you overwrite history
git remote add origin git@github.com:<YOUR ACCOUNT>/<YOUR REPOS>.git
@alivxlive
alivxlive / generate-ssh-key.sh
Created September 21, 2018 02:06 — forked from grenade/01-generate-ed25519-ssh-key.sh
Correct file permissions for ssh keys and config.
ssh-keygen -t rsa -b 4096 -N '' -C "rthijssen@gmail.com" -f ~/.ssh/id_rsa
ssh-keygen -t rsa -b 4096 -N '' -C "rthijssen@gmail.com" -f ~/.ssh/github_rsa
ssh-keygen -t rsa -b 4096 -N '' -C "rthijssen@gmail.com" -f ~/.ssh/mozilla_rsa