Skip to content

Instantly share code, notes, and snippets.

View joodie's full-sized avatar

Joost Diepenmaat joodie

View GitHub Profile
(binding [clojure.contrib.sql/do-commands #(prn %)
clojure.contrib.sql/do-prepared #(prn %1 %2)]
(do-commands "bla"))
(ns #^{:doc "This is pretty much the same as clojure.contrib.sql,
except that it uses quoting for column and table names, which means
you can - if your database permits it - use more funky charcters in
your names. The most obvious character you'll want to use from Clojure
is '-', as in :user-id, etc"}
nl.zeekat.sql
(:require [clojure.contrib [sql :as sql]]
[clojure.contrib [def :only defalias]]
[clojure.contrib.sql [internal :as internal]])
(:use (clojure.contrib [java-utils :only [as-str]])))
@joodie
joodie / gist:3706985
Created September 12, 2012 14:31
Ooooh moooi
(set-face-attribute 'default nil
:family "DejaVu Sans Mono" :height 140 :weight 'normal :width 'normal)
(set-fontset-font "fontset-default" 'unicode (font-spec :family "DejaVu Sans"
:width 'normal
:size 14.0
:weight 'normal))
@joodie
joodie / zip-expunge-fix.el
Created October 12, 2012 12:04
Emacs fix delete entries with backslash in zip
;; make it possible to delete zip entries that have a backslash in
;; their name.
(defun archive-zip-fix-backslash-name
(name)
(replace-regexp-in-string "\\\\" "\\\\\\\\" name))
(defun archive-zip-expunge
(archive files)
(apply 'call-process
@joodie
joodie / yaml-path.el
Created November 9, 2012 09:38
navigate to parent and show path in yaml files
(defun yaml-nav-parent-line
()
(interactive)
(let* ((current-i (current-indentation))
(target-i (- current-i yaml-indent-offset)))
(if (= 0 current-i)
nil
(search-backward-regexp (concat "^ \\{" (format "%d" target-i) "\\}[^ #\n]"))
(forward-char target-i)

Keybase proof

I hereby claim:

To claim this, I am signing this object:

>bb
Exception in thread "main" java.lang.Exception: Couldn't find 'java'. Please set JAVA_HOME.
at borkdude.deps$get_java_cmd.invokeStatic(deps.clj:281)
at borkdude.deps$_main.invokeStatic(deps.clj:881)
at borkdude.deps$_main.doInvoke(deps.clj:861)
at clojure.lang.RestFn.applyTo(RestFn.java:137)
at clojure.core$apply.invokeStatic(core.clj:667)
at babashka.impl.deps$add_deps$fn__27152$fn__27153.invoke(deps.clj:106)
at clojure.lang.AFn.applyToHelper(AFn.java:152)
at clojure.lang.AFn.applyTo(AFn.java:144)