Skip to content

Instantly share code, notes, and snippets.

@maxymania
maxymania / Makefile
Last active June 4, 2025 15:02
secmalloc.c: Small, Secure Malloc implementation.
secmalloc.o: secmalloc.c
gcc -c -fPIC secmalloc.c -o secmalloc.o
secmalloc.so: secmalloc.o
gcc -shared -Wl,-soname,secmalloc.so -o secmalloc.so secmalloc.o
@maxymania
maxymania / hash.c
Last active January 8, 2016 09:45 — forked from tonious/hash.c
A quick hashtable implementation in c.
#define _XOPEN_SOURCE 500 /* Enable certain library functions (strdup) on linux. See feature_test_macros(7) */
#include <stdlib.h>
#include <stdio.h>
#include <limits.h>
#include <string.h>
struct entry_s {
char *key;
char *value;
@maxymania
maxymania / cparser.go
Created November 20, 2015 13:32
Parser for a C-like language
/*
Copyright (c) 2015 Simon Schmidt
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions:
@maxymania
maxymania / Get_File_Acls.c
Created September 10, 2015 05:03
Get POSIX File ACLs on Linux
/*
* Copyright 2015 Simon Schmidt
*
* Usage of the works is permitted provided that this instrument is
* retained with the works, so that any entity that uses the works
* is notified of this instrument.
* DISCLAIMER: THE WORKS ARE WITHOUT WARRANTY.
*/
#include <stdio.h>
#include <stdint.h>
@maxymania
maxymania / fcgiclient.go
Last active December 20, 2015 20:37 — forked from wofeiwo/fcgiclient.go
// Copyright 2015 Simon Schmidt
// Copyright 2012 Junqing Tan <[email protected]> and The Go Authors
// Use of this source code is governed by a BSD-style
// Part of source code is from Go fcgi package
// Fix bug: Can't recive more than 1 record untill FCGI_END_REQUEST 2012-09-15
// By: wofeiwo
package fcgiclient
@maxymania
maxymania / README
Created June 11, 2015 13:51
Scrapland template
used template: http://www.opendesigns.org/design/html5-streets/
Other:
- http://www.opendesigns.org/design/html5-water/
- http://www.opendesigns.org/design/html5-buildings/
- http://www.opendesigns.org/design/blue-skies/
@maxymania
maxymania / bsc1.c
Created April 4, 2014 12:00
Block Sequence Cipher 1
/*
* I dedicate any and all copyright interest in this software to the
* public domain. I make this dedication for the benefit of the public at
* large and to the detriment of my heirs and successors. I intend this
* dedication to be an overt act of relinquishment in perpetuity of all
* present and future rights to this software under copyright law.
*
* For more information, please refer to <http://unlicense.org/>
*/
#include <stdint.h>