Skip to content

Instantly share code, notes, and snippets.

(ns coverager
(:import (com.thoughtworks.selenium DefaultSelenium)
(org.openqa.selenium.server SeleniumServer)
java.util.Date
(java.io FileWriter)
(java.text SimpleDateFormat))
(:use clojure.contrib.zip-filter.xml)
(:require [clojure.zip :as zip]
[clojure.xml :as xml]))
@ghoseb
ghoseb / ns-cheatsheet.clj
Last active May 20, 2024 13:01 — forked from alandipert/ns-cheatsheet.clj
Clojure ns syntax cheat-sheet
;;
;; NS CHEATSHEET
;;
;; * :require makes functions available with a namespace prefix
;; and optionally can refer functions to the current ns.
;;
;; * :import refers Java classes to the current namespace.
;;
;; * :refer-clojure affects availability of built-in (clojure.core)
;; functions.
@vangberg
vangberg / DWM-ON-OS-X.md
Created February 22, 2010 19:24
dwm on os x [work in progress!]

Installing and configuring dwm on OS X

  1. Install XQuartz (http://xquartz.macosforge.org) which is the development version of the X11.app that ships with OS X, which means it is way more up to date. I have had some weird issues with X11.app v. 2.3-something. XQuartz 2.5.0 fixed that.

  2. Install dwm from Homebrew, brew install dwm. This makes a bunch of necessary tweaks to the DWM configuration.

  3. Add the following script to $PATH, name it dwm-launch and chmod 755:

    cd ~
    

while true

(defun color-theme-dark-bliss ()
""
(interactive)
(color-theme-install
'(color-theme-dark-bliss
((foreground-color . "#eeeeee")
(background-color . "#001122")
(background-mode . dark)
(cursor-color . "#ccffcc"))
(bold ((t (:bold t))))
@michalmarczyk
michalmarczyk / clojure-font-lock-setup.el
Created March 19, 2010 06:02
coloured SLIME REPL for Clojure
;;; all code in this function lifted from the clojure-mode function
;;; from clojure-mode.el
(defun clojure-font-lock-setup ()
(interactive)
(set (make-local-variable 'lisp-indent-function)
'clojure-indent-function)
(set (make-local-variable 'lisp-doc-string-elt-property)
'clojure-doc-string-elt)
(set (make-local-variable 'font-lock-multiline) t)
(defn unuse [ns]
(doseq [[n v] (ns-refers *ns*)]
(if (= (.. v ns name) ns)
(ns-unmap *ns* n))))
(defn reuse [ns]
(unuse ns)
(remove-ns ns)
(use :reload-all ns))
@rlm
rlm / rlm_commands.clj
Created December 19, 2010 18:23
automatic reloading of namespaces
(ns rlm.rlm-commands
(:require [clojure.contrib [duck-streams :as ds]])
(:use [clojure.contrib java-utils]))
(defmacro undef
"removes symbol from the current namespace"
[symbol]
`(ns-unmap *ns* (quote ~symbol)))
(defmacro ns-nuke
@rlm
rlm / classpath_utils.clj
Created January 12, 2011 03:03
export_files.clj
(ns rlm.classpath-utils
(:require [clojure.contrib [duck-streams :as ds]])
(:use [clojure.contrib java-utils]))
(defn classpath []
(get-system-property "java.class.path"))
(defn add-to-classpath [file-name]
@munhitsu
munhitsu / gist:1034876
Last active November 29, 2020 09:10
python 2.7.5 install on OSX (10.8+) using brew (pip, easy_install, virtualenv, virtualenvwrapper)
# In case you had some strange python installation
# NOTE: .pydistutils.cfg seems to be not compatible with brew install python
# areas I needed to clean before installation
# clean up ~/Library/Python
# clean up .local
# preconditions:
# xcode with command line tools installed
xcode-select --install
@jvillste
jvillste / ricks-clojure.el
Created September 9, 2011 20:33 — forked from RickMoynihan/ricks-clojure.el
elisp for SLIME and swank-clojure
(defun clojure-reset-namespace ()
"Reloads the current Clojure namespace by first removing it and
then re-evaluating the slime buffer. Use this to remove old
symbol definitions and reset the namespace to contain only what
is defined in your current Emacs buffer."
(interactive)
(save-buffer)
(slime-interactive-eval (concat "(remove-ns '" (slime-current-package) ")"))
(slime-compile-and-load-file))