Skip to content

Commit

Permalink
Update formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
alebelcor committed Jun 4, 2019
1 parent 3855695 commit 9327302
Show file tree
Hide file tree
Showing 6 changed files with 52 additions and 52 deletions.
22 changes: 11 additions & 11 deletions git.md
Original file line number Diff line number Diff line change
@@ -1,66 +1,66 @@
# Git

Ignore changes to a tracked file.
Ignore changes to a tracked file:

```bash
git update-index --assume-unchanged <file>
```

Start tracking changes to an ignored file (above).
Start tracking changes to an ignored file (above):

```bash
git update-index --no-assume-unchanged <file>
```

Undo the last commit.
Undo the last commit:

```bash
git reset HEAD~1 --soft
```

Undo the first (unpushed) commit of a repository.
Undo the first (unpushed) commit of a repository:

```bash
git update-ref -d HEAD
```

Verify objects in database and optimize.
Verify objects in database and optimize:

```bash
git fsck && git gc --aggressive --prune=now
```

Change branch.
Change branch:

```bash
git checkout <branch name>
```

Create a new local branch based off your current one.
Create a new local branch based off your current one:

```bash
git checkout -b <branch name>
```

Water current branch with changes from other branch.
Water current branch with changes from other branch:

```bash
git merge <other branch name>
```

Squash feature branch changes into current one.
Squash feature branch changes into current one:

```bash
git merge --no-commit --squash <feature branch name>
```

Delete an unmerged local branch, i.e. force delete.
Delete an unmerged local branch, i.e. force delete:

```bash
git branch -D <branch name>
```

Delete a remote branch.
Delete a remote branch:

```bash
git push <remote name> :<branch name>
Expand Down
14 changes: 7 additions & 7 deletions rest.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,49 +2,49 @@

## Create

Create a new resource.
Create a new resource:

```txt
POST /user/posts
```

## Read

Retrieve a collection of resources.
Retrieve a collection of resources:

```txt
GET /user/posts
```

Retrieve a known resource.
Retrieve a known resource:

```txt
GET /user/posts/1
```

Retrieve a filtered collection of resources.
Retrieve a filtered collection of resources:

```txt
GET /user/posts?author=jdoe
```

## Update

Update a known resource.
Update a known resource:

```txt
PUT /user/posts/1
```

Partially update a known resource.
Partially update a known resource:

```txt
PATCH /user/posts/1
```

## Delete

Delete a known resource.
Delete a known resource:

```txt
DELETE /user/posts/1
Expand Down
12 changes: 6 additions & 6 deletions shell.md
Original file line number Diff line number Diff line change
@@ -1,39 +1,39 @@
# Shell

Redirect `stdout`.
Redirect `stdout`:

```bash
command > file
command 1> file
```

Redirect `stderr`.
Redirect `stderr`:

```bash
command 2> file
```

Redirect `stderr` to `stdout`.
Redirect `stderr` to `stdout`:

```bash
command 2>&1 file
```

Redirect `stderr` and `stdout`.
Redirect `stderr` and `stdout`:

```bash
command > file 2>&1
command &> file # non-POSIX, i.e. less compatible
```

Clear a file.
Clear a file:

```bash
:> file
true > file # same as above
```

Make file executable.
Make file executable:

```bash
chmod +x <file>
Expand Down
44 changes: 22 additions & 22 deletions tmux.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,40 +2,40 @@

## Commands

List sessions.
List sessions:

```bash
tmux ls
tmux list-sessions
```

Create new session.
Create new session:

```bash
tmux new -s <session name>
tmux new-session -s <session name>
```

Attach to session.
Attach to session:

```bash
tmux attach -t <target session>
tmux attach-session -t <target session>
```

Detach current client.
Detach current client:

```txt
CTRL+B, D
```

Give named commands.
Give named commands:

```txt
CTRL+B, :
```

Scrolling.
Scrolling:

```txt
CTRL+B, PgUp
Expand All @@ -44,103 +44,103 @@ CTRL+B, PgDown
# Press `Q` to quit
```

Close a window or pane.
Close a window or pane:

```txt
CTRL+D
# Or `exit`
```

Close all windows and panes.
Close all windows and panes:

```txt
CTRL+B, :kill-session
```

## Windows

Create new window.
Create new window:

```txt
CTRL+B, C
```

Rename current window.
Rename current window:

```txt
CTRL+B, ,
```

List all windows.
List all windows:

```txt
CTRL+B, W
```

Move to next window.
Move to next window:

```txt
CTRL+B, N
```

Move to previous window.
Move to previous window:

```txt
CTRL+B, P
```

Move to window number `X`
Move to window number `X`:

```txt
CTRL+B, [X]
```

Kill the current window.
Kill the current window:

```txt
CTRL+B, &
```

## Panes

Split vertically into panes.
Split vertically into panes:

```txt
CTRL+B, %
```

Move to the next (vertical) pane.
Move to the next (vertical) pane:

```txt
CTRL+B, →
```

Move to the previous (vertical) pane.
Move to the previous (vertical) pane:

```txt
CTRL+B, ←
```

Split horizontally into panes.
Split horizontally into panes:

```txt
CTRL+B, "
```

Move to the next (horizontal) pane.
Move to the next (horizontal) pane:

```txt
CTRL+B, ↑
```

Move to the previous (horizontal) pane.
Move to the previous (horizontal) pane:

```txt
CTRL+B, ↓
```

Show pane numbers for switching.
Show pane numbers for switching:

```txt
CTRL+B, Q
Expand Down
4 changes: 2 additions & 2 deletions vim.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Vim

Delete all lines in file.
Delete all lines in file:

```txt
gg
Expand All @@ -13,7 +13,7 @@ dG
<code>dG</code> deletes from current line to end of the file.
</details>

Exit without saving.
Exit without saving:

```txt
:q!
Expand Down
8 changes: 4 additions & 4 deletions visual-studio-code.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
# Visual Studio Code

Open working directory.
Open working directory:

```bash
code .
```

Install extension.
Install extension:

```bash
code --install-extension <extension id>
```

Uninstall extension.
Uninstall extension:

```bash
code --uninstall-extension <extension id>
```

List installed extensions.
List installed extensions:

```bash
code --list-extensions
Expand Down

0 comments on commit 9327302

Please sign in to comment.