mirror of
https://github.com/LeCoupa/awesome-cheatsheets.git
synced 2026-01-29 14:48:01 -08:00
Compare commits
6 Commits
3777e85e93
...
f70f7cec1c
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f70f7cec1c | ||
|
|
559d03ecf3 | ||
|
|
bea751612a | ||
|
|
d143c60246 | ||
|
|
44371217a9 | ||
|
|
824bd5295d |
@@ -95,6 +95,10 @@ Feel free to take a look. You might learn new things. They have been designed to
|
||||
- [Redis](databases/redis.sh)
|
||||
</details>
|
||||
|
||||
#### PostgreSQL
|
||||
|
||||
- [PostgreSQL](databases/postgresql.sh)
|
||||
|
||||
### 🔧 Tools
|
||||
|
||||
<details>
|
||||
|
||||
16
databases/postgresql.sh
Normal file
16
databases/postgresql.sh
Normal file
@@ -0,0 +1,16 @@
|
||||
# *****************************************************************************
|
||||
# BASICS
|
||||
# *****************************************************************************
|
||||
|
||||
sudo -u postgres psql # PSQL command line interface in full admin mode
|
||||
|
||||
# Anything inside the angular brackets <> will be your variables
|
||||
|
||||
sudo -u postgres createuser <username> # Create user
|
||||
sudo -u postgres createdb <dbname> # Create database
|
||||
|
||||
# Setting a password for a user
|
||||
sudo -u postgres psql
|
||||
alter user <username> with encrypted password '<password>';
|
||||
|
||||
grant all privileges on database <dbname> to <username>; # grant privileges on a database to a user
|
||||
@@ -105,7 +105,7 @@ gu$ make lowercase until end of line
|
||||
<< indent line one column to left
|
||||
== auto-indent current line
|
||||
ddp swap current line with next
|
||||
ddkp swap current line with previous
|
||||
ddkP swap current line with previous
|
||||
:%retab fix spaces / tabs issues in whole file
|
||||
:r [name] insert the file [name] below the cursor.
|
||||
:r !{cmd} execute {cmd} and insert its standard output below the cursor.
|
||||
|
||||
@@ -6,7 +6,8 @@
|
||||
|
||||
#### General
|
||||
|
||||
- `Ctrl`+`Shift`+`P`, `F1`: Show Command Palette
|
||||
- `Ctrl`+`Shift`+`P`, `F1`: Show Command Palette
|
||||
- `Ctrl`+`Shift`+`T`: Open last closed tab
|
||||
- `Ctrl`+`P`: Quick Open, Go to File
|
||||
- `Ctrl`+`Shift`+`N`: New window/instance
|
||||
- `Ctrl`+`W`: Close window/instance
|
||||
@@ -19,7 +20,7 @@
|
||||
- `Ctrl`+`C`: Copy line (empty selection)
|
||||
- `Ctrl`+`↓/↑`: Move line down / up
|
||||
- `Ctrl`+`Shift`+`K`: Delete line
|
||||
- `Ctrl`+`Enter` / `Ctrl`+`Shift`+`Enter`: Insert line below / above
|
||||
- `Ctrl`+`Enter` / `Ctrl`+`Shift`+`Enter`: Insert line below / above
|
||||
- `Ctrl`+`Shift`+`\`: Jump to matching bracket
|
||||
- `Ctrl`+`]` / `Ctrl`+`[`: Indent / Outdent line
|
||||
- `Ctrl`+`Home` / `End`: Go to beginning / end of file
|
||||
@@ -136,7 +137,7 @@
|
||||
|
||||
- [`Wrap Console Log`](https://marketplace.visualstudio.com/items?itemName=midnightsyntax.vscode-wrap-console-log): Wrap to console.log by word or selection.
|
||||
|
||||
- [`Bracket Pair Colorizer`](https://marketplace.visualstudio.com/items?itemName=CoenraadS.bracket-pair-colorizer): Allows matching brackets to be identified with colours.
|
||||
- [`Bracket Pair Colorizer`](https://marketplace.visualstudio.com/items?itemName=CoenraadS.bracket-pair-colorizer): Allows matching brackets to be identified with colours.
|
||||
|
||||
## My Settings
|
||||
|
||||
|
||||
Reference in New Issue
Block a user