Cheatography
https://cheatography.com
Cheat sheet for my Sweetheart
Text Editing
Ctrl + left/right |
Jump a word |
Home/End |
Jump to the beginning/end of line/website |
Ctrl + Home/End |
Jump to the beginning/end of the file |
Ctrl + X |
When u have nothing selected, its gonna cut the line your cursor is currently on, can be used to remove lines |
Ctrl + backspace/delete |
Remove the word to the left/right of your cursor |
Win + V |
Multiclipboard |
When u hold shift with some of them youre gonna select the text your cursor has to pass through, for ex.Ctrl + shift + end is gonna select everything from where your cursor is all the way to the end of the file.
|
Google Chrome
Ctrl + Tab |
Switch chrome tabs |
Ctrl + Shift + Tab |
Switch tabs in the opposite direction |
Ctrl + T |
Open new browser tab |
Ctrl + W |
Close browser tab |
Ctrl + L |
Move cursor to address bar |
Alt + left/right |
Go back/forward |
/ |
When on google or on youtube u can use it to place your cursor in the search bar |
Ctrl + N |
New browser window(not tab, window) |
Ctrl + Shift + N |
New incognito window |
Ctrl + I |
Inspect website html code |
Ctrl + 1,2,3... |
Jump to 1,2,3... tab |
|
Git
git init |
Initialize git repository |
git status |
Show changes made in project and contents of staging area |
git add <file_name or .> |
Add file or all contents of a directory(using dot) to staging area |
git commit -m "message" |
Commit staged changes |
git reset --hard |
Reset changes to last commit on the branch |
git branch --show-current |
Show what branch you are on |
git branch -a |
Show all branches in the repository |
git checkout -b <branch_name> |
Create a new branch |
git checkout <branch_name> |
Switch to another branch |
git merge <branch_name> |
Merge branch to the branch you're currently on |
git checkout -- <filename or .> |
Discard unstaged changes in chosen file |
git remote add <alias> <url> |
Associate given url(link) to an alias |
git remote -v |
Print all added remotes |
git push <remote> <local_branch:remote_branch> |
Push a branch to remote repository(-u flag to save settings) |
git pull <remote> <remote_branch:local_branch> |
Pulls a branch from remote repository |
<remote> is one of the aliases added by git remote add
git pull = git fetch + git merge
|
MySql
mysqld --console |
Starts mysql service |
mysql -u <username> |
Login to mysql shell |
INSIDE SHELL |
SHOW DATABASES; |
Shows databases |
USE <database_name>; |
Chooses database to execute queries on |
SHOW TABLES; |
Shows tables from chosen database |
DESCRIBE <table_name>; |
Shows information about a table |
CREATE TABLE <table_name> ( <column_name> <column_type> <extra_params>, ... ); |
Creates a table |
AUTO_INCREMENT |
Automatically increments its value with each added row |
PRIMARY KEY |
It's gonna be a primary key for that table |
NULL / NOT NULL |
Whether the column can be NULL or not |
DEFAULT <value> |
Default value the column will be initialized with when adding a row |
SELECT <column1>,<column2>... FROM <table_name>; |
Select particular columns from a table |
SELECT * ... |
Select all columns from a table |
LIMIT <amount> |
Selects <amount> latest rows |
LIMIT <starting_id>,<amount> |
Select <amount> rows starting from the row with id=<starting_id> |
WHERE <column>=<value> |
Select all rows whose <column> is equal to <value> |
INSERT INTO <table_name> (<column1>,<column2>, ...) VALUES (<value1>,<value2>,...); |
Insert values into a table |
TRUNCATE <table_name>; |
Clear a table |
DROP <table_name>; |
Remove a table |
root - your database username, root is like admin
|
Pycharm
Ctrl + Shift + up/down |
Move selected text up/down |
Ctrl + / |
Comment selected text out |
Alt + 4 |
Jump to run window |
Ctrl + F12 |
Jump to terminal window |
Ctrl + F8 |
Toggle breakpoint |
Shift + F10 |
Run the program in normal mode |
Ctrl + Shift + F10 |
Run the program whose window I have currently open |
Shift + F9 |
Run the program in debug mode |
IN DEBUG |
F7 |
Step into a function |
F8 |
Step over |
F9 |
Resume program |
Ctrl + F2 |
Stop running program |
|
Command Prompt/Terminal
pwd |
Print working directory |
cd <folder_name> |
Change directory |
cd .. |
Go to parent folder |
ls |
List contents of current directory |
Windows: |
dir |
List contents of current directory |
dir /a |
List contents of current directory including hidden files |
cd |
Print working directory(cd without anything after) |
rd <directory_name> /s |
Removes a directory with all its contents |
mkdir <name> |
Creates a new directory |
|
Created By
Metadata
Comments
No comments yet. Add yours below!
Add a Comment
Related Cheat Sheets