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 vector-comparator [a b] | |
"Orders vectors by the first element which differs" | |
(loop [v1 a v2 b] | |
(let [comparison (compare (first v1) (first v2))] | |
(cond (and (empty? v1) (empty? v2)) 0 | |
(empty? v1) -1 | |
(empty? v2) 1 | |
(not= 0 comparison) comparison | |
:else (recur (rest v1) (rest v2)))))) |
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
#!/usr/bin/env python | |
# Sets up the users's dotfiles as links to the git-versioned ones in .dotfiles. | |
# It wouldn't be tough to just scan the dotfiles dir to see what matches up | |
# with a dotfile in ~ and link based on that, but for now I'm explicitly | |
# listing which files to track. | |
import os | |
import shutil | |
# Key is the dotfile in the home directory, the value is location in the |
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 '[net.cgrand.enlive-html :as html]) | |
(def markup (html/html-resource (java.io.StringReader. | |
"<html><body><div><img src='1.png'/><div><img src='nested.png'/></div></div></body></html>"))) | |
; I want to select the first img | |
; This selects all images, as expected | |
(html/select markup [:img]) | |
;matches: ({:tag :img, :attrs {:src "1.png"}, :content nil} {:tag :img, :attrs {:src "nested.png"}, :content nil}) |
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
Exception in thread "main" java.lang.IncompatibleClassChangeError: Found class jline.Terminal, but interface was expected (NO_SOURCE_FILE:1) | |
at clojure.lang.Compiler.eval(Compiler.java:5440) | |
at clojure.lang.Compiler.eval(Compiler.java:5415) | |
at clojure.lang.Compiler.eval(Compiler.java:5391) | |
at clojure.core$eval.invoke(core.clj:2382) | |
at clojure.main$eval_opt.invoke(main.clj:235) | |
at clojure.main$initialize.invoke(main.clj:254) | |
at clojure.main$null_opt.invoke(main.clj:279) | |
at clojure.main$main.doInvoke(main.clj:354) | |
at clojure.lang.RestFn.invoke(RestFn.java:421) |
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.data.json :only (read-json json-str)]) | |
(require '[clj-http.client :as client]) | |
(def url "http://api.twitter.com/1/statuses/show/177093052035375104.json") | |
(read-json (client/get url)) |
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_VERSION = 1.7.12.1 | |
* new build flags | |
* new link flags | |
cc -o base85.o -c -MF ./.depend/base85.o.d -MMD -MP -I. -DPRECOMPOSE_UNICODE -DUSE_ST_TIMESPEC -DNO_GETTEXT -DHAVE_DEV_TTY -DXDL_FAST_HASH -DSHA1_HEADER='<openssl/sha.h>' -DNO_MEMMEM -DSHELL_PATH='"/bin/sh"' base85.c | |
* new prefix flags | |
cc -o bisect.o -c -MF ./.depend/bisect.o.d -MMD -MP -I. -DPRECOMPOSE_UNICODE -DUSE_ST_TIMESPEC -DNO_GETTEXT -DHAVE_DEV_TTY -DXDL_FAST_HASH -DSHA1_HEADER='<openssl/sha.h>' -DNO_MEMMEM -DSHELL_PATH='"/bin/sh"' bisect.c | |
cc -o blob.o -c -MF ./.depend/blob.o.d -MMD -MP -I. -DPRECOMPOSE_UNICODE -DUSE_ST_TIMESPEC -DNO_GETTEXT -DHAVE_DEV_TTY -DXDL_FAST_HASH -DSHA1_HEADER='<openssl/sha.h>' -DNO_MEMMEM -DSHELL_PATH='"/bin/sh"' blob.c | |
cc -o branch.o -c -MF ./.depend/branch.o.d -MMD -MP -I. -DPRECOMPOSE_UNICODE -DUSE_ST_TIMESPEC -DNO_GETTEXT -DHAVE_DEV_TTY -DXDL_FAST_HASH -DSHA1_HEADER='<openssl/sha.h>' -DNO_MEMMEM -DSHELL_PATH='"/bin/sh"' branch.c | |
cc -o bulk-checkin.o -c -MF ./.depend/bulk-checkin.o. |
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
[INFO] Scanning for projects... | |
[INFO] ------------------------------------------------------------------------ | |
[INFO] Reactor Build Order: | |
[INFO] | |
[INFO] Artifact Listener | |
[INFO] Artifact Listener - Core | |
[INFO] Artifact Listener - Init | |
[INFO] Artifact Listener - Web Application | |
[INFO] | |
[INFO] ------------------------------------------------------------------------ |
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
[2016-09-27 22:52:03,704] WARN - pertyPlaceholderConfigurer - - Could not load properties from URL [file:/etc/maven-artifact-notifier/configuration.properties]: /etc/maven-artifact-notifier/configuration.properties (No such file or directory) | |
[2016-09-27 22:52:03,706] WARN - pertyPlaceholderConfigurer - - Could not load properties from class path resource [configuration-MY_USERNAME.properties]: class path resource [configuration-MY_USERNAME.properties] cannot be opened because it does not exist | |
[2016-09-27 22:52:05,334] WARN - bernatePersistenceProvider - - Installing our Spring managed interceptor. | |
[2016-09-27 22:52:05,645] WARN - stractEhcacheRegionFactory - - HHH020003: Could not find a specific ehcache configuration for cache named [fr.openwide.core.jpa.externallinkchecker.business.model.ExternalLinkWrapper]; using defaults. | |
[2016-09-27 22:52:05,667] WARN - stractEhcacheRegionFactory - - HHH020003: Could not find a specific ehcache configuration for cache named [fr.openwide.maven.artifact.notifi |
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
ERROR: constraint "ukh3vbwatl9grndwud5gmoyd0gk" of relation "artifact" does not exist | |
STATEMENT: alter table Artifact drop constraint UKh3vbwatl9grndwud5gmoyd0gk | |
ERROR: constraint "uk_s9isu7vl7b611kenaw5xa8tya" of relation "artifactgroup" does not exist | |
STATEMENT: alter table ArtifactGroup drop constraint UK_s9isu7vl7b611kenaw5xa8tya | |
ERROR: constraint "uke25bklx8h4v3otrp371ciis37" of relation "artifactversion" does not exist | |
STATEMENT: alter table ArtifactVersion drop constraint UKe25bklx8h4v3otrp371ciis37 | |
ERROR: constraint "uk_l3rpahijrmparse329xqpq7v7" of relation "emailaddress" does not exist | |
STATEMENT: alter table EmailAddress drop constraint UK_l3rpahijrmparse329xqpq7v7 | |
ERROR: constraint "uko2m0g8gd71syiu35joaie04og" of relation "followedartifact" does not exist | |
STATEMENT: alter table FollowedArtifact drop constraint UKo2m0g8gd71syiu35joaie04og |
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
[2016-10-23 17:28:38,343] WARN - pertyPlaceholderConfigurer - - Could not load properties from URL [file:/etc/maven-artifact-notifier/configuration.properties]: /etc/maven-artifact-notifier/configuration.properties (No such file or directory) | |
[2016-10-23 17:28:38,345] WARN - pertyPlaceholderConfigurer - - Could not load properties from class path resource [configuration-ldhanson2.properties]: class path resource [configuration-ldhanson2.properties] cannot be opened because it does not exist | |
[2016-10-23 17:28:39,965] WARN - bernatePersistenceProvider - - Installing our Spring managed interceptor. | |
[2016-10-23 17:28:40,302] WARN - stractEhcacheRegionFactory - - HHH020003: Could not find a specific ehcache configuration for cache named [fr.openwide.core.jpa.externallinkchecker.business.model.ExternalLinkWrapper]; using defaults. | |
[2016-10-23 17:28:40,324] WARN - stractEhcacheRegionFactory - - HHH020003: Could not find a specific ehcache configuration for cache named [fr.openwide.maven.artifact.notifier.c |
OlderNewer