Linux Network Settings

IP Configuration

Clear the configuration file.

sudo cat /dev/null > /etc/network/interfaces

Edit configuration file with appropriate settings.

Restart networking service.

sudo service networking restart

Static IP

auto lo eth0
iface lo inet loopback
iface eth0 inet static
    address 192.168.0.2
    netmask 255.255.255.0
    network 192.168.0.0
    broadcast 192.168.0.255
    gateway 192.168.0.1
    dns-nameservers 8.8.8.8

Dynamic IP

auto lo eth0
iface lo inet loopback
iface eth0 inet dhcp

VLAN Configuration

sudo apt-get install -y vlan
auto lo eth0.10 eth0.20
iface lo inet loopback
iface eth0.10 inet static
    address 192.168.0.2
    netmask 255.255.255.0
    network 192.168.0.0
    broadcast 192.168.0.255
    gateway 192.168.0.1
    dns-nameservers 8.8.8.8
iface eth0.20 inet static
    address 192.168.1.2
    netmask 255.255.255.0
    network 192.168.1.0
    broadcast 192.168.1.255

Linux CLI

Files/Directories

Directories

Files

Text

Processes

Access Rights

For all of the chrgrp and chown commands below: -r — recursive change.

Device Mounting

Network

Administration

User Administration

Package Management (Debian)

Fedora

Ubuntu/Debian

Variables

HTTP

Patches

Conversion

Miscellaneous


Initial Linux Configuration

Setup SSH Access From One Computer to Another Without Passwords

EMAIL="[email]"
PORT="[port]"
USERNAME="[username]"
IP="[ip]"
ssh-keygen -t rsa -C "$EMAIL" -f ~/.ssh/id_rsa -N ""
ssh-copy-id -i ~/.ssh/id_rsa.pub "-p $PORT $USERNAME@$IP"

Run Sudo Commands Without Password Request

USERNAME="[username]"
sudo su
echo "$USERNAME ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers

Set a DNS Server

sudo nano /etc/resolv.conf
nameserver [ip]

Enable Password Authentication Through SSH

sudo nano /etc/ssh/sshd_config

Change PasswordAuthentication and ChallengeResponseAuthentication to yes.

service ssh restart

Ubuntu Installation

Ubuntu Installation Using a Flash Drive

How to create a bootable USB stick

Ubuntu Installation on a VM

How to install Ubuntu on a VM


MySQL

Reset Root Password

sudo service mysql stop
sudo mysqld --skip-grant-tables &
mysql -u root mysql
UPDATE user SET Password=PASSWORD('[password]') WHERE User='root';
FLUSH PRIVILEGES;

Administer Users

[ip] can be an ip address, host name and % can be used as a wildcard.

CREATE USER '[user]'@'[ip]' IDENTIFIED BY '[password]';
DROP USER '[user]'@'[ip]';

Open Access

Instead of [db] and [table] can be *, which means any.

[privilege] can be ALL, USAGE, SELECT, etc.

You can optionally add WITH GRANT OPTION to the GRANT command for the user to be able to grant permissions.

See details .

GRANT [privilege] ON `[db]`.`[table]` TO '[user]'@'[ip]'
GRANT [privilege] ON *.* to '[user]'@'[ip]'
SHOW GRANTS for '[user]'@'[ip]';
REVOKE [privilege] ON *.* FROM '[user]'@'[ip]';
FLUSH PRIVILEGES;

Create a new DB

CREATE DATABASE `[name]` CHARACTER SET utf8 COLLATE utf8_general_ci;

Open Access to External Users

mysql -uroot -p[password] -e "GRANT ALL ON *.* to root@'%' IDENTIFIED BY '[password]' WITH GRANT OPTION; FLUSH PRIVILEGES;"
sed -i 's/127.0.0.1/0.0.0.0/g' /etc/mysql/my.cnf
service mysql restart

Encoding

Check the Encoding

For a DB

SELECT default_character_set_name FROM information_schema.SCHEMATA WHERE schema_name = "[db_name]";

For Tables

SELECT CCSA.character_set_name FROM information_schema.`TABLES` T,
  information_schema.`COLLATION_CHARACTER_SET_APPLICABILITY` CCSA
WHERE CCSA.collation_name = T.table_collation
  AND T.table_schema = "[db]"
  AND T.table_name = "[table]";

For Columns

SHOW FULL COLUMNS FROM [table_name];

Change Collation for a DB

ALTER DATABASE [db] CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE [table] CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci;

Add Timezone Info to a DB

mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -D mysql -u root -p
mysql -u root -p -e "flush tables;"

Linux Tips

Run Programs for X Server

sudo apt-get install xvfb
sudo Xvfb :10 -ac
export DISPLAY=:10

Tmux

# Create new session
tmux new -s [session-name]
# List session
tmux ls
# Attach session
tmux attach-session -t [session-number/session-name]

Install telnet on Alpine

apk add busybox-extras

Install ps on Ubuntu/Debian

sudo apt install procps

Fix Locales

export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8
export LANGUAGE=en_US.UTF-8

VirtualBox

Enable auto time synchronization with host

vboxmanage setextradata [vbox] "VBoxInternal/Devices/VMMDev/0/Config/GetHostTimeDisabled" "1"

Oh My Zsh

Command Description
alias List all aliases
take Create a new directory and change to it, will create intermediate directories as required
exec zsh Apply changes made to .zshrc

Fix Broken sudoers File

Run this:

pkexec visudo

Bash

A Good Way to Start a Bash Script

#!/bin/bash

set -eou pipefail

See details in the docs — The Set Builtin .


PostgreSQL

Main Commands

Copy a DB

CREATE DATABASE [db2] WITH TEMPLATE [db1] OWNER [user];

Commands

Connect to a DB

sudo -u postgres psql "user='[user]' password='[password]' host='[localhost]' port='[port]' dbname='[db]'"

Create a New DB

sudo -u postgres createdb -O [user] --encoding='utf-8' --locale=en_US.utf8 [db]

Run Command

sudo -u postgres psql "user='postgres' password='[password]' host='localhost' port='5432' dbname=[db]" -c "CREATE EXTENSION postgis";

Import DB Dump

sudo -u postgres psql "user='postgres' password='[password]' host='localhost' port='5432' dbname=[db]" -f [file]

Create a DB From Template

sudo -u postgres createdb -O [user] --encoding='utf-8' --locale=en_US.utf8 -T [db] [db2]

Activate Correct Encoding

SET client_encoding = 'UTF8';

Open Access

echo 'host all all [subnet] trust' >> /etc/postgresql/9.1/main/pg_hba.conf

listen_addresses='[ip]'

service postgresql restart

Git

Basics

Label Description
master Default branch
origin Upstream repository by default
HEAD Current branch
HEAD^ Parent branch of the current branch
HEAD~[N] N-th parent of the current branch. Also HEAD~~ is the same as HEAD~2
ORIG_HEAD Previous state of HEAD

Commands

Rebase, cherry-pick and merge commands all have the following arguments:

Main

Command Description
git init [project] Initialize a project
git merge [branch] Merge branch
git pull Pull
git push Push
git push -f Force push
git status Show the working tree status
git revert [commit] Revert a commit
git cherry-pick [commit] Add a commit
git push --delete origin [tag] Delete a tag from origin

Miscellaneous

Command Description
git remote add origi­n git@g­ithub.com:[user]/[project].git Set origin
git rm [file] Remove file from the working tree and from the index
git mv [file-original] [file-moved] Move a file
git merge-base [branch1] [branch2] Find as good common ancestors as possible for a merge
git reflog Manage reflog information

Show

Command Description
git show [commit] Show commit changes
git show :1:[file] > [file-common] On merge conflicts, save common ancestor to file-common
git show :2:[file] > [file-current] On merge conflicts, save current changes to file-current
git show :3:[file] > [file-other] On merge conflicts, save changes of the other branch to file-other

Clone

Command Description
git clone [url] Clone a repository
git clone [url] [dir] Clone a repository to a dir

Branch

Command Description
git branch List all local branches
git branch -r List all remote branches
git branch -a List all local and remote branches
git branch -D [branch] Delete a branch
git branch -m [branch] Rename the current branch to branch
git branch [branch] Create a new branch

Switch/Checkout

Command Description
git switch [branch] / git checkout [branch] Switch to a branch
git switch -c [branch] / git checkout -b [branch] Create a new branch and switch to it
git checkout -b [new-branch] [existing-branch] Create a new branch from existing-branch and switch to it

Log

Command Description
git log Show commit logs
git log --oneline Show logs in a one-line format with shortened commit SHAs
git log --follow [file] Continue listing the history of a file beyond renames
git log --all --full-history -- [file] Show history for a file even if it was deleted
git log -n [N] Show logs for N last commits
git log --grep="[pattern]" Limit the commits output to ones with log message
that matches the specified pattern (regular expression)
git log --author="[pattern]" Limit the commits output to ones with author/committer
header lines that match the specified pattern (regular expression).
git log [commit1]..[commit2] Show logs between commit1 and commit2

Diff

Command Description
git diff Show changes you made in the working tree
git diff --staged View the changes you staged
git diff [branch1/commit1] [branch2/commit2] Show diff between 2 branches or commits
git diff --word-diff [commit1] [commit2] --unified=0 Show a word diff and hide context

Add

Command Description
git add . Stage all files
git add -i Add modified contents in the working tree interactively to the index.
Optional path arguments may be supplied to limit operation to a subset of the working tree.
git add -N [file] Record only the fact that the path will be added later.
An entry for the path is placed in the index with no content.

Reset/Checkout

Command Description
git restore [file] / git checkout -- [file] Removes all changes to file
git reset --hard / git checkout -f Remove all changes to the last commit

Reset

Command Description
git reset Unstage all files
git reset --merge ORIG_HEAD Cancel a previous merge
git reset [file] Unstage file
git reset [commit] Reset to commit
git reset [commit] --hard Reset to commit and remove all changes after this commit

Reset

Command Description
git rebase [branch] Reapply commits on top of branch
git rebase -i [branch] Interactive rebase

Clean

Command Description
git clean -n List files which would be deleted by the command below
git clean -f Delete untracked files

Commit

Command Description
git commit Commit
git commit -m"[message]" Commit with a message
git commit -a Commit all changed files except for untracked files. Also, delete deleted files
git commit --amend Amend a commit (with staged files)
git commit --amend --no-edit Amend a commit without changing the commit message
git commit --amend --author="[Name] <[email]>" Change the author of previous commit

Commit

Command Description
git stash Stash changes
git stash pop Pop the last stashed changed
git stash pop [stash] Pop the changes from stash
git stash apply [stash] Apple the changes from stash
git stash list List stashes
git stash drop [stash] Drop stash
git stash show [stash] Show stash changes
git stash clear Clear all stashes

Blame

Command Description
git blame [file] Show what revision and author last modified each line of a file
git blame -L [line-start],[line-end] [file] Annotate only the line range given by line-start, line-end

Ls-files

Command Description
git ls-files --other --ignored --exclude-standard List all ignored files
git ls-files -v | grep "^[[:lower:]]" Get a list of files marked with --assume-unchanged

Update-index

Command Description
git update-index --assume-unchanged [file] Ignore file without adding it go .gitignore
git update-index --no-assume-unchanged [file] Remove --assume-unchanged mark for a file

Update-index

Command Description
git update-index --assume-unchanged [file] Ignore file without adding it go .gitignore

Submodules

Initiate Submodules and Load Them

git submodule init
git submodule update

How to Add a Submodule

git submodule add http://github.com/[username]/[repo].git my/path

How to Remove a Submodule

Delete the relevant section from the .gitmodules file

git add .gitmodules

Delete the relevant section from .git/config

git rm --cached [path-to-submodule]  # (no trailing slash)
rm -rf .git/modules/[path-to-submodule]
git commit -m "Removed submodule [name]"
rm -rf [path-to-submodule]

How to Update Branch With Upstream

git remote add upstream https://github.com/[user]/[project].git
git fetch upstream
git checkout master
git rebase upstream/master

Tips

Ignore Files Without Adding Them to .gitignore

Edit file .git/info/exclude

Ignore Files Only in Diff Command

Create a repository specific diff driver:

# in Linux
TRUE=/bin/true
# in macOS
TRUE=/usr/bin/true

git config diff.nodiff.command $TRUE
# Assign the new diff driver to those files you want to be ignored
FILE="[file]"
echo "$FILE diff=nodiff" >> .git/info/attributes

Remove Data From Repository’s History

Removing sensitive data from a repository


Python Modules Installation

Python

Create a requirements.txt file with the following format:

Django==2.0.2
mysql-python>=1.0
-e git+https://github.com/desecho/django-tqdm@1.0.3.git#egg=django-tqdm
# comment

Install using command:

pip install -r requirements.txt

Reference Materials for Web Development and Programming

Misc

GitHub

Git

Web Development

Coding

Python

Django

CSS

Regular Expressions

Coding Games/Challenges

Miscellaneous

Books


Development Tools

Web

macOS, Linux, and Windows Apps

DB

Editors

Virtual Machines

Utils

Source Control Management

macOS and Windows Apps

Source Control Management

macOS Apps

Source Control Management

DB


Documentation & Styleguides

Styleguides

Python

Frontend

JavaScript

HTML/CSS

URL

SASS

Documentation

JavaScript

Python

Sass


macOS Apps

Homebrew

Video

Games

Utils


Editors Tips

VS Code

Tips

Disable Hardware Acceleration

Sublime Text

Sublime Text

Settings

Project Settings Example

{
  "folders": [
    {
      "path": "[project_path]",
      "folder_exclude_patterns": ["[project_exclude_path]"],
      "file_exclude_patterns": ["[*.txt]"]
    }
  ]
}

Tips

Edit Current Projects in the Switch Project List

Edit workspaces: ~/Library/Application Support/Sublime Text 3/Local/Session.sublime_session.

Enable Middle Mouse Button Support in Ubuntu

nano ~/.config/sublime-text-3/Packages/User/Default\ \(Linux\).sublime-mousemap
[
  // Mouse button 3 column select
  {
    "button": "button3",
    "press_command": "drag_select",
    "press_args": { "by": "columns" }
  },
  {
    "button": "button3",
    "modifiers": ["ctrl"],
    "press_command": "drag_select",
    "press_args": { "by": "columns", "additive": true }
  },
  {
    "button": "button3",
    "modifiers": ["alt"],
    "press_command": "drag_select",
    "press_args": { "by": "columns", "subtractive": true }
  }
]

Installation of Services on Linux

Install a Service

Create file /etc/systemd/system/[name].service with contents:

[Unit]
Description=[Service Name]
After=syslog.target

[Service]
ExecStart=[command]
Restart=always
RestartSec=5s
KillSignal=SIGQUIT

[Install]
WantedBy=multi-user.target

Run

chmod 644 /etc/systemd/system/[name].service
systemctl daemon-reload

Samba

sudo apt-get install samba
sudo smbpasswd -a [user] # Set a password for your user in Samba
sudo nano /etc/samba/smb.conf

Add this to the end of the file:

[[name]]
path = [path]
available = yes
valid users = [user]
read only = no
browseable = yes
public = yes
writable = yes
sudo restart smbd

Stunnel4

Stunnel allows old devices which don’t support SMTP connections through SSL to support them.

sudo apt-get install stunnel4

sudo sed -i 's/ENABLED=0/ENABLED=1/g' /etc/default/stunnel4

openssl req -new -out mail.pem -keyout mail.pem -nodes -x509 -days 365
# (Common name - domain name)

sudo mv ~/mail.pem /etc/ssl/certs/mail.pem

sudo cp /usr/share/doc/stunnel4/examples/stunnel.conf-sample /etc/stunnel/stunnel.conf
sudo nano /etc/stunnel/stunnel.conf

Change:

cert = /etc/ssl/certs/mail.pem
sslVersion = all

Add config (for example):

[yandex-smtp]
client = yes
accept = 0.0.0.0:25
connect = smtp.yandex.ru:465

Web Development

JavaScript

jQuery

Add jQuery Through the Console

var jq = document.createElement("script");
jq.src = "https://code.jquery.com/jquery-3.6.0.min.js";
document.getElementsByTagName("head")[0].appendChild(jq);

Give time for script to load, then enter

jQuery.noConflict();

Python

Helpful Command to Clean Cache Files if Anything Behaves Strangely

find . -name "*.pyc" -exec rm -rf {} \;

Kill Debugger

import os; os.system("kill -9 %d" % os.getpid())

Django

Management Commands

Data Migration Example

from django.db import migrations

def action(apps, schema_editor):
    [Model] = apps.get_model("[app]", "[Model]")

class Migration(migrations.Migration):
    dependencies = [
        ("[app]", "0001_initial"),
    ]

    operations = [
        migrations.RunPython(action),
    ]

Data Migration Example to Load Fixtures

from django.db import migrations
from django.core.management import call_command


def load_fixture(apps, schema_editor):
    # File name.json in fixtures dir
    call_command("loaddata", "[name]", app_label="[app]")


class Migration(migrations.Migration):

    dependencies = [
        ("[app]", "0001_initial"),
    ]

    operations = [
        migrations.RunPython(load_fixture)
    ]

How to Setup Internalization

Add to settings:

from django.utils.translation import ugettext_lazy as _
from os.path import dirname, join
SRC_DIR = dirname(dirname(abspath(__file__)))

LANGUAGES = (
    ("en", _("English")),
    ("ru", _("Russian")),
)

LOCALE_PATHS = (join(SRC_DIR, "locale"),)

TEMPLATES = [
    {
        "OPTIONS": {
            "builtins": ["django.templatetags.i18n"],
        },
    },
]

Add to templates:

{% trans 'text' %}
{% blocktrans %}Back to '{{ race }}' homepage{% endblocktrans %}

To create/update necessary .po files:

python manage.py makemessages -a

Install django-rosetta

You can then access your translations here — /rosetta

JavaScript

To create/update necessary .po files:

python manage.py makemessages -a -d djangojs

Add to urls.py

from django.views.i18n import JavaScriptCatalog

    url(r"^jsi18n/$",
        JavaScriptCatalog.as_view(packages=("moviesapp", ), domain="djangojs"),
        name="javascript-catalog"),

urlpatterns += [
    url(r"^jsi18n/$",
        JavaScriptCatalog.as_view(packages=("[app]", ), domain="djangojs"),
        name="javascript-catalog"),
]

Add to templates before any js code:

<script src="{% url 'javascript-catalog' %}"></script>

If you also need access to the language in js add:

{% get_current_language as LANGUAGE_CODE %}
<script>
  var language = "{{ LANGUAGE_CODE }}";
</script>

To use:

gettext("this is to be translated");

Additional info in django docs

Py.test

pytest.ini
[pytest]
DJANGO_SETTINGS_MODULE = app.settings
python_files = test_*
addopts = --nomigrations --reuse-db
Installation
pip install pytest-django
Usage

Documentation

Services for Your Projects


macOS Tips

Installation

Do not format your drive as a case-sensitive partition. You won’t be able to run applications like Steam or Photoshop.

macOS Setup Guide .

Connect to a Windows Share Network Host

Remove Duplicates in “open with”

/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -kill -r -domain local -domain system -domain user

View Sleep/Wake Log

pmset -g log | grep -e " Sleep  " -e " Wake  "

Reindex Spotlight Index

sudo mdutil -E /
sudo mdutil -i on /

How to Wipe Your Mac & Reset to Factory Settings


iOS Apps

Apps marked with * are to be installed on the device initially.

Gaming

Weather

Banking

Internet

Health & Fitness

Lifestyle

Calculators

Messengers

Social

TV

Images

Utils

TV

Food & Drinks

Miscellaneous

Shopping

Package tracking

Canada

Utilities

Travelling

Montreal

Taxi

Points

Shopping

Food & Drinks

Banking

Health

Russia

Transport & Delivery

Food & Drinks

Health & Fitness


Windows Apps

Communication

Games

Cloud Storage

Steam

Media

Utils

Graphics


iOS & iPadOS Setup

Settings

Configure Settings after installing 1Password, Chrome, Yelp, Uber, and Authy.

Section 1

Section 2

Section 3

Section 4

Section 5

Section 6

Section 7


Windows Tips

Windows Configuration

Download and install Windows Update

Settings

System

Personalization

BackgroundChoose your picture

Accounts

Your infoCreate your pictureBrowser for oneChoose your avatar

Misc

Install Posy’s Improved Cursors

Posy’s improved cursors

Software Configuration

NordVPN

Open Settings:

Google Chrome

chrome://settings/On startupContinue where you left off.

Games

Steam

Open SteamSettings:

Ubisoft Connect

Open Settings:

GOG Galaxy

Open SettingsDownloads:

Usage Tips

Add a Custom Host

Run System File Checker

Run Command Promptsfc /scannow

Run chkdsk

Run Command Promptchkdsk /f /x /r [disk]:

Boost Microphone

Install Equalizer APO

Run it. The Configurator will ask you to select the devices for which the program is to be installed, go to “Capture devices” and select the microphone. Reboot if asked.

Install Peace Equalizer, interface Equalizer APO

Run it. Choose Simple interface. Choose the microphone and then adjust the Pre Amplifying level from the top slider, that one going from -30 dB to +30 dB. Click Done in the bottom right.


Streaming

JustWatch

You can find a list of movies and TV shows available on Netflix, etc. on JustWatch .

Netflix

Website — http://netflix.com . Price — C$16.49/month (FullHD), C$20.99/month (4K).

Netflix is the only streaming service that allows you to watch 4K videos on a PC. It only works with Microsoft Edge browser and Netflix recommends you to have at least 25Mbit/s internet connection. You should also use the Display Port or an HDMI port and cable which supports 4K. See details on Netflix on the page “Can I stream Netflix in Ultra HD?” .

Amazon Prime

Websites:

Price — about C$6.58/month. It includes other benefits as well.

Apple TV+

Website — https://tv.apple.com/ . Price — C$5.99/month.

Disney+

Includes “Star”.

Website — https://www.disneyplus.com/en-ca/ . Price — C$11.99/month.

Paramount+

Website — https://www.paramountplus.com/ca/ . Price — C$5.99/month.

AMC+

Includes “Shudder” and “Sundance Now”.

Website — https://www.amcplus.com/ . Price — C$8.99/month.

Crave

Includes “HBO”, “STARZ”, “Showtime”

Website — https://www.crave.ca/en . Price — C$19.99/month.

Crunchyroll

Website — https://www.crunchyroll.com/ . Price — C$7.99/month.

Shudder

Website — https://www.shudder.com/ . Price — C$5.99/month.

The Criterion Channel

Website — https://www.criterionchannel.com/ . Price — C$14.49/month.

FlixFling

Website — https://www.flixfling.com/ . Price — C$7.99/month.

Sundance Now

Website — https://www.sundancenow.com/ . Price — C$6.99/month.


Google Chrome Extensions

Development

Shopping

YouTube

Utils

Editing


macOS & Windows Apps

Games

Languages

Utils

Communication

Music

Cloud Storage

Browsers

TV/Movies/Streaming

Miscellaneous

Project Management

Productivity


tvOS Apps

Streaming

Games

Video

Streaming


Symbols for Text Editing


Hotkeys

Operating systems

Linux/Windows

[Super] key is [Win] key for Windows

Hotkey Action
[Ctrl + C]/[Ctrl + Insert] Copy
[Ctrl + X] Cut
[Ctrl + V]/[Shift + Insert] Paste
[Ctrl + A] Select all
[Ctrl + Z] Undo
[Ctrl + Y] Redo
[Ctrl + →] Move the cursor one word to the right
[Ctrl + ←] Move the cursor one word to the left
[Shift + Del] Delete file or directory permanently
[F2] Rename file or directory
[Alt + Tab] Switch between windows
[Alt + F4] Close window
[Alt + Spacebar] Open context menu for the active window
[F11] Toggle full-screen mode
[Super + ↑] Maximize window
[F5]/[Ctrl + R] Refresh current window
[Ctrl + N] Open new window
[Ctrl + W] Close active window
[Super + D] Display and hide the desktop
[Super + L] Lock PC
[Super + ←] Snap app or window left
[Super + →] Snap app or window right
[Super + (0—9)] Open app in number position from the taskbar
[Super + Shift + ←] Move the current window one monitor to the left
[Super + Shift + →] Move the current window one monitor to the right
[Prnt Scrn] Take a screenshot
[Alt + Prnt Scrn] Take a screenshot of a window

Linux

Hotkey Action
[Super] Switch between the Activities overview and desktop. In the overview,
start typing to instantly search your applications, contacts, and documents
[Alt + F2] Pop up command window
[Super + Tab] Switch between apps. Hold down [Shift] for reverse order
[Super + `]/[Alt + `] Switch between windows from the same application, or the selected application after [Super + Tab]
[Alt + Esc] Switch between windows in the current workspace. Hold down [Shift] for reverse order
[Super + A] Show the list of applications
[Super + Page Up] Switch to workspace above
[Super + Page Down] Switch to workspace below
[Super + Shift + Page Up] Move the current window to a workspace above
[Super + Shift + Page Down] Move the current window to a workspace below
[Ctrl + Alt + Shift + R] Start and stop screencast recording

Windows

Hotkey Action
[Win] Open Start
[Ctrl + Shift + Esc] Open Task Manager
[Win + Tab] Task view
[Win + X] Shutdown options
[Win + I] Open settings
[Win + E] Open File Explorer
[Win + M] Minimize all windows
[Win + R] Open Run command
[Win + Ctrl + →] Switch to the virtual desktop on the right
[Win + Ctrl + ←] Switch to the virtual desktop on the left

macOS

Hotkey Action
[Cmd + Option + Esc] Open Force Quit Applications window
[Cmd + Spacebar] Open Spotlight Search
[Ctrl + Spacebar] Switch input source
[Shift + Cmd + 3] Take a screenshot
[Shift + Cmd + 4] Take a screenshot of a portion of the screen
[Shift + Cmd + 4 + Spacebar] Take a screenshot of a window or menu

iOS

Hotkey Action
[Power + Volume up] Take a screenshot
Hold [Power + Volume up] Turn off

Oh My Zsh

Hotkey Action
[Ctrl + Q] Park a command. It “parks” the command you’re currently typing and takes you back to the prompt,
letting you start over and type another command.
Once you run that other command, the original command is un-parked and refills the command line.

Editors

Nano

Hotkey Action
[Ctrl + W] Search

VS Code

Full list of hotkeys

General

Hotkey Action
[Ctrl + Shift + P, F1] Show Command Palette

Basic editing

Hotkey Action
[Alt + ↑/↓] Move line up/down
[Ctrl + Shift + K] Delete line
[Ctrl + Shift + \] Jump to the matching bracket
[Ctrl + ]/[] Indent/outdent line
[Ctrl + /] Toggle line comment
Hotkey Action
[Ctrl + P] Go to file
[Ctrl + G] Go to line
[Ctrl + Shift + O] Go to Symbol

Search and replace

Hotkey Action
[Ctrl + D] Add selection to next Find match
[Ctrl + F] Find
[Ctrl + H] Replace
[Alt + Enter] Select all occurrences of Find match
[Ctrl + K Ctrl + D] Move last selection to next Find match
[Alt + C/R/W] Toggle case-sensitive/regex/whole word
[F3/Shift + F3] Find next/previous

Rich languages editing

Hotkey Action
[F12] Go to Definition
[F2] Rename Symbol
[Ctrl + Shift + I] Format document

Multi-cursor and selection

Hotkey Action
[Alt + Click] Insert cursor
[Shift + Alt + I] Insert cursor at end of each line selected
[Ctrl + Shift + L] Select all occurrences of current selection
[Shift + Alt + (drag mouse)] Column (box) selection

Display

Hotkey Action
[Ctrl + Shift + F] Show Search
[Ctrl + Shift + E] Show Explorer/Toggle focus
[Ctrl + B] Toggle Sidebar visibility
[Ctrl + K Z] Zen Mode (Esc Esc to exit)

Sublime Text

Hotkey Action
[Cmd + P] Switch files
[Cmd + R] Go to functions/classes
[Cmd + D] Quick select
[Cmd + K], [Cmd + d] Skip selection
[Cmd + Shift + L] Create multiple cursors
[Cmd + Shift + P] Command mode
[Cmd + F] Find text
[Cmd + F], [alt + enter] Find text and then select them all
[Cmd + Alt + F] Replace text
[Cmd + /] Comment/uncomment
[Cmd + Ctrl + F] Full screen
[Cmd + Ctrl + Shift + F] Distraction free
[Cmd + K + B] Toggle sidebar
[Ctrl + G] Go to line number
[Ctrl + L] Center window
[Cmd + L] Select line
[Ctrl + Shift + K] Delete line
[Cmd + ]] Indent
[Cmd + [] Unindent
[Cmd + Shift + Alt + 2/3] Change window layout to 2 or 3 rows
[Cmd + Alt + 1/2/3] Change window layout to 1/2/3 columns
[Ctrl + M] Go to matching bracket

Bookmarks

Hotkey Action
[Cmd + F2] Create/delete bookmark
[Cmd + Shift + F2] Clear bookmarks
[F2] Go to next bookmark
[Shift + F2] Go to previous bookmark

CLI

Hotkey Action
[Ctrl + A] Move the cursor to the start of the line
[Ctrl + E] Move the cursor to the end of the line
[Ctrl + X + X] Move the cursor to the start and to the end of the line
[Ctrl + R] Incrementally search the line history backwardly
[Ctrl + S] Incrementally search the line history forwardly
[Ctrl + C] Cancel
[TAB] Auto-complete a command

Terminator

Hotkey Action
[Ctrl + Page Down] Go to next tab
[Ctrl + Page Up] Go to previous tab
[F11] Toggle fullscreen
[Ctrl + Shift + O] Split terminals horizontally
[Ctrl + Shift + E] Split terminals vertically
[Ctrl + Shift + W] Close current Panel
[Ctrl + Shift + T] Open new tab
[Ctrl + Shift + I] Open a new window
[Alt + ↑] Move to the terminal above the current one
[Alt + ↓] Move to the terminal below the current one
[Alt + ←] Move to the terminal left of the current one
[Alt + →] Move to the terminal right of the current one
[Ctrl + Shift + G] Reset terminal state and clear window
[Ctrl + Shift + X] Toggle between showing all terminals and only showing the current one (maximise)
[Ctrl + Shift + +] Increase font size
[Ctrl + -] Decrease font size
[Ctrl + 0] Restore font size to original setting

Screen

Hotkey Action
[Ctrl + A, D] Detach from screen
[Ctrl + A, C] Create a new screen
[Ctrl + A, Space] Switch screens

Tmux

Hotkey Action
[Ctrl + B, D] Detach from session

Oh My Zsh Aliases

Alias Command
md mkdir -p

Plugin aliases

Git

Alias Command
g git
ga git add
gaa git add --all
gb git branch
gba git branch -a
gc git commit -v
gc! git commit -v --amend
gca git commit -v -a
gca! git commit -v -a --amend
gcam git commit -a -m
gcp git cherry-pick
gcpa git cherry-pick --abort
gcpc git cherry-pick --continue
gd git diff
gds git diff --staged
gignore git update-index --assume-unchanged
gm git merge
gsw git switch
gst git status
gsh git show

VS Code

Alias Command
vsc code .
vscd code --diff

Terraform

Alias Command
tf terraform

Kubectl

Alias Command
k kubectl
kaf kubectl apply -f
kdel kubectl delete
kdelf kubectl delete -f
kga kubectl get all
kgaa kubectl get all --all-namespaces
kl kubectl logs
kpf kubectl port-forward
kj kubectl "$@" -o json | jq
kjx kubectl "$@" -o json | fx
ky kubectl "$@" -o yaml | yh

Pods

Alias Command
kgp kubectl get pods
kgpl kubectl get pods -l
kgpn kubectl get pods -n
kgpwide kubectl get pods -o wide
kep kubectl edit pods
kdp kubectl describe pods
kdelp kubectl delete pods

Services

Alias Command
kgs kubectl get svc
kgswide kubectl get svc -o wide
kes kubectl edit svc
kds kubectl describe svc
kdels kubectl delete svc

Namespaces

Alias Command
kgns kubectl get namespaces
kdns kubectl describe namespace
kdelns kubectl delete namespace

Configmaps

Alias Command
kgcm kubectl get configmaps
kecm kubectl edit configmap
kdcm kubectl describe configmap
kdelcm kubectl delete configmap

Secrets

Alias Command
kgsec kubectl get secret
kdsec kubectl describe secret
kdelsec kubectl delete secret

Deployments

Alias Command
kgd kubectl get deployment
kgdwide kubectl get deployment -o wide
ked kubectl edit deployment
kdd kubectl describe deployment
kdeld kubectl delete deployment
ksd kubectl scale deployment

ReplicaSets

Alias Command
kgrs kubectl get rs

Nodes

Alias Command
kgno kubectl get nodes
kdno kubectl describe node

PVCs

Alias Command
kgpvc kubectl get pvc
kdpvc kubectl describe pvc
kdelpvc kubectl delete pvc

StatefulSets

Alias Command
kgss kubectl get statefulset
kgsswide kubectl get statefulset -o wide
kess kubectl edit statefulset
kdss kubectl describe statefulset
kdelss kubectl delete statefulset
ksss kubectl scale statefulset

DaemonSets

Alias Command
kgds kubectl get daemonset
keds kubectl edit daemonset
kdds kubectl describe daemonset
kdelds kubectl delete daemonset

iPadOS Apps

Apps marked with * are to be installed on the device initially.

Utils

Weather


iOS & iPadOS Apps

Apps marked with * are to be installed on the device initially.

Gaming

PlayStation

Xbox

Games

Email

Internet

VPN

Communication

Cloud Storage

Authenticators

Maps/Navigation

Productivity

Developer Tools

Books

Social

Business

Entertainment

Shopping

TV/Movies/Streaming

Music

Translation

Utils

Environment

Shipping

Languages

Reference

Food/Drinks

Travel

Health & Fitness

Devices

Canada

Travelling

Lifestyle

Shopping

Points

Food & Drinks

Movies

Banking

Health

Utilities

Shipping

Russia

Social

Maps

Transport

Utils

Languages

Streaming

Video


macOS, Linux & Windows Apps

Browsers

Editors

Communication

Utils

TV/Movies/Streaming

Notes

Downloaders

Utils


watchOS Apps

Weather

Games

Email

Health & Fitness

Food & Drinks

Communication

Authenticators

Maps/Navigation

Books

Business

Music

Utils

Environment

Shipping

Food/Drinks

Health & Fitness

Canada

Food & Drinks

Banking

Shipping

Russia

Maps

Utils

Health & Fitness