Skip to content

Instantly share code, notes, and snippets.


Block or report user

Report or block Zoxc

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
Zoxc / ggpk_defragment.rb
Last active Apr 26, 2019
GGPK Defragmenter
View ggpk_defragment.rb
require 'bindata'
require 'benchmark'
require 'win32/registry'
require 'io/console'
class GGPK
class UTF16String < BinData::String
def snapshot
View PoE NPL
struct PoEEmpty
[DataTypeByteOrder = 1] UnsignedNumber PoEU16
Size = 2
[DataTypeByteOrder = 0] UnsignedNumber PoEU16LE
Zoxc / injector.cpp
Created Jun 10, 2012
DLL Injector for x86/x64
View injector.cpp
#pragma once
#include <SDKDDKVer.h>
#define NOMINMAX
#include <windows.h>
#include <tchar.h>
#include <shellapi.h>
#include <string>
#include <sstream>
#include <functional>
Zoxc /
Last active Sep 23, 2017
rustc TyCtxt model
use std::cell::RefCell;
use std::collections::HashSet;
// This is the mapping of types in this model to types in rustc:
// model => rustc
// TyS<'a> => TyS<'tcx>
// Ty<'a> => Ty<'tcx>
// Arena => DroplessArena
// Interner<'cx> => CtxtInterner<'tcx>
// Ctxt<'a, 'gcx, 'lcx> => TyCtxt<'a, 'gcx, 'tcx>
// A function pointer and some data to pass to the callback
pub struct Callback<R> {
pointer: fn (R, *const ()),
data: *const (),
// This is the trait implemented for generators
pub trait Future {
type Return;
View Avery

Remote procedure calls in Avery


Avery's RPCs are based on capabilities. A capability is a reference to an object which the process has previously received. If you do not have a capability to an object, you cannot communicate with it.

You can do asynchronous calls to objects. These in calls, arguments and return values can contain both bytes and capabilities. If you send a capability to another process it gains access to it.

Objects belong to an event loop (a kernel object) and all messages sent to it is queued there.


Capability system

This is a sketch of a capability system which utilised data and operations in kernel mode.

There are 2 kernel objects used to support the capability system, Vat and Call. Cap is a global identifier of a capability consisting of a Vat reference and a vat defined number.


enum Message {
View gist:8629159
use "../core"
enum Token
struct Lexer
struct State
lexer *Lexer
Zoxc / gist:5765678
Last active Dec 18, 2015
Rendering on multiple threads with Wayland subsurfaces
View gist:5765678
mutex commit
atomic<int> render_complete_count
signal resizing_complete
apply_pending_state(surface) {
wl_surface_attach(surface, ...)
wl_surface_damage(surface, ...)
Zoxc / gist:5566293
Last active Dec 17, 2015
Syntax for variable and field declarations
View gist:5566293
Type trailing with colon
global, other_global: int
yet_another_global: () -> string
a, c: int
b := 4
Type trailing and var keyword
You can’t perform that action at this time.