Skip to content

Instantly share code, notes, and snippets.

View kmfoysal06's full-sized avatar
๐Ÿ˜ƒ
Great

kazi mohammad Foysal kmfoysal06

๐Ÿ˜ƒ
Great
View GitHub Profile
@kmfoysal06
kmfoysal06 / c-string-is-terrible.c
Created March 24, 2026 02:01
c is string terrible
#include<stdio.h>
#include<ctype.h>
#include<string.h>
#include<stdlib.h>
typedef struct {
const char *data;
size_t count;
} String_06;
@kmfoysal06
kmfoysal06 / http_server.asm
Created June 14, 2025 15:50
Socket Programming to Build a HTTP Server With NASM x86_64 Assembly.
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
@kmfoysal06
kmfoysal06 / tcp_server.asm
Created May 17, 2025 07:12
Basic TCP Server WIth NASM Assembly x86_64. kmfoysal06
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
@kmfoysal06
kmfoysal06 / udp_server_nasm_x86_x64.asm
Created May 2, 2025 19:54
Basic UDP server with x86_64 assembly that receive datagram on ip 127.0.0.1 and port 8000
%macro printer 2
mov rax, 1
mov rdi, 1
mov rsi, %1
mov rdx, %2
syscall
%endmacro
section .data
AF_INET equ 2
@kmfoysal06
kmfoysal06 / SQLite-PHP-quickstart.php
Created March 5, 2025 23:49 — forked from bladeSk/SQLite-PHP-quickstart.php
SQLite3 PHP Quickstart Tutorial
<?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.