Skip to content

Instantly share code, notes, and snippets.

@JRHeaton
JRHeaton / jmp_opcode.c
Created May 31, 2012 05:56
Generate opcode for intel jmp
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
typedef unsigned char byte_t;
typedef struct {
byte_t inst;
byte_t dest[4];
} jmp_inst_t;
@JRHeaton
JRHeaton / pcomb2.swift
Last active August 29, 2015 14:18
more parser combinator fun (i have no idea what i'm doing :D)
class Box<T>: Printable {
let unbox: T
init(_ value: T) {
self.unbox = value
}
var description: String {
return toString(unbox)
}