| Alias | Command | Description |
|---|---|---|
glg |
git log --stat |
Verbose log of commits |
glol |
git log --graph --pretty=format:'%h %s' |
Log with graph view |
gcam |
git commit -a -m |
Commit all changes (not new files) with a message |
gcmsg |
git commit -m |
Commit with a message |
gcan! |
git commit --amend --no-edit |
Amend the last commit without editing the message |
gca! |
git commit --amend |
Amend the last c |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from itertools import product | |
| from collections import defaultdict | |
| import re | |
| from pprint import pprint | |
| from math import prod, sqrt | |
| neighbours = [ | |
| [-1, 0], | |
| [0, 1], | |
| [1, 0], |
Apprenticeship Patterns - D. Hoover
Clean Code - R. Martin
Working efficiently with legacy code
| Hotkey | Description |
|---|---|
| Opt + Arrows | Move lines |
| Shift + F12 | Find all references |
| Cmd + [ | untab line |
| Cmd + ] | tab line |
| shortcut | description |
|---|---|
| Ctrl + G | select next occurance |
| Ctrl + Cmd + G | select all occurances |
| Shift + F6 | rename entity in code |
| Opt + F12 | toggle terminal |
| Cmd + Shift + F12 | toggle all sidebars |
| Opt + Cmd + M | extract method |
| Opt + Cmd + V | extract variable |
| Opt + Cmd + C | extract constant |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // dictionary shorthand declaration | |
| Dictionary<int, string> students = new Dictionary<int, string> | |
| { | |
| [123456] = "Mary", | |
| [314159] = "John", | |
| [145145] = "Ethan" | |
| }; | |
| // public readonly getter | |
| private int _secret; |
NewerOlder