Skip to content

Instantly share code, notes, and snippets.

Tim Hentenaar thentenaar

Block or report user

Report or block thentenaar

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@thentenaar
thentenaar / dn3dwt-eduke32.patch
Last active Oct 14, 2016
eDuke32 Patch for Duke Nukem 3D: World Tour
View dn3dwt-eduke32.patch
This patches the config files shipped with Duke Nukem World Tour so that
the levels should be playable with eduke32. There don't seem to be any
ogg sound effects for Duke's breathing, or the turret sounds, so I've
restored the original filename from Atomic Edition.
I've corrected the pathnames to use '/' as a separator, and altered the
case so that the filenames coincide with the actual filenames in the
sound directory.
I've removed the stuff specific to the 'playback' functionality as
@thentenaar
thentenaar / sunos-551-paging-bug-fix.c
Created Jul 24, 2015
Patch for the paging bug on Solaris 2.5.1 (SunOS 5.5.1) i386
View sunos-551-paging-bug-fix.c
/**
* Patch to fix the paging bug in the SunOS 5.5.1 (i386) kernel
* Copyright (C) 2015 Tim Hentenaar
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* 1. Redistributions of source code must retain the above copyright
@thentenaar
thentenaar / echo-server-6.c
Created Jan 27, 2015
Simple echo server: Refactor #6: Move the work loop back out into its own function.
View echo-server-6.c
/**
* Simple echo server
*
* This program listens for connections on the
* loopback interface, on port 9999. Upon connecting,
* The first line we read, of up to BUF_LEN bytes, is
* then sent back to the sender, and the connection
* is closed.
*/
#include <stdio.h>
@thentenaar
thentenaar / echo-server-5.c
Created Jan 27, 2015
Simple echo server: Refactor #5: Reduce the depth of nesting in main().
View echo-server-5.c
/**
* Simple echo server
*
* This program listens for connections on the
* loopback interface, on port 9999. Upon connecting,
* The first line we read, of up to BUF_LEN bytes, is
* then sent back to the sender, and the connection
* is closed.
*/
#include <stdio.h>
@thentenaar
thentenaar / echo-server-4.c
Created Jan 27, 2015
Simple echo server: Refactor #4: Replace duplicate returns with goto
View echo-server-4.c
/**
* Simple echo server
*
* This program listens for connections on the
* loopback interface, on port 9999. Upon connecting,
* The first line we read, of up to BUF_LEN bytes, is
* then sent back to the sender, and the connection
* is closed.
*/
#include <stdio.h>
@thentenaar
thentenaar / echo-server-3.c
Created Jan 26, 2015
Simple echo server: Refactor #3: Change the work loop's while into a do { } while(), and make it smaller
View echo-server-3.c
/**
* Simple echo server
*
* This program listens for connections on the
* loopback interface, on port 9999. Upon connecting,
* The first line we read, of up to BUF_LEN bytes, is
* then sent back to the sender, and the connection
* is closed.
*/
#include <stdio.h>
@thentenaar
thentenaar / echo-server-2.c
Created Jan 26, 2015
Simple echo server: Refactor #2: Move the work loop into its own function.
View echo-server-2.c
/**
* Simple echo server
*
* This program listens for connections on the
* loopback interface, on port 9999. Upon connecting,
* The first line we read, of up to BUF_LEN bytes, is
* then sent back to the sender, and the connection
* is closed.
*/
#include <stdio.h>
@thentenaar
thentenaar / echo-server-1.c
Created Jan 26, 2015
Simple echo server: Refactor #1: Move the socket setup code into its own function.
View echo-server-1.c
/**
* Simple echo server
*
* This program listens for connections on the
* loopback interface, on port 9999. Upon connecting,
* The first line we read, of up to BUF_LEN bytes, is
* then sent back to the sender, and the connection
* is closed.
*
* Refactor #1 - Move socket creation code into its own
@thentenaar
thentenaar / echo-server.c
Created Jan 26, 2015
A very simple, and quickly implemented, echo server
View echo-server.c
/**
* Simple echo server
*
* This program listens for connections on the
* loopback interface, on port 9999. Upon connecting,
* The first line we read, of up to BUF_LEN bytes, is
* then sent back to the sender, and the connection
* is closed.
*/
#include <stdio.h>
@thentenaar
thentenaar / add_to_calcurse.sh
Last active Aug 29, 2015
A simple script for importing text/calendar files into calcurse
View add_to_calcurse.sh
#!/bin/bash
#
# Import text/calendar files from mutt
# to calcurse.
#
# Make sure calcurse is running
if [ ! -f "$HOME/.calcurse/.calcurse.pid" ]; then
exit 1
fi
You can’t perform that action at this time.