Skip to content

Instantly share code, notes, and snippets.

View catb0t's full-sized avatar
💭
hmm

Cat Stevens catb0t

💭
hmm
View GitHub Profile
@catb0t
catb0t / minunit.h
Created February 12, 2016 02:14 — forked from sam159/minunit.h
minunit header for unit testing c code
/*
* File: minunit.h
* Author: Zed. A. Shaw, Sam
*
* @see http://c.learncodethehardway.org/book/ex30.html
*
* Created on 27 August 2014, 22:14
*/
#ifndef MINUNIT_H
@catb0t
catb0t / signal.c
Created February 28, 2016 20:32 — forked from aspyct/signal.c
Unix signal handling example in C, SIGINT, SIGALRM, SIGHUP...
/**
* More info?
* [email protected]
* http://aspyct.org
* @aspyct (twitter)
*
* Hope it helps :)
*/
#include <stdio.h>
@catb0t
catb0t / LICENSE.txt
Created May 2, 2016 18:00 — forked from jed/LICENSE.txt
generate random UUIDs
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 Jed Schmidt <http://jed.is>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@catb0t
catb0t / setuidtest.c
Last active October 30, 2018 20:35
setuidtest explicit w/syscalls
#define _GNU_SOURCE
#include <stdio.h>
#include <unistd.h>
#include <sys/syscall.h>
void printid(void) {
uid_t r, e, s;
getresuid(&r, &e, &s);
printf("real: %d eff: %d saved: %d\n", r, e, s);
}
@catb0t
catb0t / wordmap.csv
Created May 30, 2019 02:35 — forked from BenTheHokie/wordmap.csv
Phonetically correct word scrambler
I EIGH
J DGE
U OU
S ZE
T TTE
TH CHTH
R EUR
EW IEU
U OU
P PPE
interface val Auth
fun val apply[B: Auth val](): B ? =>
this as B
fun val add(that: Auth): AuthSet =>
AuthSet(this, that)
class val AuthSet is Auth
let _a: Auth
let _b: Auth