Skip to content

Instantly share code, notes, and snippets.

View NickHu's full-sized avatar

Nick Hu NickHu

  • UK
View GitHub Profile
@NickHu
NickHu / framedelta.c
Last active April 8, 2020 16:26
reStream frame deltas with xor
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <sys/mman.h>
#include <fcntl.h>
#include <string.h>
#include <signal.h>
#include <assert.h>
@NickHu
NickHu / receiver.c
Created April 8, 2020 12:27
reStream lz4 streaming
#include <stdio.h>
#include <stdlib.h>
#include "lz4.h"
enum {
HEIGHT = 1872,
WIDTH = 1408,
BYTES_PER_PIXEL = 2,
WINDOW_BYTES = WIDTH*HEIGHT*BYTES_PER_PIXEL

Keybase proof

I hereby claim:

  • I am NickHu on github.
  • I am nickhu (https://keybase.io/nickhu) on keybase.
  • I have a public key whose fingerprint is B4F0 9027 7B71 B862 F1E3 6FA6 5E8E 74CE B831 FE6E

To claim this, I am signing this object:

# Maintainer: Nick Hu <me@nickhu.co.uk>
pkgname=fdr
pkgver=4.2.0
pkgrel=1
pkgdesc="Refinement checker for CSP"
arch=('x86_64')
url="https://www.cs.ox.ac.uk/projects/fdr/"
license=('custom')
depends=('libtinfo5')
source=("https://www.cs.ox.ac.uk/projects/fdr/downloads/fdr-3754-linux-x86_64.tar.gz")
import Control.Arrow
import Control.Monad
import Control.Monad.Fix
import Control.Monad.Trans.Class
import Control.Monad.Trans.Maybe
import Data.Maybe
import Data.List
import Data.Random.Extras
import Data.Random.RVar
import Data.Random.Source.DevRandom
" cvimrc
let locale = "uk"
let autoupdategist = "true"
let autohidecursor = "true"
let barposition = "bottom"
let hintcharacters = "asdfjkl;"
map <C-d> scrollPageDown
map <C-u> scrollPageUp
map <C-f> scrollFullPageDown
#!/usr/bin/env ruby
require 'mumble-ruby'
require 'ruby-mpd'
require 'sqlite3'
class Bot
attr_reader :queue
def initialize(client, mpd, quickmpd, karma_db)
@client = client
@mpd = mpd

Keybase proof

I hereby claim:

  • I am nickhu on github.
  • I am nickhu (https://keybase.io/nickhu) on keybase.
  • I have a public key whose fingerprint is D33C 26D7 6A2A 6B6D 2B7A 0D56 B58D 1B00 79EE C6F7

To claim this, I am signing this object:

@NickHu
NickHu / Fractal Bedroom Build by NickHu.mak
Last active December 17, 2015 03:38
A quickfort CSV of palin88's modified 3D fractal bedroom design for Dwarf Fortress, painstakingly crafted by hand and vim. Raw macros are also provided if you're too lazy to fire up quickfort. I don't know whether they will survive new versions of Dwarf Fortress, so note that the latest version at the current time of writing is v0.34.11. Dump ma…
Fractal Bedroom Build by NickHu
LEAVESCREEN
End of group
HOTKEY_GLASS_BLOCKS
HOTKEY_CARPENTER_BED
HOTKEY_SIEGE_BALLISTA
HOTKEY_CLOTHES_BOX
HOTKEY_CRAFTS_BONE
HOTKEY_BUILDING_BED
HOTKEY_BUILDING_SIEGEENGINE_BALLISTA