This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
datatype bentSpil = BentSlutter of int | |
| BentSpiller of ingeSpil list | |
and ingeSpil = IngeSlutter of int | |
| IngeSpiller of bentSpil list | |
(* bent8 *) | |
local | |
val inge3 = IngeSpiller [ BentSlutter 0 ] | |
val inge4 = IngeSpiller [ BentSlutter 0, BentSlutter 1 ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(* 4M1 *) | |
local | |
val jens = PLAYER "Jens" | |
val mette = PLAYER "Mette" | |
val ian = PLAYER "Ian" | |
val helle = PLAYER "Helle" | |
val yuan = PLAYER "Yuan" | |
val anne = PLAYER "Anne" | |
val yasmin = PLAYER "Yasmin" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun kb (k) (read-kbd-macro k)) | |
(dolist (pair | |
'(("C-k" kill-whole-line) | |
("C-n" dabbrev-expand) | |
("C-x C-g" goto-line) | |
("C-<tab>" next-multiframe-window) | |
)) | |
(global-set-key (kb (car pair)) (cadr pair))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
set -e # Stop on first error | |
PREFIX=/opt/osm | |
tar xfz binutils-2.23.tar.gz | |
mkdir build-binutils; cd build-binutils | |
../binutils-2.23/configure --target=mips-elf --prefix=$PREFIX | |
make | |
sudo make install |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; I don't use these macros very often, but I keep them here because they | |
;; might be useful if I should want to make similar macros in the future. | |
(defun absalon-html-escape-code () | |
"Wrap marked region with HTML pre codes." | |
(interactive) | |
(save-excursion (goto-char (region-beginning)) | |
(insert "<pre style=\"background: #eee; padding: 1em\">\n")) | |
(save-excursion (goto-char (region-end)) | |
(insert "</pre>"))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module BFName where | |
import Data.Char | |
import Data.List | |
makeName :: String -> String | |
makeName = makeBase | |
(***) :: String -> Int -> String | |
s *** n = concat (replicate n s) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
PRINTER=s2a | |
COPIES=1 | |
ARGS="" | |
HOST=tyr | |
DRY=0 | |
if ! opts=$(getopt -o p:n:r:h:fd24 -l fit,duplex,host:,range:,dry -- "$@") | |
then | |
echo "Usage: dprint [-p printer] [-n copies] [--fit] [--duplex] [-2 | -4]" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
PRINTER=s2a | |
COPIES=1 | |
ARGS="" | |
HOST=tyr | |
DRY=0 | |
if ! opts=$(getopt -o p:n:r:h:fd24 -l fit,duplex,host:,range:,dry -- "$@") | |
then | |
echo "Usage: dprint [-p printer] [-n copies] [--fit] [--duplex] [-2 | -4]" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun kb (k) (read-kbd-macro k)) | |
(dolist (pair | |
'(("C-z" undo) | |
("C-k" kill-whole-line) | |
("M-c" comment-region) | |
("M-u" uncomment-region) | |
("C-<return>" mark-paragraph) | |
("C-n" dabbrev-expand) | |
("C-g" goto-line) | |
("C-+" text-scale-increase) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(* Opgave 5 *) | |
datatype 'a trae = K of 'a * ('a trae list) | |
(* a *) | |
local | |
val v7 = K (7, []) | |
val v6 = K (6, []) | |
val v5 = K (5, [v6, v7]) | |
val v1 = K (1, []) | |
val v4 = K (4, [v7, v1, v5]) |