Skip to content

Instantly share code, notes, and snippets.

View SmolPatches's full-sized avatar

Robert SmolPatches

  • 09:47 (UTC +02:00)
View GitHub Profile
@SmolPatches
SmolPatches / Darwin aarch64 asm.md
Last active May 3, 2025 14:40
Some cool assembly

So I was bored, so I decided to learn a little bit of asm.
I wrote the same program in 3 different ways.
And I tried to make sure I understand each step.

First Run: Raw ASM w/ write syscall

msg: .asciz "HELLO ASMDOGZ\n"
{"openapi":"3.1.0","info":{"title":"Snipe-IT v6 API","version":"7.0.9"},"servers":[{"url":"https://develop.snipeitapp.com/api/v1"}],"components":{"securitySchemes":{}},"security":[{}],"paths":{"/hardware/{id}":{"get":{"summary":"/hardware/:id","description":"Get the details of a specific asset","operationId":"hardware-by-id","parameters":[{"name":"id","in":"path","description":"The id (not the asset tag) of the asset you'd like to query","schema":{"type":"integer","format":"int32"},"required":true}],"responses":{"200":{"description":"200","content":{"application/json":{"examples":{"Result":{"value":"{\n \"id\": 1,\n \"name\": \"\",\n \"asset_tag\": \"1057931124\",\n \"serial\": \"24da9270-5631-3d1c-84e4-8de6fd40d92d\",\n \"model\": {\n \"id\": 1,\n \"name\": \"Macbook Pro 13"\"\n },\n \"model_number\": \"2670166157847744\",\n \"eol\": {\n \"date\": \"2025-02-27\",\n \"formatted\": \"Thu Feb 27, 2025\"\n },\n \"status_label\": {\n \"id\": 1,\n \"name\": \"Ready to Deploy\",\n
openapi: 3.1.0
info:
title: Snipe-IT v6 API
version: 7.0.9
servers:
- url: https://develop.snipeitapp.com/api/v1
security:
- {}
paths:
/hardware/{id}:
@SmolPatches
SmolPatches / main.c
Created May 6, 2024 19:33
polymorphism / dynamic dispatch in c?
#include <string.h>
#include <stdio.h>
struct s1 {
int val;
};
struct s2 {
char* p;
};
struct s3 {