Skip to content

Instantly share code, notes, and snippets.

@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 / .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
http://blog.zx2c4.com/749
@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.
Formand
.
Næstformand .......
.
.........................
. . .
. . .
. . .
Afvikling Marketing .
af LAN og PR Administration
(require :bordeaux-threads)
(defparameter *tmp* 40)
(defun threadfun ()
(format t "*tmp*: ~A~%" *tmp*))
(defun bob ()
(let* ((bordeaux-threads:*default-special-bindings*
(acons '*tmp* 42
(require :bordeaux-threads)
(defparameter *tmp* nil)
(defun threadfun ()
(declare (ignorable *tmp*))
(princ "printing *tmp*")
(print *tmp*)
(finish-output)
*tmp*)
#ifndef FRAGMENT_PROGRAM_H
#define FRAGMENT_PROGRAM_H
//
// Graphics Framework.
// Copyright (C) 2007 Department of Computer Science, University of Copenhagen
//
#include <iostream>
#include <iomanip>
#include "graphics/graphics.h"
#include <cmath>
uint32_t l2b32 (uint32_t x)
{
uint8_t *p = &x;
return p[0] + p[1] << 8 + p[2] << 16 + p[3] << 24;
}
uint2_t b2l32_t (uint32_t x)
{
uint8_t *p = &x;
return p[3] + p[2] << 8 + p[1] << 16 + p[0] << 24;
philip@philip-VirtualBox:~/tmp$ cake new test
[new] Creating a new project based on ~/.cake/templates/default
[new] Copying 4 files to /home/philip/tmp/test
[new] Copied 4 empty directories to 1 empty directory under /home/philip/tmp/test
[new] Renaming directories with +project+ in their name
[new] Replacing +project+ with 'test' in all files.
philip@philip-VirtualBox:~/tmp$ cd test/
philip@philip-VirtualBox:~/tmp/test$ cake -v
[cake] running from git checkout
[start] starting cake jvm