Sublime Cheatsheet

Go to file Ctrl + P Toggle Sidebar Ctrl + K B Select line Ctrl + L Select word Ctrl + D Select content into brackets Ctrl + Shift + M Insert line before Ctrl + Shift + Enter Insert line after Ctrl + Enter Delete line Ctrl + Shift + K Duplicate lines Ctrl + Shift + D Join lines Ctrl + Shift + J Jump to matching bracket Ctrl + M

September 21, 2021 · 1 min · Saqib Razzaq

Git Cheatsheet

Git Cheatsheet Get remote URL git remote -v Set remote URL git remote set-url origin git@bitbucket.org:user/repo.git Update remote branches list git remote update origin --prune Delete local branch git branch -d branchname Delete branch locally and remote git push origin --delete fix/authentication Create branch from another git checkout -b newbranch sourcebranch Soft reset (remove last commit) git reset --soft HEAD~1...

September 15, 2021 · 1 min · Saqib Razzaq

MySQL Cheatsheet

copy a table with schema, indexes and data First, copy the table with indexes CREATE TABLE new_name LIKE table_to_copy; Then copy the data by running INSERT INTO new_name SELECT * FROM table_to_copy; create BTREE Indexes CREATE INDEX index_name ON table_name (column1, column2, ...); create FULLTEXT indexes ALTER TABLE `TableName` ADD FULLTEXT INDEX `IndexName` (`ColumnName`); create new user and give all privilages CREATE USER 'user'@'localhost' IDENTIFIED BY 'password'; GRANT ALL PRIVILEGES ON * ....

September 1, 2021 · 2 min · Saqib Razzaq

Docker Cheatsheet

Show images docker images Show containers docker ps Show running containers docker ps -a Connect to a running container docker exec -it container_id bash Start container docker start container_id Stop container docker stop container_id Remove Container docker rm container_id Pull container docker pull image_name Commit a container docker commit -m "message" -a "Author" container_id username/repo_name Remove all containers docker rm $(docker ps -a -q) Stop all containers docker kill $(docker ps -q)...

July 11, 2021 · 1 min · Saqib Razzaq

Terminal Cheatsheet

A list of common terminal shortcuts + most common cli programs in Linux terminal ctrl + a move to start of a line ctrl + e move to end of a line Alt-f Move the cursor forward by one word Alt-b Move the cursor backward by one word ctrl + u Delete an entire line ctrl + k Delete everything after cursor Ctrl + Shift + F Find any text clear or ctrl + l to clear terminal reset clear everything and remove scroll cal show calendar command; command2 for running multiple commands regardless of output command && command2 for running commands only when first is successful...

December 11, 2020 · 2 min · Saqib Razzaq