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
// publish a message to an SNS topic | |
var AWS = require('aws-sdk'); | |
AWS.config.loadFromPath('./config.json'); | |
var sns = new AWS.SNS(); | |
var params = { | |
TopicArn : "arn:your-topic-arn", | |
Message: "Hello World" | |
}; |
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 batchreq.t-core | |
(:use midje.sweet) | |
(:use [batchreq.core])) | |
(facts "load some snippets" | |
(fact "all returned in parallel" | |
(count (request-snippets in-parallel)) => 20) | |
(fact "all returned sequentially" |
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
package com.ajk; | |
import clojure.lang.IFn; | |
import java.io.ByteArrayInputStream; | |
import java.io.IOException; | |
import static clojure.java.api.Clojure.read; | |
import static clojure.lang.RT.loadResourceScript; | |
import static clojure.lang.RT.var; |
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
; to be run in lein repl | |
(require 'langohr.core) | |
(require '[langohr.queue :as lq]) | |
(require '[langohr.basic :as lb]) | |
(require '[langohr.consumers :as lc]) | |
; langohr.core/*default-config* | |
; default port is 5672 - running on 5004 as it is forwarded to rabbitmq on docker | |
(def conn (langohr.core/connect {:hostname "localhost" :port 5004})) |
NewerOlder