Skip to content

Instantly share code, notes, and snippets.

View Cracked5pider's full-sized avatar
🕷️

5pider Cracked5pider

🕷️
View GitHub Profile
@fay59
fay59 / Quirks of C.md
Last active December 27, 2025 05:41
Quirks of C

Here's a list of mildly interesting things about the C language that I learned mostly by consuming Clang's ASTs. Although surprises are getting sparser, I might continue to update this document over time.

There are many more mildly interesting features of C++, but the language is literally known for being weird, whereas C is usually considered smaller and simpler, so this is (almost) only about C.

1. Combined type and variable/field declaration, inside a struct scope [https://godbolt.org/g/Rh94Go]

struct foo {
   struct bar {
 int x;
@mgeeky
mgeeky / Procmon_operationst.txt
Last active April 13, 2026 16:34
PROCMON Operations list
CloseFile
CreateFile
CreateFileMapping
DeviceIoControl
FileSystemControl
FlushBuffersFile
Load Image
LockFile
NotifyChangeDirectory
Process Create
@acapola
acapola / aes-ni.c
Created August 31, 2015 14:42
AES128 how-to using GCC and Intel AES-NI
#include <stdint.h> //for int8_t
#include <string.h> //for memcmp
#include <wmmintrin.h> //for intrinsics for AES-NI
//compile using gcc and following arguments: -g;-O0;-Wall;-msse2;-msse;-march=native;-maes
//internal stuff
//macros
#define DO_ENC_BLOCK(m,k) \
do{\
@Cr4sh
Cr4sh / WoW64_call.cpp
Created May 22, 2014 19:33
WoW64 Heaven's Gate
#include "stdafx.h"
#define DB(_val_) __asm __emit (_val_)
#define INVALID_SYSCALL (DWORD)(-1)
// code selectors
#define CS_32 0x23
#define CS_64 0x33
// Queries the computer for the cpuid bits and tries detailing the results.
//# vcvars32 & cl __cpuid.c
// See http://msdn.microsoft.com/en-us/library/hskdteyh(v=vs.90).aspx
// Not sure what to do for Linux.
#include <stdio.h>
#include <intrin.h>
int main(int argc, char *argv[]) {