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
[This is a minimal HTTP server written in EDSAC assembly. | |
It uses initial orders 1 | |
The program itself starts on line 31 to align instructions with their resident memory addresses | |
It will run in the great EDSAC simulator found at | |
http://nhiro.org/learn_language/repos/EDSAC-on-browser/index.html] | |
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
;; mu4e toggle html images | |
(defvar killdash9/mu4e~view-html-images nil | |
"Whether to show images in html messages") | |
(defun killdash9/mu4e-view-toggle-html-images () | |
"Toggle image-display of html message." | |
(interactive) | |
(setq-local killdash9/mu4e~view-html-images (not killdash9/mu4e~view-html-images)) | |
(message "Images are %s" (if killdash9/mu4e~view-html-images "on" "off")) | |
(mu4e-view-refresh)) |
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/bash | |
#Serves the current directory. | |
test -p .f||mkfifo .f;while :;do cat .f|nc -l ${1:-1234}|(read m u p;echo $u;u=${u#/};{ echo -e 'HTTP/1.0 200 OK\nContent-type:text/html\n';test -d $u&&ls $u|sed "s,.*,<a href=\"$u/&\">&<br>,"||cat $u;}>.f);done |
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 patch-function (func-symbol regexp rep) | |
"Redefine the function given by FUNC-SYMBOL by replacing all | |
occurrences of REGEXP with REP in its source definition. The | |
function is evaluated with the changes and then reverted to its | |
original form so that the original source code file is left | |
unmodifed. This makes `patch-function' idempotent. | |
REGEXP is a regular expression to search for in FUNC-SYMBOL's | |
definition. |
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
# Step 1: Install the following 3rd party prerequisites, you can get these from macports: | |
# | |
# sudo port install libpng | |
# sudo port install libsdl_ttf | |
# sudo port install libsdl_mixer | |
# | |
# Step 2: Download and unzip Vulture Nethack source from http://www.darkarts.co.za/vulture-for-nethack | |
# | |
# Step 3: Place this file at the base of the unzipped vulture nethack source directory, and run it: | |
# sh vulture-nethack-mac-build.sh |
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
;; For best results, run this after installing the Atari Classic Chunky font from | |
;; http://members.bitstream.net/marksim/atarimac/fonts.html | |
(deftheme atari | |
"Atari 800 Color Theme") | |
(defun atari-click () | |
"Play the Atari Basic click" | |
(when (symbolp this-command) | |
(let ((c (symbol-name this-command))) |
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
(require 'battery) | |
(defadvice zone (around zone-dont-run-on-battery activate) | |
"Only zone when under power" | |
(when (equal (cdr (assoc ?L (funcall battery-status-function))) "AC") | |
ad-do-it)) |