vim(cause nano is too easy): cheat sheet: https://vim.rtorr.com/
Copy the .vimrc file into your home directory on the server using Unix's scp command.
Remember to change MATRICOLA with your Unipd Student ID.
Login using your SSH credentials.
scp -O ./.vimrc MATRICOLA@SERVER_IP:/home/MATRICOLA/.vimrc
vim how to format code in cmd mode(keystroke): gg=G Explanation: gg goes to the top of the file, = is a command to fix the indentation and G tells it to perform the operation to the end of the file.
This .vimrc config file allows you to:
- Use your mouse: scrolling wheel to move up or down, click and point
- Move line Up/Down using Ctrl+Shift+Up/Down
- Press F8 to Compile the C program without exiting Vim
- Press F9 to Execute the C program without exiting Vim
- Auto close brackets
- Replace tabs with 3 spaces
- Highlight matching parentheses
- Auto indent on brackets
- Show line number
- Highlight current line
- Search characters as they are entered
- Search is case insesitive if no case letters are entered, but case sensitive if case letters are entered
- Highlight search results
Click to expand!
Search is UNIDIRECTIONAL but when the search reach one end of the file, pressing n continues the search, starting from the other end of the file.
To search forward use /
To search bacward use ?
x es:
ESC (go into Command mode)
/query (forward)
?query (backward)
ENTER (to stop writing in the search query)
(now all search results of the query are highlighted)
n (to move to the NEXT occurence in the search results)
N (to move to the PREVIOUS occurence in the search results)
ESC (to exit Search mode)
Click to expand!
To Compile press F8
To Execute press F9
ESC (go into Command mode)
F8 (compile shortcut)
F9 (execute shortcut)
CTRL+C (to exit compilation/executable)
Enter (to re-enter in vim)
Click to expand!
ESC (go into Command mode)
CTRL+SHIFT+PAGE UP (to move line up)
CTRL+SHIFT+PAGE DOWN (to move line down)
i (go into Insert mode)
Click to expand!
Select with the mouse the text you want to copy
[ALTERNATIVE
ESC (go into Command mode)
V100G (to select from current line to line 100, included, using Visual mode)]
y (to Copy/yank)
d (to Cut/delete)
p (to Paste after the cursor)
Click to expand!
Open the file from which you want to copy in Vim using:
vi ogFile.c (ogFile is the destination file)
ESC (go into Command mode)
:ePATH/file (open 'source' file at Path)
(select the lines that you want to copy)
y (copy/yank)
:q (close the 'source' file)
vi ogFile.c (open the 'destination' file)
p (paste the copied lines into the 'destination' file)
Click to expand!
ESC (go into Command mode)
u (to Undo)
Click to expand!
CTRL + s (now screen is frozen)
(every command that you type when the screen is frozen will be executed, it just won't be displayed in the terminal)
CTRL + q (to unfreeze the screen)
In questa repo sono contenuti i programmi sviluppati dal professore durante il corso tenuto nell'A.A. 21/22 e riscritti per essere più chiaramente comprensibili e più estensivamente commentati.
- Client web HTTP/1.1
- Risoluzione degli hostname in IP
- Parsing degli header
- Supporta il
Transfer-Encoding: chunked
- Server web
- Invio di file statici nella cartella del server
Autorizationrichiesta nella cartellasecuretramite basic HTTP auth ������ RFC2617- Invio tramite
Transfer-Encoding: chunked
- Proxy web
- Modalità
GETin chiaro - Modalità
CONNECTtramite TLS tunnelling
- Modalità
- Socket web server
Compilare con:
gcc wsock.c -o wsock -lcrypto- Handshake socket
- Comunicazione bidirezionale tra server e client
- RFC1945 HTTP 1.0 ������ rfc-editor.org
- RFC2616 HTTP 1.1 ������ rfc-editor.org
- RFC3875 Common Gateway Interface (CGI) ������ rfc-editor.org
- RFC6265 Cookies ������ rfc-editor.org
- RFC6455 WebSocket ������ rfc-editor.org