Skip to content

Instantly share code, notes, and snippets.

@ledovsky
Last active December 21, 2020 08:47
Show Gist options
  • Save ledovsky/8830427 to your computer and use it in GitHub Desktop.
Save ledovsky/8830427 to your computer and use it in GitHub Desktop.
My linux best practices #pinned
# Add to .bash_profile to get instructions from .bashrc
[[ -r ~/.bashrc ]] && . ~/.bashrc
# Change shell
chsh -s /bin/bash
# ssh tunel
ssh zoo -L 8001:localhost:8001 -N
# genereta ssh key
ssh-keygen -t rsa -b 4096 -C "your_email@example.com"
# Mac HDD formatting
diskutil
diskutil list
diskutil listFilesystems
diskutil eraseDisk {filesystem} {Name to use} /dev/{disk identifier}
# generate a timestamp string
date +%d-%m-%Y"_"%H_%M_%S
# du
sudo du -h -d 1 . | sort -h
# read .env file
export $(grep -v '^#' .env | xargs)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment