Skip to content

Instantly share code, notes, and snippets.

View atnon's full-sized avatar

Anton Landberg atnon

  • Gothenburg, Sweden
View GitHub Profile
@ErikAugust
ErikAugust / spectre.c
Last active May 22, 2024 23:07
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
@atnon
atnon / installation.md
Last active April 25, 2016 19:18
bladeRF + GNU Radio on OS X
@davidzchen
davidzchen / sample-google.c
Last active June 16, 2024 18:55
Sample C code using the Google C++ style guide
// Sample file using the Google C++ coding standard.
//
// http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml
//
// General rules:
// - Indents are two spaces. No tabs should be used anywhere.
// - Each line must be at most 80 characters long.
// - Comments can be // or /* but // is most commonly used.
// - File names should be lower_case.c or lower-case.c
//
anonymous
anonymous / gist:5160991
Created March 14, 2013 12:35
kaffestatus.py
# coding=utf8
import json
import urllib2
import datetime
import random
url = 'http://localhost/can.php'
response = urllib2.urlopen(url)
data = json.load(response)
response.close()