Skip to content

Instantly share code, notes, and snippets.

; Bjoern Hoehrmann <bjoern@hoehrmann.de> <http://bjoern.hoehrmann.de>
(require (lib "graphics.ss" "graphics"))
; Konstanten
(define BREITE 650) ; Breite des Fensters
(define HOEHE 255) ; Hoehe des Fensters
(define ERSTES-X 0.5) ; erster wert fuer x (es muss gelten 0<x<1)
(define WDH-SCHRITT-1 300) ; Wiederholungen im ersten Schritt
(define WDH-SCHRITT-2 100) ; Wiederholungen im zweiten Schritt
@hoehrmann
hoehrmann / springer.scm
Created June 10, 2013 18:05
Solution for the knight's tour problem in Scheme written around 2003 as part of an assignment.
; Bjoern Hoehrmann -- <bjoern@hoehrmann.de> -- <http://bjoern.hoehrmann.de>
; Global constants and type definitions
(define empty-char 0)
(define HEIGHT 5)
(define WIDTH 5)
(define START-X 0)
(define START-Y 0)
(define-struct move (x y))
(define knightmoves
@hoehrmann
hoehrmann / 4wins.scm
Last active December 18, 2015 08:00
An implementation of Captain's mistress in Scheme written around 2003 as part of an assignment.
; +-------------------------------------------------------------------------+
; Bjoern Hoehrmann -- <bjoern@hoehrmann.de> -- <http://bjoern.hoehrmann.de>
; +-------------------------------------------------------------------------+
(define HEIGHT 6)
(define WIDTH 7)
(define X-WINS 4)
(define empty-char "-")
(define x-char "x")
@hoehrmann
hoehrmann / w3c-mailing-list-archive-to-mbox.js
Created June 8, 2013 10:08
User script ("greasemonkey script") web browser extension that shows on pages like http://lists.w3.org/Archives/Public/www-talk/ checkboxes to select periods and a [mbox] button that when clicked retrieves mails from the archive according to the selection and then turns them into plain text mbox files that can be saved to disk for import into ma…
// ==UserScript==
// @name Generate mbox files for W3C list archives
// @description Generate mbox files for W3C list archives
// @version 0.9
// @author Bjoern Hoehrmann
// @license GPLv3+
// @include http://lists.w3.org/Archives/*
// @include https://lists.w3.org/Archives/*
// ==/UserScript==
@hoehrmann
hoehrmann / TEX2BMP.pas
Created June 6, 2013 10:41
Converter for .TEX texture files from SquareSoft's Final Fantasy VII to Windows BMP files.
{ _Add wildcards, parameter comfort, seperate file extraction for manipulation,
graphical output, check for xdim, memory using Speedup for swapping,..._ }
{$Q-}
program TEXfileUnpack;
(* Converts .TEX Files from SquareSoft's Final Fantasy VII TO BMP files *)
(* Copyright (c) 1998 by Bjoern Hoehrmann All rights reserved *)
type
@hoehrmann
hoehrmann / lgpunp.pas
Created June 5, 2013 13:13
Final Fantasy VII (PC) .lgp package file extractor, anno 1998.
program LgpUnp;
(* Extracts Files from SquareSoft's Final Fantasy VII .LGP files *)
(* Copyright (c) 1998 by Bjoern Hoehrmann All rights reserved *)
var Index:record { Entry in the filelist at the beginning }
Name:array[0..19] of char; { Filename }
offset:longint; { FileOffset of this file }
res:longint; { Unused Data }
end;
@hoehrmann
hoehrmann / Guestbok.pas
Created June 5, 2013 12:55
1997 Turbo Pascal Web Guestbook CGI program, with <font> tags and other features.
{$M 16384,0,655360}
uses dos,strings,cgitool,filetool;
var OutBuf,InBuf:array[0..2047] of char;
gb:file;
i,j,k:integer;
ch:char;
susername,semail,sdate:String;
comment:array[0..2047] of char;
s,qs:string;
GesAnz:longint;
@hoehrmann
hoehrmann / Xirip.pas
Created June 5, 2013 12:18
XiRip is a 1997 Turbo Pascal program that takes .xm music files and extracts the embedded instruments.
uses StrngTol;
type
parameter=record
FileName:String;
ExtractPath:String;
ShowHelpScreen:Boolean; {/?}
KeepInstName:boolean; {/K}
KeepSampName:boolean; {/S}
QuitOutput:Boolean; {/Q}
end;
@hoehrmann
hoehrmann / Tieinf.pas
Created June 5, 2013 12:10
1997 utility that reads TIE Fighter .tie mission files and prints out the mission's goals, especially the bonus goals and their score which are not available in-game.
uses tierec,strngtol;
type
fgdesk=record
name:string;
typ:string;
end;
var f:file;
header:fheader;
@hoehrmann
hoehrmann / Mathe.cpp
Last active December 18, 2015 01:49
MatheMatoFix Version 1.2W, relative of https://gist.github.com/5706362 and name "W" because it's for Windows, while the "D" version was for MS-DOS, at least that's what the COMAL implementation ran under. Also written in November 1998, one of my first C++ and Windows GUI programs. I'll have to see about adding the header and resource files so th…
// MatheMatoFix Version 1.2W
#include <windows.h>
#include "resource.h"
#include <math.h>
//-Globale Variablen---------------------------------
HWND hwnd_Mathe; // Mathematofix Main Window
//HINSTANCE hInst; // Global Instance
//-Globale Variablen ende----------------------------