Skip to content

Instantly share code, notes, and snippets.

@alyoshenka
Last active January 24, 2021 04:54
Show Gist options
  • Save alyoshenka/2d96ca79b876503ef65a97c531b9c9da to your computer and use it in GitHub Desktop.
Save alyoshenka/2d96ca79b876503ef65a97c531b9c9da to your computer and use it in GitHub Desktop.
Useful commands

Useful terminal commands

  • ps aux | grep "name": find process by name
  • sudo dkpg -i "package.deb": install package
  • source ~/.bashrc: reload .bashrc

Useful Vim commands

gg: beginning of file

G: end of file

u: undo

ctrl r: redo

%s/foo/bar/g: replace ll foo with bar

/foo: find all foo

:81,91y: yank lines 81-91

:59,63d: delete lines 59-63

y$: yank line, excluding newline char

ytx: yank to x, exclusive

yfx: yank to x, inclusive

A: go to end of line, open insert mode

^: beginning of line

5 + Enter: go to line 5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment