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
;; | |
;; Thus spake the master programmer: | |
;; "Though a program be but three lines long, someday it will have to be | |
;; maintained." | |
;; | |
;; | |
;; [01:30] <uhelp> lexxan: Since Mon May 2 17:22:46 2005, | |
;; there have been 0 modifications and 0 questions. | |
;; I have been awake for 7 minutes and 36 seconds | |
;; this session, and currently reference 19 |
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
(import '(org.xlightweb.client HttpClient) | |
'(java.net URL URLEncoder) | |
'(javax.net.ssl SSLContext) | |
'(java.util Date) | |
'(org.xlightweb PostRequest GetRequest)) | |
(def base-url "https://www.google.com/notebook/") | |
(def params {"service" "notebook" |
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
refs/heads/master^@44bf79070b689ae3e96adbcae4c3c97abaf59ac4 | |
refs/heads/master^@44bf79070b689ae3e96adbcae4c3c97abaf59ac4 | |
refs/heads/master^@44bf79070b689ae3e96adbcae4c3c97abaf59ac4 | |
refs/heads/master^@44bf79070b689ae3e96adbcae4c3c97abaf59ac4 | |
bzr: ERROR: exceptions.TypeError: 'Tree' object is not iterable | |
Traceback (most recent call last): | |
File "/usr/local/lib/python2.5/site-packages/bzrlib/commands.py", line 893, in run_bzr_catch_errors | |
return run_bzr(argv) | |
File "/usr/local/lib/python2.5/site-packages/bzrlib/commands.py", line 839, in run_bzr |
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
(def svn-command "svn -v --xml --limit 5 log https://clojure.svn.sourceforge.net/svnroot/clojure") | |
(defn svn-summaries | |
"takes output of clojure.xml/parse on svn's xml log, returns | |
a vector of [rev-number commit-message]" | |
[tag-map] | |
(map (fn [x] | |
[(.parseInt Integer (:revision (:attrs x))) | |
(first | |
(:content |
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 hiredman.xmpp | |
(:import (org.jivesoftware.smack XMPPConnection ConnectionConfiguration | |
RosterListener PrivacyListManager | |
PacketListener) | |
(org.jivesoftware.smack.packet Presence Presence$Type) | |
(org.jivesoftware.smack.filter PacketFilter))) | |
(defstruct xmpp :connection :chats) | |
(defn connect [jid pass] |
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 hiredman.beans) | |
(defn -it [& _] | |
[[] (ref {})]) | |
(defn setter [tis nam tat] | |
(dosync | |
(commute (.state tis) | |
assoc nam tat))) | |
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
;; need a java policy file that allows all or enabling the security manager will | |
;; lock you out | |
;; | |
;; grant { | |
;; permission java.security.AllPermission; | |
;; }; | |
(System/setSecurityManager (SecurityManager.)) |
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
rant codeBase "file:${{java.ext.dirs}}/*" { | |
permission java.security.AllPermission; | |
}; | |
grant { | |
permission java.security.AllPermission; | |
}; |
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 hiredman.sandbox | |
(:import (java.util.concurrent FutureTask TimeUnit TimeoutException) | |
(java.io File FileWriter PushbackReader StringReader))) | |
(def *bad-forms* #{'eval 'catch 'try 'def 'defn 'defmacro 'read 'Thread. 'send 'send-off 'clojure.asm.ClassWriter.}) | |
(defn enable-security-manager [] | |
(System/setSecurityManager (SecurityManager.))) | |
;;;;;;;; Chousuke |
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
(defn dd [x] | |
(print (str "<dd>" x "</dd>"))) | |
(defn next_button [] | |
(print "<dd class=\"next\"><input class=\"next\" value=\"Next\" type=\"submit\" /></dd>")) | |
(defn attribute_printer [attrs] | |
(foreach [attrs :as [k v]] | |
(if (and (not= k "") (not= "" v)) | |
(print (str k "=\"" v "\""))))) |
OlderNewer