(defun append-text-to-buffer (buffer text)
"Append to specified buffer the text of the region.
It is inserted into that buffer before its point.
When calling from a program, give three arguments:
BUFFER (or buffer name), START and END.
START and END specify the portion of the current buffer to be copied."
(interactive
(list (read-buffer "Append to buffer: " (other-buffer (current-buffer) t))
This file contains hidden or 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
# INRES="1366x768" # input resolution | |
# OUTRES="1366x768" # output resolution | |
INRES="2560x1440" # input resolution | |
OUTRES="2560x1440" # output resolution | |
FPS="15" # target FPS | |
GOP="30" # i-frame interval, should be double of FPS, | |
GOPMIN="15" # min i-frame interval, should be equal to fps, | |
THREADS="2" # max 6 | |
CBR="500k" # constant bitrate (should be between 1000k - 3000k) | |
QUALITY="veryfast" # one of the many FFMPEG preset |
This file contains hidden or 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 service.async | |
(:require-macros [cljs.core.async.macros :as a]) | |
(:require [cljs.core.async :as a])) | |
(defn <cb [f & args] | |
(let [out (a/chan)] | |
(apply f (conj (into [] args) #(a/close! out))) | |
out)) | |
(defn <promise [f & args] |
This file contains hidden or 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
(cd .deploy && git pull) || git clone [email protected]:repository/path.git .deploy |
This file contains hidden or 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- <cb | |
"Call an callback style function and return a channel containing the result of calling the callback" | |
[f & args] | |
(let [out (a/chan)] | |
(apply f (conj (into [] args) (fn [& args] | |
(a/put! out args) | |
(a/close! out)))) | |
out)) | |
(a/<!! (<cb (fn [cb] (cb-style-f 1 2 3 cb)))) |
This file contains hidden or 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- <promise | |
"Call a function that returns a promise and convert it into a channel" | |
[f & args] | |
(let [out (a/chan) | |
done (fn [& _] (a/close! out))] | |
(.then (apply f args) done done) | |
out)) | |
This file contains hidden or 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
https://engineering.linkedin.com/distributed-systems/log-what-every-software-engineer-should-know-about-real-time-datas-unifying | |
https://www.oreilly.com/ideas/questioning-the-lambda-architecture | |
http://www.paperplanes.de/2011/12/9/the-magic-of-consistent-hashing.html | |
http://www.benstopford.com/2015/04/28/elements-of-scale-composing-and-scaling-data-platforms/ | |
http://www.benstopford.com/2015/02/14/log-structured-merge-trees/ | |
https://www.confluent.io/blog/data-dichotomy-rethinking-the-way-we-treat-data-and-services/ | |
http://adrianmarriott.net/logosroot/papers/LifeBeyondTxns.pdf | |
http://robertgreiner.com/2014/08/cap-theorem-revisited/ | |
http://the-paper-trail.org/blog/consistency-and-availability-in-amazons-dynamo/ | |
https://blog.parse.ly/post/1691/lucene/ |
This file contains hidden or 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
[org.apache.kafka/kafka-clients "0.11.0.0"] | |
[spootnik/kinsky "0.1.16"] | |
(ns space.kafka | |
(:require [kinsky.client :as client]) | |
(:import [java.util ArrayList Properties] | |
org.apache.kafka.clients.consumer.KafkaConsumer | |
[org.apache.kafka.clients.producer KafkaProducer ProducerRecord] | |
[org.apache.kafka.common.serialization StringDeserializer StringSerializer] | |
org.apache.kafka.common.TopicPartition |
This file contains hidden or 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 trees | |
(:require [clojure.walk :as walk])) | |
(defonce id (atom 0)) | |
(defrecord Ref [id]) | |
(defn new-id! [] | |
(->Ref (swap! id inc))) |
This file contains hidden or 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
clj -J-Dclojure.server.repl="{:port 1234 :accept clojure.core.server/repl}" | |
rlwrap -q ^Q nc 127.0.0.1 1234 |