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 tokenring.core | |
(:require [lamina.core :as lamina]) | |
(:require [aleph.tcp :as aleph]) | |
(:require [gloss.core :as gloss])) | |
(defn connect-and-send [message] | |
(println (str "connecting and sending: " message)) | |
(let [ch (lamina/wait-for-result | |
(aleph/tcp-client {:host "192.168.48.35" | |
;;:host "localhost" |
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 mail | |
(:use [pallet.utils :only [make-user]] | |
[pallet.crate.automated-admin-user :only [automated-admin-user]] | |
[pallet.phase :only [phase-fn]] | |
[pallet.core :only [server-spec group-spec converge]] | |
[pallet.compute :only [compute-service-from-config-file]])) | |
(def my-admin-user (make-user "superuser" | |
:public-key-path "/path/to/public" | |
:private-key-path "/path/to/private")) |
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
# Clojure syntax highlighting for GNU source-highlight | |
# rocks with SHJS | |
comment start ";" | |
include "number.lang" | |
vardef SPECIALCHAR = '\\.' | |
environment string delim "\"" "\"" begin |
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 clj-client.core | |
(import [java.net Socket] | |
[java.io PrintWriter])) | |
(defn now [] | |
(int (/ (System/currentTimeMillis) 1000))) | |
(defn write-metric [name value timestamp] | |
(with-open [socket (Socket. "localhost" 2003) | |
os (.getOutputStream socket)] |
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 bogus.core | |
(import java.util.Date) | |
(import java.net.Socket) | |
(import java.io.PrintWriter)) | |
(def metric "bogus.metric") | |
(defonce power (atom 0)) | |
(defn pow! [] | |
(swap! power inc)) |
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 challange.test.core | |
(:use [challange.core] :reload) | |
(:use [midje.sweet])) | |
(fact | |
(solve "AA" ["A"]) => "" | |
(solve "ABA" ["A" "B"]) => "" | |
(solve "AB" ["A" "X"]) => "B") | |
(fact |
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
FROM node | |
EXPOSE 9615 | |
RUN mkdir -p /src/app | |
COPY server.js /src/app/ | |
WORKDIR /src/app | |
CMD node server.js |
NewerOlder