Skip to content

Instantly share code, notes, and snippets.

@baikov
Created June 25, 2020 07:38
Show Gist options
  • Save baikov/63838f187bd8958d9bb71a920c60e049 to your computer and use it in GitHub Desktop.
Save baikov/63838f187bd8958d9bb71a920c60e049 to your computer and use it in GitHub Desktop.
# vim
# brew
brew update && brew upgrade
brew doctor
# virtualenv
source deactivate
source activate <env_name>
# venv in python 3.6+
python -m venv /path/to/new/virtual/<env_name>
source <env_name>/bin/activate
deactivate
# pyenv
pyenv versions
pyenv install
pyenv install <python_version>
pyenv uninstall <version>
pyenv local <version>
pyenv global <version>
pyenv virtualenv <python-version> <name>
pyenv activate <environment_name> / deactivate
# django
django-admin startproject <name>
# For new Debian
apt update && apt upgrade
ssh-copy-id username@remote_host
sudo apt install -y git sudo nginx vim wget curl zsh mosh tmux htop unzip zip gcc build-essential make tree redis-server libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev llvm libncurses5-dev libncursesw5-dev xz-utils tk-dev libffi-dev liblzma-dev python3-dev python-pil python3-lxml libxslt-dev python-libxml2 python-libxslt1 libffi-dev libssl-dev python-dev gnumeric libsqlite3-dev libpq-dev libxml2-dev libxslt1-dev libjpeg-dev libfreetype6-dev libcurl4-openssl-dev supervisor
adduser www
usermod -aG sudo www
ssh-copy-id www@remote_host
sh -c "$(wget -O- https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/themes/powerlevel10k
Set ZSH_THEME="powerlevel10k/powerlevel10k" in ~/.zshrc
source ~/.zshrc
cd /usr/local/src && curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash # install pyenv
# Install Docker in Debian 10
sudo apt update
sudo apt install apt-transport-https ca-certificates curl gnupg2 software-properties-common
curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/debian $(lsb_release -cs) stable"
sudo apt update
apt-cache policy docker-ce
sudo apt install docker-ce
sudo systemctl status docker
# Install oh-my-zsh
apt update && apt upgrade
apt install -y git vim wget curl zsh
sh -c "$(wget -O- https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/themes/powerlevel10k
or
git clone https://github.com/bhilburn/powerlevel9k.git ~/.oh-my-zsh/custom/themes/powerlevel9k
Set ZSH_THEME="powerlevel10k/powerlevel10k" in ~/.zshrc
or
ZSH_THEME="powerlevel9k/powerlevel9k"
# oh-my-zsh
upgrade_oh_my_zsh
# add SSH key in keychain
ssh-add -K ~/.ssh/id_rsa
ssh-copy-id username@remote_host
#Debian
sudo apt-get update
apt-get install -y vim mosh tmux htop git curl wget unzip zip gcc build-essential make
adduser www
usermod -aG sudo www
#login as www
su -
apt-get install sudo -y
sudo vim /etc/ssh/sshd_config
#AllowUsers www
#PermitRootLogin no
#PasswordAuthentication no
# Locales
sudo localedef ru_RU.UTF-8 -i ru_RU -fUTF-8
export LANGUAGE=ru_RU.UTF-8
export LANG=ru_RU.UTF-8
export LC_ALL=ru_RU.UTF-8
sudo locale-gen ru_RU.UTF-8
sudo dpkg-reconfigure locales
sudo apt-get install -y zsh tree redis-server nginx libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev llvm libncurses5-dev libncursesw5-dev xz-utils tk-dev libffi-dev liblzma-dev python3-dev python-pil python3-lxml libxslt-dev python-libxml2 python-libxslt1 libffi-dev libssl-dev python-dev gnumeric libsqlite3-dev libpq-dev libxml2-dev libxslt1-dev libjpeg-dev libfreetype6-dev libcurl4-openssl-dev supervisor
# Install firewall
apt install ufw
ufw allow OpenSSH
ufw allow 'Nginx Full'
#ufw allow http # ufw delete allow http
#ufw allow https
ufw enable
ufw status
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
chsh -s $(which zsh)
# Mac OS
defaults write com.apple.screencapture type jpg|png
killall SystemUIServer
# Parallels Tools for Linux
#Virtual Machine → Install Parallels Tools
umount /media/cdrom
sudo mount -o exec /media/cdrom
cd /media/cdrom
sudo ./install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment