Skip to content

Instantly share code, notes, and snippets.

View feffi's full-sized avatar

feffi feffi

View GitHub Profile
@ErikAugust
ErikAugust / spectre.c
Last active April 15, 2024 13:55
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
@cthos
cthos / gist_test.php
Created April 2, 2012 19:42
Get Raw Gist from Curl
<?php
$test_url = 'https://gist.github.com/2286656';
$bits = explode('/', $test_url);
$id = array_pop($bits);
$raw_url = 'https://raw.github.com/gist/' . $id;
$ch = curl_init($raw_url);