This file contains hidden or 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
(deftask foo [{[a b c] :baz}] | |
(println "important code that depends on --baz" a b c)) | |
;; in some other file | |
(deftask foo [{[a] :bar}] | |
(println "important extension that depends on --bar" a)) |
This file contains hidden or 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
31 | |
15 30 | |
7 14 22 29 | |
3 6 10 13 18 21 25 28 | |
1 2 4 5 8 9 11 12 16 17 19 20 23 24 26 27 |
This file contains hidden or 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
ubuntu:~ $ dpkg --list | grep ruby | |
ii libdaemons-ruby 1.0.10-2 Ruby daemons library | |
ii libdaemons-ruby1.8 1.0.10-2 Ruby daemons library | |
ii libgemplugin-ruby 0.2.3-2 Gem Based Plugin System | |
ii libgemplugin-ruby1.8 0.2.3-2 Gem Based Plugin System | |
ii libopenssl-ruby 4.2 OpenSSL interface for Ruby | |
ii libopenssl-ruby1.8 1.8.7.174-1ubuntu1 OpenSSL interface for Ruby 1.8 | |
ii libreadline-ruby1.8 1.8.7.174-1ubuntu1 Readline interface for Ruby 1.8 | |
ii libruby 4.2 Libraries necessary to run Ruby 1.8.x | |
ii libruby1.8 1.8.7.174-1ubuntu1 Libraries necessary to run Ruby 1.8 |
This file contains hidden or 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
;; wouldn't it be nice if... | |
(def-type-multis DataRow | |
(get-column-names [this]) | |
(get-value [this column-name])) | |
(defmethods DataRow | |
clojure.lang.Associative | |
(get-column-names [this] | |
(range (count this))) |
This file contains hidden or 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
;; doesn't work because the body may not always be fully realized | |
(defn- read-body [in length & [buffer offset]] | |
(lazy-seq | |
(if length | |
(if (= 0 length) | |
nil | |
(let [buffer (or buffer (char-array length)) | |
offset (or offset 0) | |
count (.read in buffer offset length)] |
This file contains hidden or 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
(defn branch-revision [version] | |
(let [[branch version] (reverse (split version #"/"))] | |
{:branch branch :version version})) |
This file contains hidden or 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 apij.indexer | |
(:use | |
cake | |
cake.core)) | |
(deftask index_from_mongo | |
"Produce and index from a mongo database" | |
(bake (:require [somnium.congomongo :as congo]) [] | |
(congo/mongo! :db "rva_en") | |
(println "TESTING"))) |
This file contains hidden or 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 sexpbot.plugins.logger | |
(:use [sexpbot respond] | |
[clj-time.core :only [now]] | |
[clj-time.formatters :only [unparse formatters]]) | |
(:import [java.io File])) | |
(defplugin | |
(:hook | |
:on-message | |
(fn [{:keys [bot nick channel message]}] |
This file contains hidden or 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 | |
today=`date "+%Y-%m-%d"` | |
for dir in ${1:-.}/*/*; do | |
touch $dir/$today.txt | |
cd $dir | |
ln -sf $today.txt current.txt | |
cd - > /dev/null | |
done |
This file contains hidden or 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
:configurations {:default-mapping "default->default" | |
"default" {} | |
"compile" {:extends "default" :description "Compile time dependencies."} | |
"runtime" {:extends "compile" :description "Runtime dependencies."} | |
"devel" {:visibility "private"}} | |
:publications {:default-conf "master,default" | |
"itch" {:type "jar"} | |
"itch-jetty" {:type "jar" conf="jetty"}} |