mirror of
https://github.com/Erreur32/cheat.git
synced 2025-01-08 22:02:00 +01:00
Cheatsheets added
- apk: Alpine Linux package manager - gcc: GNU C Compiler - grep: Pattern matcher in files or pipes - vim: Vi IMproved
This commit is contained in:
parent
437f191bf7
commit
84b5df508b
4 changed files with 36 additions and 0 deletions
14
cheatsheets/apk
Normal file
14
cheatsheets/apk
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
# Install a package
|
||||||
|
apk add $package
|
||||||
|
|
||||||
|
# Remove a package
|
||||||
|
apk del $package
|
||||||
|
|
||||||
|
# Update repos
|
||||||
|
apk update
|
||||||
|
|
||||||
|
# Upgrade all packages
|
||||||
|
apk upgrade
|
||||||
|
|
||||||
|
# Find a package
|
||||||
|
apk search $package
|
8
cheatsheets/gcc
Normal file
8
cheatsheets/gcc
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
# Compile a file
|
||||||
|
gcc file.c
|
||||||
|
|
||||||
|
# Compile a file with a custom output
|
||||||
|
gcc -o file file.c
|
||||||
|
|
||||||
|
# Debug symbols
|
||||||
|
gcc -g
|
6
cheatsheets/grep
Normal file
6
cheatsheets/grep
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
# Basic
|
||||||
|
grep pattern file
|
||||||
|
|
||||||
|
# Advanced
|
||||||
|
grep -R pattern folder
|
||||||
|
cat file | grep pattern
|
8
cheatsheets/vim
Normal file
8
cheatsheets/vim
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
# Appending
|
||||||
|
a - drops vim into append mode
|
||||||
|
i - enters append mode without character skip
|
||||||
|
|
||||||
|
# File management
|
||||||
|
:w - writes (saves) file
|
||||||
|
:q - quits
|
||||||
|
;q! - quits without saving changes
|
Loading…
Reference in a new issue