Skip to content

Instantly share code, notes, and snippets.

Formand
.
Næstformand .......
.
.........................
. . .
. . .
. . .
Afvikling Marketing .
af LAN og PR Administration
@Munksgaard
Munksgaard / tetris.el
Created April 30, 2012 13:22
tetris mod
;;; tetris.el --- implementation of Tetris for Emacs
;; Copyright (C) 1997, 2001-2012 Free Software Foundation, Inc.
;; Author: Glynn Clements <glynn@sensei.co.uk>
;; Version: 2.01
;; Created: 1997-08-13
;; Keywords: games
;; This file is part of GNU Emacs.
http://blog.zx2c4.com/749
@Munksgaard
Munksgaard / .emacs
Created September 4, 2012 12:35
Emacs + mosml
(require 'sml-mode)
(setq auto-mode-alist (cons '("\\.sml$" . sml-mode) auto-mode-alist))
(setq auto-mode-alist (cons '("\\.sig$" . sml-mode) auto-mode-alist))
(add-hook 'sml-mode-hook
(lambda() ;;; *** SML-mode Customization
(setq sml-program-name "mosml")
(setq sml-default-arg "-P full")
(setq sml-indent-level 4) ; conserve on horizontal space
(setq words-include-escape t) ; \ loses word break status
@Munksgaard
Munksgaard / javapathwindows
Created November 22, 2012 10:57
How to add Java executables to your PATH
This guide is intended to help you set up your PATH in Windows for Java executables. This will enable you to run the Java executables, java, javac and others, from your commandline (cmd.exe). It is assumed that you have installed the Java 7 JDK already
First find the location of the Java executables. These are usually located in something like
C:\Program Files\Java\java-1.7.0-jdk\bin\
Now, how you proceed from here depends on your version of Windows:
For Windows 7
- Select Computer from the Start menu
@Munksgaard
Munksgaard / gist:4720984
Created February 6, 2013 07:40
blackstone
<!--
d8888bL d8888bL .d88bL 88 d88888 .o88bL d888888b
88 8D 88 8D .8P Y8L 8P 88 d8P Y8 88
88oodD' 88oobY' 88 88 88 88oooo 8P 88
88 88 88 `8b d8' Y8 88 88 Y8b d8 88
88 88 YD `Y88P' Y888' Y88888 `Y88P' YP
@Munksgaard
Munksgaard / gist:7573433
Created November 20, 2013 23:53
MosML Shuffle
load "Random";
signature SHUFFLE =
sig
val shuffle : 'a list -> 'a list;
end;
structure Shuffle :> SHUFFLE =
struct
javascript:(function(){"use strict";var BLOCKED_WORDS=["left","right","up","down","start","select","a","b","democracy","anarchy","oligarchy","bureaucracy","monarchy","alt f4","helix"];var BLOCKED_URLS=["nakedjenna","bit.ly","bitly","tinyurl","teespring","youtube.com/user","naked-riley","twitch.tv","ow.ly","steam-games-free","free-steam-games","cheap games"];var MINIMUM_MESSAGE_LENGTH=3;var MAXIMUM_NON_ASCII_CHARACTERS=2;var MINIMUM_DISTANCE_ERROR=2;var myWindow;try{myWindow=unsafeWindow}catch(e){myWindow=window}var $=myWindow.jQuery;var commands_regex=new RegExp("^(("+BLOCKED_WORDS.join("|")+")\\d?)+$","i");function min_edit(a,b){if(a.length===0)return b.length;if(b.length===0)return a.length;var matrix=[];for(var i=0;i<=b.length;i++){matrix[i]=[i]}for(var j=0;j<=a.length;j++){matrix[0][j]=j}for(var i=1;i<=b.length;i++){for(var j=1;j<=a.length;j++){if(b.charAt(i-1)==a.charAt(j-1)){matrix[i][j]=matrix[i-1][j-1]}else{matrix[i][j]=Math.min(matrix[i-1][j-1]+1,Math.min(matrix[i][j-1]+1,matrix[i-1][j]+1))}}}return
@Munksgaard
Munksgaard / plade.js
Created March 21, 2014 14:51
Bankopladegenerator
var count = 0;
function nextrow(row) {
var i,j;
for (i = 0; i < 5; i++) {
if (i == 4 && row[i] == 8) {
return null;
} else if (i == 4 || row[i] < row[i+1] - 1) {
row[i]++;
for (j=0; j<i; j++) row[j] = j;
$ cargo run
Compiling cube v0.0.0 (file:///home/munksgaard/src/piston-examples/gfx_cube)
src/main.rs:51:29: 51:50 error: wrong number of lifetime parameters: expected 1, found 0 [E0107]
src/main.rs:51 static VERTEX_SRC: &'static gfx::ShaderSource<u8> = shaders! {
^~~~~~~~~~~~~~~~~~~~~
src/main.rs:51:29: 51:50 error: wrong number of type arguments: expected 0, found 1
src/main.rs:51 static VERTEX_SRC: &'static gfx::ShaderSource<u8> = shaders! {