Skip to content

Instantly share code, notes, and snippets.

View semahawk's full-sized avatar
💭
no tak

Szymon Urbaś semahawk

💭
no tak
  • Wrocław, Poland
View GitHub Profile
@semahawk
semahawk / fallout-passwords.c
Created November 17, 2015 13:47
Fallout-like password-guessing game in C.
/* szomon :] */
/*
* Fallout-like password-guessing game.
*
* Copyright: Szymon Urbaś
* Licensed under the BSD (2-clause) license.
*/
#include <ctype.h>
*.cmi
*.cmx
*.o
gaidhlig
@semahawk
semahawk / gentle.sml
Created November 26, 2013 21:35
This file contains some of the exercises found in "A Gentle Introduction to ML".
(* This file contains some of the exercises found in "A Gentle Introduction to ML" *)
(* right here: http://www.cs.nmsu.edu/~rth/cs/cs471/sml.html *)
(* Compiled using Moscow ML compiler version 2.01 *)
fun double x = 2 * x;
fun inc x = x + 1;
fun adda s = s ^ "a";
fun triple x = 3 * x;
@semahawk
semahawk / exec_order.c
Last active December 29, 2015 02:59
Just me trying to get some grasp around the execution order of an AST. Huh.... Nevermind that crap..
/*
*
* exec_order.c
*
* Created at: Fri 22 Nov 16:52:08 2013 16:52:08
*
* Author: Szymon Urbaś <szymon.urbas@aol.com>
*
* License: MIT (X11)
*
SRCS=skelkld.c
KMOD=skeleton
.include <bsd.kmod.mk>
/*
* kldmempeek.c
*
* Author: Szymon Urbaś <szymon.urbas@aol.com>
*
* Description: Take a hexdump-like peek at a module's bytes. It is very
* platform specific and _probably_ works _only_ under FreeBSD.
*
* License: the MIT (X11) License
*
/*
* This program defines two functions (excluding 'main') and makes a random call
* to one of those.
*
* Just wandering if C supports this kind of 'feature'.
*/
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
@semahawk
semahawk / hash.c
Created October 18, 2013 20:53
A simple hash implementation.
/*
*
* hash.c
*
* A simple hash implementation.
*
* It's not mine, the credit goes to The Book.
*
*/
@semahawk
semahawk / alloc.c
Last active December 25, 2015 19:49
/*
*
* alloc.c
*
* Created at: Thu 17 Oct 2013 17:23:59 CEST 17:23:59
*
* Author: Szymon Urbaś <szymon.urbas@aol.com>
*
* License: the MIT license
*
@semahawk
semahawk / mem.c
Created June 18, 2013 16:26
Reading into a struct from a file.
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
struct st {
int num;
char ch;
};