๐
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include<stdio.h> | |
| #include<ctype.h> | |
| #include<string.h> | |
| #include<stdlib.h> | |
| typedef struct { | |
| const char *data; | |
| size_t count; | |
| } String_06; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| section .data | |
| AF_INET equ 2 | |
| SOCK_STREAM equ 1 | |
| TCP equ 6 | |
| ;basic http response | |
| msg : db "HTTP/1.1 200 OK",13,10 | |
| db "Content-Type: text/html",13,10 | |
| db "Content-Length: 22",13,10 | |
| db "Connection: close",13,10 | |
| db 13,10 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| section .data | |
| AF_INET equ 2 | |
| SOCK_STREAM equ 1 | |
| TCP equ 6 | |
| msg db "Hello from TCP server!\n" | |
| msgl equ $-msg | |
| section .bss | |
| sock_fd resb 255 | |
| csock_fd resb 255 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| %macro printer 2 | |
| mov rax, 1 | |
| mov rdi, 1 | |
| mov rsi, %1 | |
| mov rdx, %2 | |
| syscall | |
| %endmacro | |
| section .data | |
| AF_INET equ 2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // This file walks you through the most common features of PHP's SQLite3 API. | |
| // The code is runnable in its entirety and results in an `analytics.sqlite` file. | |
| // Create a new database, if the file doesn't exist and open it for reading/writing. | |
| // The extension of the file is arbitrary. | |
| $db = new SQLite3('analytics.sqlite', SQLITE3_OPEN_CREATE | SQLITE3_OPEN_READWRITE); | |
| // Errors are emitted as warnings by default, enable proper error handling. |