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
;; | |
;; Straight port of https://raw.githubusercontent.com/testdouble/clojurescript.csv/master/src/testdouble/cljs/csv.cljs | |
;; by LT | |
(ns clojure.data.csv | |
(:require [clojure.string :as str])) | |
(defn- escape-quotes [s] | |
(str/replace s "\"" "\"\"")) | |
(defn- wrap-in-quotes [s] |
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
$.getJSON("https://url", function(data){ | |
console.log(data); | |
$("#div1").html(data); | |
}); |
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
;; using clojure 1.9.0-alpha5 | |
(ns aaa (:require [clojure.spec :as sp])) | |
(in-ns 'aaa) | |
(defn plus [a b] (+ a b)) | |
(sp/fdef plus :args (sp/cat :a number? :b number?)) | |
(assert (not (nil? (:args (sp/fn-specs 'plus))))) |
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
deis-builder.service - deis-builder | |
Loaded: loaded (/run/fleet/units/deis-builder.service; linked-runtime) | |
Active: active (running) since Wed 2014-10-29 00:02:19 UTC; 8h ago | |
Process: 5643 ExecStopPost=/usr/bin/docker rm -f deis-builder (code=exited, status=0/SUCCESS) | |
Process: 6047 ExecStartPost=/bin/bash -c nsenter --pid --uts --mount --ipc --net --target $(docker inspect --format='{{ .State.Pid }}' deis-builder) /usr/local/bin/push-images (code=exited, status=0/SUCCESS) | |
Process: 5728 ExecStartPost=/bin/sh -c echo 'Waiting for builder on 2223/tcp...' && until echo 'dummy-value' | ncat $COREOS_PRIVATE_IPV4 2223 >/dev/null 2>&1; do sleep 1; done (code=exited, status=0/SUCCESS) | |
Process: 5717 ExecStartPre=/bin/sh -c docker inspect deis-builder >/dev/null && docker rm -f deis-builder || true (code=exited, status=0/SUCCESS) | |
Process: 5692 ExecStartPre=/bin/sh -c IMAGE=`/run/deis/bin/get_image /deis/builder` && docker history $IMAGE >/dev/null || docker pull $IMAGE (code=exited, status=0/SUCCESS) | |
Pr |
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 blocking.core | |
(:require [org.httpkit.server :refer [run-server] :as http])) | |
(def c (atom 0)) | |
(defn app-blocking [req] | |
(println "Serving blocking connect " (swap! c inc)) | |
(Thread/sleep 3000) | |
{:status 200 | |
:headers {"Content-Type" "text/plain"} |
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
/** | |
* Extend underscore.js with support for asynchronous computation using jQuery's Deferred implementation | |
* License: | |
The MIT License (MIT) | |
Copyright (c) 2013 Laszlo Török | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights |
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
brew install php53 | |
==> Downloading http://www.php.net/get/php-5.3.23.tar.bz2/from/this/mirror | |
Already downloaded: /Library/Caches/Homebrew/php53-5.3.23 | |
==> Downloading patches | |
######################################################################## 100.0% | |
==> Patching | |
patching file Makefile.global | |
patch unexpectedly ends in middle of line | |
Hunk #1 succeeded at 18 (offset -2 lines). | |
Warning: Backing up all known pear.conf and .pearrc files |
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
/* ISSUE: Stardog (up to v1.1.3) does not properly support CORS[1] interaction. | |
The issue is two-fold: | |
1) Stardog tries to authenticated the OPTIONS "pre-flight" request. | |
2) Stardog doesn't return CORS headers, hence can only be accessed | |
by browser web apps running in a different domain via a proxy. | |
Effected browsers: Firefox and IE*. Safari and Chrome work due to a bug in webkit (see [2]). | |
Expected behavior: Stardog MUST NOT try to authenticate the pre-flight request, it SHOULD rather return | |
proper CORS headers. [4] |
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
+You should almost always import data when you create a new database. | |
+I could load 40k triples/sec, 10M triples under 4 minutes | |
+ | |
+Follow the quickstart guide at http://stardog.com/docs/quick-start/. | |
+ | |
+If you have triples in multiple files (.rdf,.n3,.nt, etc.) just use | |
+ | |
+zip alltriples.zip file1 file2 .... | |
+ | |
+to compress it, it will speedup the load. |
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/bash | |
DB=test2 | |
# drop database | |
dydra drop test2 | |
# seed data | |
array=(blurayplayer.n3 blurayplayer_example.n3 mobilephone.n3 mobilephone_example.n3 tablet.n3 tablet_example.n3 digitalcamera.owl digitalcamera_example.owl) | |
# create db and load seed data | |
dydra create test2 |
NewerOlder