Skip to content

Instantly share code, notes, and snippets.

@xorrbit
xorrbit / spectre.c
Created January 4, 2018 14:30 — forked from ErikAugust/spectre.c
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
@xorrbit
xorrbit / setup_mosh_centos.sh
Last active July 27, 2016 16:18 — forked from tancnle/setup_mosh_centos.sh
Setup mosh 1.2.5 on Centos 6.x
#!/bin/sh
# Update latest epel
sudo yum -y instlal epel-release
# perl-IO-Socket-IP isn't in the repos
wget http://rpm.mag-sol.com/Centos/6/x86_64/perl-IO-Socket-IP-0.31-1.el6.noarch.rpm
sudo rpm -Uvh perl-IO-Socket-IP-0.31-1.el6.noarch.rpm
rm perl-IO-Socket-IP-0.31-1.el6.noarch.rpm
// Bind F7 to 'step'
javascript:$(document).bind('keydown', function(e) { e.which == 118 && parse('s'); }); void(0)
// Add a 'readhex' command that works just like 'read' but dumps nothing but the hex
javascript:cpu._readhex =
function(e) {
if (!e[1]) return write(" Please give an expression to read the memory at."), void 0;
var t = cpu.to_addr(e[1]);
cpu.get("/cpu/dbg/memory/" + t + "?len=" + (parseInt(e[2], 16) + (15 - parseInt(e[2], 16) & 15) || 32), function(e) {
for (var n = atob(e.raw), i = "", o = " ", s = 0; s < n.length; s++) s % 2 == 0 && (o += " "), o += pad(n.charCodeAt(s).toString(16), 2), s % 8 == 7 && (i += " " + o + "\n", o = " ");
We couldn’t find that file to show.
Embedded / Electronics night featuring a functionality and design demo of the μJoypad, the world's (unofficially) smallest NES controller |+ ..|
Monday, November 5th, 2012
7:00 pm
SkullSpace Lounge, 3rd floor, 125 Adelaide St.
After the success of our last embedded / electronics night, I thought we should have another! I'm proposing we get together on November 5th at 7:00
and I will start things off with a short, informal demo of my latest project, the μJoypad, a nickel sized NES controller[1][2]. I designed the board
using the free and open source tools available as part of the gEDA project and will be showing how I used those tools to quickly put together the
schematic and PCB layout.