Skip to content

Instantly share code, notes, and snippets.

Avatar

Erik August Johnson ErikAugust

View GitHub Profile
@ErikAugust
ErikAugust / FizzBuzz.js
Last active Nov 1, 2018
FizzBuzz using ES6 class - takes start number and end number in constructor, returns Array of strings
View FizzBuzz.js
/**
* @class FizzBuzz
* @author Erik Johnson <erik@erikaugust.com>
*/
class FizzBuzz {
/**
* @function constructor()
* @param {number} start
* @param {number} end
* @returns {Array<string>}
@ErikAugust
ErikAugust / spectre.c
Last active Feb 3, 2021
Spectre example code
View spectre.c
#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