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 select-next-window () | |
"Switch to the next window" | |
(interactive) | |
(select-window (next-window))) | |
(defun select-previous-window () | |
"Switch to the previous window" | |
(interactive) | |
(select-window (previous-window))) |
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
\documentclass[a4paper]{article} | |
\usepackage[utf8]{inputenc} | |
\usepackage[danish]{babel} | |
\usepackage{amsmath} | |
\usepackage{amsfonts} | |
\usepackage{amssymb} | |
\author{John Doe} | |
\title{... før nu og i fremtiden} |
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
Config { font = "-*-Fixed-*-R-Normal-*-13-*-*-*-*-*-*-*" | |
, bgColor = "black" | |
, fgColor = "grey" | |
, position = Top | |
, commands = [ | |
Run Cpu ["-L","5","-H","50","--normal","green","--high","red"] 10 | |
, Run Memory ["-t","Mem: <usedratio>%"] 10 | |
, Run Date "%a %b %_d %H:%M" "date" 10 | |
, Run BatteryP ["BAT0"] ["-t","<acstatus><left>%","--", | |
"-O","<fc=green>+</fc>","-o","<fc=red>-</fc>", |
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
(* concatMap : ('a -> 'b list) -> 'a list -> 'b list | |
* Forklaring: | |
* f x = [y1,...,yn] | |
* map f xs = [[a1,...,an], [b1,...,bn], ..., [z1,...,zn]] | |
* concat (map f xs) = [a1,...,an,b1,...,bn,z1,...zn] *) | |
fun concatMap f xs = List.concat (map f xs) | |
(* foranNte x xss n: sætter x som det første element i den n'te liste i xss. | |
* Eks.: foranNte 0 [[1,2],[3,4],[5,6],[7,8]] 2 = [[1,2],[3,4],[0,5,6],[7,8]] | |
*) |
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]) |
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
#!/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
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
;; 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>"))) |