Skip to content

Instantly share code, notes, and snippets.

View Masud2017's full-sized avatar
🎯
Focusing on some serious stuff XD

Md.Masud karim Masud2017

🎯
Focusing on some serious stuff XD
View GitHub Profile
@yellowbyte
yellowbyte / compiling_asm.md
Last active June 4, 2024 20:17
how to assemble assembly with NASM assembler to 32-bit or 64-bit ELF binary with or without libc

32-bit ELF binary

how to assemble and link:

nasm -f elf32 -o <filename>.o <filename>.asm
ld -m elf_i386 -o <filename> <filename>.o

template code (hello world):

section .text
global _start
@jsmsalt
jsmsalt / seeding.py
Last active June 18, 2024 07:07
Seeding data to database using SQLAlchemy and FastAPI
# The simplest solution I found is to set up an event for each table that executes a method after the table is created.
# Database initial data
INITIAL_DATA = {
'users': [
{
'username': 'superuser',
'email': 'superuser@example.com',
'hashed_password': hash_password('123')