Compare commits

...

6 Commits

Author SHA1 Message Date
Abdullah Md. Sarwar
f70f7cec1c Merge 824bd5295d into 559d03ecf3 2024-02-27 17:12:23 +08:00
Julien Le Coupanec
559d03ecf3 Merge pull request #372 from cunnellp5/cunnellp/vscode/add-command-and-cleanup-spaces
updates vscode cheat sheet
2024-02-26 18:25:32 +01:00
cunnellp5
bea751612a updates vscode cheat sheet with one command 2024-02-15 07:10:18 -07:00
Julien Le Coupanec
d143c60246 Merge pull request #354 from RomjanHossain/patch-1
swap current line with previous
2023-12-29 15:35:14 +01:00
Romjan D. Hossain
44371217a9 swap current line with previous
it should be `ddkP` instead of `ddkp`
2023-12-24 11:53:04 +06:00
Abdullah Md Sarwar
824bd5295d Adding PSQL Cheatsheet 2022-10-03 12:58:32 +06:00
4 changed files with 25 additions and 4 deletions

View File

@@ -95,6 +95,10 @@ Feel free to take a look. You might learn new things. They have been designed to
- [Redis](databases/redis.sh) - [Redis](databases/redis.sh)
</details> </details>
#### PostgreSQL
- [PostgreSQL](databases/postgresql.sh)
### 🔧 Tools ### 🔧 Tools
<details> <details>

16
databases/postgresql.sh Normal file
View 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

View File

@@ -105,7 +105,7 @@ gu$ make lowercase until end of line
<< indent line one column to left << indent line one column to left
== auto-indent current line == auto-indent current line
ddp swap current line with next 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 :%retab fix spaces / tabs issues in whole file
:r [name] insert the file [name] below the cursor. :r [name] insert the file [name] below the cursor.
:r !{cmd} execute {cmd} and insert its standard output below the cursor. :r !{cmd} execute {cmd} and insert its standard output below the cursor.

View File

@@ -7,6 +7,7 @@
#### General #### 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`+`P`: Quick Open, Go to File
- `Ctrl`+`Shift`+`N`: New window/instance - `Ctrl`+`Shift`+`N`: New window/instance
- `Ctrl`+`W`: Close window/instance - `Ctrl`+`W`: Close window/instance