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
(use '[clojure.contrib.str-utils]) | |
(defn map->querystring [m] | |
(let [join-pair (fn [[k v]] | |
(str-join "=" [(.toUpperCase (name k)) v]))] | |
(str-join "&" | |
(reduce (fn [acc pair] | |
(conj acc (join-pair pair))) [] m)))) | |
(map->querystring {:class "RES" :mlsnum "23823" :format "COMPACT"}) |
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 | |
# port install jpeg libpng xpm | |
CPPFLAGS=-I/opt/local/include; export CPPFLAGS | |
LDFLAGS=-L/opt/local/lib; export LDFLAGS | |
./configure \ | |
--prefix=/usr/local/pkgs/emacs \ | |
--with-ns \ | |
--without-x \ |
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 rets | |
(:import (org.apache.http.impl.client DefaultHttpClient) | |
(org.apache.http.client.methods HttpGet HttpPost) | |
(org.apache.http.auth UsernamePasswordCredentials) | |
(org.apache.http.util EntityUtils))) | |
(use '[clojure.contrib.str-utils]) | |
(def base-url "http://rets.realtracs.net:6103") | |
(def login-path "/rets/login") |
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 org.buntin.github.github) | |
(defn- perform-request [url] | |
; HTTP stuff... | |
url) | |
(defn make-github [version return-type] | |
(fn [url & args] | |
(perform-request | |
(apply format |
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 com.notifymd.zip | |
(:import [com.csvreader CsvReader])) | |
(defn slurp-csv | |
"Return a map where key equals (keyword \"37211\") and | |
value equals the rest of the row minus the zip code" | |
[filename] | |
(let [reader (doto (CsvReader. filename) | |
(.readHeaders)) | |
headers (map #(keyword (.toLowerCase %)) |
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 | |
CPPFLAGS="-I/opt/local/include -I/opt/local/include/boost"; export CPPFLAGS | |
LDFLAGS="-L/opt/local/lib"; export LDFLAGS | |
./acprep \ | |
--opt \ | |
--switch --prefix=/usr/local/pkgs/ledger-3 \ | |
--switch --with-boost-suffix=-mt |
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
% ledger reg -p dec -n ^expenses:food | |
Error: Assertion failed in "src/filters.cc", line 283: void ledger::collapse_xacts::report_subtotal(): count >= 1 |
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
Debugger entered--Lisp error: (wrong-number-of-arguments (lambda (account) (interactive "sAccount to reconcile: | |
P") (let ((buf (current-buffer)) (rbuf (get-buffer "*Reconcile*"))) (if rbuf (kill-buffer rbuf)) (add-hook (quote after-save-hook) (quote ledger-reconcile-refresh-after-save)) (with-current-buffer (pop-to-buffer (get-buffer-create "*Reconcile*")) (ledger-reconcile-mode) (set (make-local-variable (quote ledger-buf)) buf) (set (make-local-variable (quote ledger-acct)) account) (ledger-do-reconcile)))) 2) | |
ledger-reconcile("Assets:Checking" nil) | |
call-interactively(ledger-reconcile) |
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
% git grep -E "defn .*?-seq" | |
src/clj/clojure/core.clj:(defn line-seq | |
src/clj/clojure/core.clj:(defn resultset-seq | |
src/clj/clojure/core.clj:(defn re-seq | |
src/clj/clojure/core.clj: (defn tree-seq | |
src/clj/clojure/core.clj:(defn file-seq | |
src/clj/clojure/core.clj:(defn xml-seq | |
src/clj/clojure/core.clj:(defn iterator-seq | |
src/clj/clojure/core.clj:(defn enumeration-seq |
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
; -*- ledger -*- | |
= account =~ /^Income/ | |
(Liabilities:Tithe) 0.12 | |
~ Monthly | |
Assets:Checking $500.00 | |
Income:Salary | |
2003/12/01 * Checking balance |
OlderNewer