Skip to content

Instantly share code, notes, and snippets.

View pacuna's full-sized avatar

Pablo Acuna pacuna

  • Spotify
  • Austin, TX
View GitHub Profile
@ErikAugust
ErikAugust / spectre.c
Last active January 5, 2025 07:01
Spectre example code
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#ifdef _MSC_VER
#include <intrin.h> /* for rdtscp and clflush */
#pragma optimize("gt",on)
#else
#include <x86intrin.h> /* for rdtscp and clflush */
#endif
@marshyon
marshyon / main.go
Last active July 25, 2024 14:36
Golang badger db using GOB to serialise object data into badger fields
/*
*
* Golang badger db using GOB to serialize object data into badger fields
*
* Golang has its very own serializer / deserializer - Go Object (gob) so why not use it where data passed is entirely within a Go
* application ?
*
* JSON or some other text based solution could be used but gob might be faster.
*
* A gob encoder accepts the type bytes.Buffer to encode data to, so to write this to Badger, which accepts the type byte