Skip to content

Instantly share code, notes, and snippets.

View watersb's full-sized avatar

Boyd Waters watersb

  • 35.9,-106.3
  • 13:53 (UTC -07:00)
View GitHub Profile
@watersb
watersb / spectre.c
Last active February 14, 2018 06:20 — forked from miniupnp/spectre.c
Spectre example code - x86 / x86_64 and PowerPC
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#if defined(__POWERPC__)
#define __dcbf(base, index) \
__asm__ ("dcbf %0, %1" : /*no result*/ : "b%" (index), "r" (base) : "memory")
#else
#ifdef _MSC_VER
#include <intrin.h> /* for rdtscp and clflush */
@watersb
watersb / 0_reuse_code.js
Created August 24, 2017 09:40
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console