This file contains 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
;; contact my little url server. | |
(defun browse-url-remotely (&optional url new-window) | |
(interactive) | |
(let* ((url (or url (thing-at-point 'url))) | |
(url-server (open-network-stream "url-server" nil "localhost" 7654))) | |
(process-send-string url-server (format "%s\n" url)) | |
(delete-process url-server))) |
This file contains 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 | |
#| Hey Emacs, this is -*-scheme-*- code! | |
exec mzscheme --require "$0" --main -- ${1+"$@"} | |
|# | |
#lang scheme | |
(require ... |
This file contains 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 replace-in-matching-lines (sought-re old-re new) | |
(interactive "sMatch lines containing:\nsOld regexp:\nsReplacement:") | |
(while (re-search-forward sought-re (point-max) t) | |
(save-restriction | |
(narrow-to-region (line-beginning-position) | |
(line-end-position)) | |
(goto-char (point-min)) ;i.e., beginning of line | |
(while (re-search-forward old-re (point-max) | |
t) | |
(replace-match new))) |
This file contains 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
<?xml version="1.0" encoding="UTF-8"?> | |
<opml version="1.0"> | |
<head> | |
<title>offby1 subscriptions in Google Reader</title> | |
</head> | |
<body> | |
<outline title="lisp etc." text="lisp etc."> | |
<outline text="a CONS is an object which cares" | |
title="a CONS is an object which cares" type="rss" | |
xmlUrl="http://carcaddar.blogspot.com/feeds/posts/default" htmlUrl="http://carcaddar.blogspot.com/"/> |
This file contains 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
(ns anagrams | |
(:use [clojure.contrib.str-utils]) | |
(:require [clojure.contrib.str-utils2 :as su]) | |
(:use [clojure.test])) | |
(defn contains-vowel? [w] | |
(some #(su/contains? w %) | |
(list "a" "e" "i" "o" "u" "y"))) | |
(defn word-acceptable? [w] |
This file contains 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
(ns anagrams | |
(:use [clojure.contrib.str-utils]) | |
(:require [clojure.contrib.str-utils2 :as su]) | |
(:use [clojure.test])) | |
(set! *warn-on-reflection* true) | |
(defn contains-vowel? [w] | |
(some #(su/contains? w %) | |
(list "a" "e" "i" "o" "u" "y"))) |
This file contains 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
configure:30224: checking for pkg-config | |
configure:30242: found /usr/bin/pkg-config | |
configure:30254: result: /usr/bin/pkg-config | |
configure:30279: checking pkg-config is at least version 0.9.0 | |
configure:30282: result: yes | |
configure:30293: checking for BDW_GC | |
configure:30301: $PKG_CONFIG --exists --print-errors "bdw-gc" | |
Package bdw-gc was not found in the pkg-config search path. | |
Perhaps you should add the directory containing `bdw-gc.pc' | |
to the PKG_CONFIG_PATH environment variable |
This file contains 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
#lang scheme | |
(require (planet soegaard/math/math)) | |
(define (max-sum limit) | |
(for*/fold ([max #f] | |
[old-a #f] | |
[old-b #f]) | |
([a (in-range limit)] | |
[b (in-range a)]) |
This file contains 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
;; in ~/.emacs.el ... | |
(load "reaper") | |
;; reaper.el | |
(if (fboundp 'buffer-creation-time) | |
(progn | |
(defun kill-them-buffers () | |
(mapc | |
(lambda (p) | |
(flet ((time->string |
This file contains 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
20:53:56 [erich@debian chibi] (master)$ emacsclient --eval '(w3m-namazu "all" "foo")' | |
*ERROR*: Symbol's function definition is void: w3m-namazu | |
21:13:45 [erich@debian chibi] (master)$ emacsclient --eval '(identity "all" "foo")' | |
*ERROR*: Wrong number of arguments: identity, 2 | |
21:13:57 [erich@debian chibi] (master)$ emacsclient --eval '(identity "all" )' | |
"all" | |
21:14:01 [erich@debian chibi] (master)$ |