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 / dni-do-konca.py
Created April 11, 2012 18:04
Dni do końca roku (by Grześ)
#-*- encoding: utf-8 -*-
#obliczanie ilości dni do końca roku szkolnego
import datetime
rok = datetime.datetime.now().year
if (rok % 4 == 0 and rok % 100 != 0) or rok % 100 == 0:
prz=True
@semahawk
semahawk / .gitignore
Created April 12, 2012 19:04
Dni do końca roku
*.o
dni-do-konca
@semahawk
semahawk / menu.lst
Created April 18, 2012 18:25
My menu.lst file.
# Config file for GRUB - The GNU GRand Unified Bootloader
# /boot/grub/menu.lst
# DEVICE NAME CONVERSIONS
#
# Linux Grub
# -------------------------
# /dev/fd0 (fd0)
# /dev/sda (hd0)
# /dev/sdb2 (hd1,1)
@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;
};
@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 / 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.
*
*/
/*
* 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>
/*
* 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
*
SRCS=skelkld.c
KMOD=skeleton
.include <bsd.kmod.mk>
@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)
*