sudo apt install net-tools
sudo apt install curl
sudo apt install python3-pip
Software & Updates > Additional Drivers
sudo apt install keepass2
sudo add-apt-repository ppa:obsproject/obs-studio
sudo apt install obs-studio
sudo apt install git
# tip: get lines of code in a particular language within a Git repository
git ls-files | grep '\.py$' | xargs wc -l
sudo apt install fonts-firacode
git clone --depth 1 --branch release https://github.com/adobe-fonts/source-code-pro.git ~/.fonts/adobe-fonts/source-code-pro
fc-cache -f -v ~/.fonts/adobe-fonts/source-code-pro
sudo add-apt-repository -u ppa:snwh/ppa
sudo apt update
sudo apt install paper-icon-theme
sudo apt install gnome-tweak-tool
Shotwell Photo Manager > Select Pictures > File > Set as Desktop Slideshow
Install Neovim
> sudo apt install neovim
sudo apt install tilix
curl -o ~/.config/tilix/schemes/Dracula.json --create-dirs https://raw.githubusercontent.com/dracula/tilix/master/Dracula.json
Switch to next session
shortcut with Alt+Right
Switch to previous session
shortcut with Alt+Left
Paste
shortcut with Ctrl+V
Resize the terminal down
shortcut with Shift+Ctrl+Down
Resize the terminal up
shortcut with Shift+Ctrl+Up
Resize the terminal right
shortcut with Shift+Ctrl+Right
Resize the terminal left
shortcut with Shift+Ctrl+Left
Ctrl+Alt+T
Ctrl+Alt+T
to Custom Shortcut for Launching TilixHide all normal windows
sudo apt install zsh
chsh -s $(which zsh)
gnome-session-quit
echo $SHELL
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
git clone https://github.com/denysdovhan/spaceship-prompt.git "$ZSH_CUSTOM/themes/spaceship-prompt"
ln -s "$ZSH_CUSTOM/themes/spaceship-prompt/spaceship.zsh-theme" "$ZSH_CUSTOM/themes/spaceship.zsh-theme"
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
echo "bindkey '^ ' autosuggest-accept" >> $ZSH_CUSTOM/autosuggestion-settings.zsh
source $ZSH_CUSTOM/autosuggestion-settings.zsh
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
curl https://pyenv.run | bash
sudo apt update && sudo apt install -y make build-essential libssl-dev zlib1g-dev \
libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev \
libncursesw5-dev xz-utils tk-dev libffi-dev liblzma-dev python-openssl git
pyenv install 3.8.3
pyenv install 3.7.7
pyenv local 3.8.3 3.7.7
curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python
source ~/.poetry/env
# new project
poetry init --no-interaction
poetry install
# run a Python session inside the virtual environment
poetry run python
# add & update a dependency
poetry add google-api-python-client
poetry update google-api-python-client
poetry add google-api-python-client^2.0 # upgrade to major release
sudo add-apt-repository ppa:longsleep/golang-backports
sudo apt update
sudo apt install golang-go
curl https://sh.rustup.rs -sSf | sh
source $HOME/.cargo/env
Note that the version number may differ:
# you might want to change the version
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.37.2/install.sh | bash
# list available versions
nvm ls-remote
# install desired version(s)
nvm install x.y.z
# use desired node version
nvm use x.y.z
# update npm
npm install npm@latest -g
npm config set init.author.name <name>
npm config set init.author.email <email>
sudo apt update
sudo apt install software-properties-common
sudo add-apt-repository ppa:ondrej/php
sudo apt install \
php7.3 \
php7.3-common \
php7.3-mysql \
php7.3-xml \
php7.3-xmlrpc \
php7.3-curl \
php7.3-gd \
php7.3-imagick \
php7.3-cli \
php7.3-dev \
php7.3-imap \
php7.3-mbstring \
php7.3-opcache \
php7.3-soap \
php7.3-zip \
php7.3-gmp \
php7.3-intl -y
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
php composer-setup.php --install-dir=/home/utku/.local/bin --filename=composer
composer global require "laravel/installer"
phpize
./configure --enable-xdebug
make clean
make
sudo make install
php.ini
. (You can locate your php.ini
by running the php --ini
command)
zend_extension="xdebug.so"
[XDebug]
xdebug.remote_enable = 1
xdebug.remote_autostart = 1
php -v | grep "Xdebug"
npm install -g eslint
)settings.json
keybindings.json
sudo add-apt-repository ppa:peek-developers/stable
sudo apt install peek
# 1. install ag
sudo apt install silversearcher-ag
# 2. install sack
git clone https://github.com/sampson-chen/sack.git && \
cd sack && \
chmod +x install_sack.sh && \
./install_sack.sh && \
cd .. && \
rm -rf sack
sudo apt install fd-find
sudo apt install bat
cargo install exa
sudo apt install icdiff
# 1. remove any older versions
sudo apt purge docker lxc-docker docker-engine docker.io
# 2. install prerequisites
sudo apt install apt-transport-https ca-certificates software-properties-common
# 3. import official GPG key & verify signature
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add
# 4. add docker respository
sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
# 5. install docker
sudo apt install docker-ce
# 6. verify service status
sudo systemctl status docker
# 7. create docker group & add your user
sudo groupadd docker
sudo usermod -aG docker $USER
Log out and login back.
# 8. verify that you can run this command without 'sudo'
docker run hello-world
# 9. install docker-compose 1.24.0 (better check newer versions)
sudo curl -L "https://github.com/docker/compose/releases/download/1.27.4/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
# 10. apply executable permission
sudo chmod +x /usr/local/bin/docker-compose
See cheatsheet for more info.
docker pull mysql:<tag>
# publish default port, provide a root password and start mysql
docker run --name <container_name> -p 3306:3306 -e MYSQL_ROOT_PASSWORD=<pwd> mysql:<tag>
# you can provide optional config params like max-allowed-packet
docker run --name <container_name> -p 3306:3306 -it -e MYSQL_ROOT_PASSWORD=<pwd> mysql:<tag> --max-allowed-packet=67108864
Run the MySQL Client
# check randomly generated password
docker logs <container_name> 2>&1 | grep GENERATED
# run the MySQL client within the MySQL Server container
docker exec -it <container_name> mysql -uroot -p
When prompted, paste the generated password obtained from the previous step.
Reset Root Password
ALTER USER 'root'@'localhost' IDENTIFIED BY '<new_password>';
# install client
sudo apt install mysql-client
# connect
mysql -h HOST -P PORT_NUMBER -u USERNAME -p
Backup & restore a particular database while MySQL container is running:
# backup
docker exec <mysql_container_name> mysqldump \
-u <username> --password=<password> <database_name> > <backup_file>.sql
# restore
cat <backup_file>.sql | docker exec -i <mysql_container_name> mysql \
-u <username> --password=<password> <database_name>
# backup & compress
docker exec <mysql_container_name> mysqldump \
-u <username> --password=<password> <database_name> | gzip -c > <backup_file>.sql.gz
# decompress & restore
gzip -d -c <backup_file>.sql.gz | docker exec -i <mysql_container_name> mysql \
-u <username> --password=<password> <database_name>
See cheatsheet for more info.
~/.ssh/authorized_keys
file in droplet.