Skip to content

Instantly share code, notes, and snippets.

@fbmnds
fbmnds / Levenshtein
Created February 23, 2013 20:10
Levenshtein Distance - 4clojure #101
(fn f [a b]
(letfn [(clear-string [a]
(cond (string? a) a
(vector? a) (clojure.string/join (map str a))
:else (clojure.string/join
(filter #(not (= % \:))
(clojure.string/join (map str a))))))
(make-ls-d []
(with-local-vars
[ls-d (memoize
@fbmnds
fbmnds / Clojure.Main.bat
Last active December 17, 2015 04:18
Clojure.Main.bat
@echo off
%CLOJURE_CLR%\Clojure.Main.exe -i %CLOJURE_CLR%\init\init-clr.clj -r
@fbmnds
fbmnds / init-clr.clj
Created May 9, 2013 18:19
$CLOJURE_CLR/init/init-clr.clj
(in-ns 'user)
;; preload namespaces:
;; -------------------
;;
(require 'clojure.string)
(use '[clojure.pprint :only [pprint]])
@fbmnds
fbmnds / motd
Created May 9, 2013 18:22
~/etc/motd
;
repl basics:
------------
Exit: Control+C
Docs: (doc function-name-here)
(find-doc "part-of-name-here")
Source: (source function-name-here)
@fbmnds
fbmnds / path.bat
Created May 19, 2013 10:03
adapt $PATH
%CLOJURE_CLR%;C:\emacs\bin
@fbmnds
fbmnds / emacs.bat
Created May 19, 2013 10:05
Emacs dirs
# in Powershell, ls dereferences HOME Unix-like by $HOME and '~':
> ls ~\.emacs*
C:\Users\your-user-name\.emacs.d # Emacs-Live package directory
C:\Users\your-user-name\.emacs-live.el # Emacs-Live user configuration file
# in Cmd, ls dereferences HOME Windows-like only by %HOME%:
> ls %HOME%\.emacs*
C:\Users\your-user-name\.emacs.d # Emacs-Live package directory
C:\Users\your-user-name\.emacs-live.el # Emacs-Live user configuration file
@fbmnds
fbmnds / server.el
Created May 19, 2013 10:07
Emacs server config
; in ~\.emacs-live.el, at the top:
(require 'server)
(server-start)
@fbmnds
fbmnds / prev.reg
Created May 19, 2013 10:11
previous registry entry
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\*\shell]
[HKEY_CLASSES_ROOT\*\shell\removeproperties]
"ProgrammaticAccessOnly"="Apartment"
[HKEY_CLASSES_ROOT\*\shell\removeproperties\DropTarget]
"CLSID"="{09a28848-0e97-4cef-b950-cea037161155}"
@fbmnds
fbmnds / post.reg
Created May 19, 2013 10:13
posterior Registry
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\*\shell]
[HKEY_CLASSES_ROOT\*\shell\removeproperties]
"ProgrammaticAccessOnly"="Apartment"
[HKEY_CLASSES_ROOT\*\shell\removeproperties\DropTarget]
"CLSID"="{09a28848-0e97-4cef-b950-cea037161155}"
@fbmnds
fbmnds / emacsclient.bat
Created May 19, 2013 10:16
Emacs client
C:\emacs\bin\emacsclientw.exe "" -na C:\emacs\bin\runemacs.exe