(:identity req)
is auth backend independent way to access user data- login and logout implementation depends on auth backend
:current-user
doesn't imply that authentication is required, route should also have:auth-rules
if authentication is required
(defn partition-while | |
"Given a coll, partition the coll whenever `(f a b)` returns `false`. | |
Example: `(partition-when #(<= 0 (Math/abs (- %1 %2)) 1) [1 2 3 5 6 8 10 10]) | |
returns `[[1 2 3] [5 6] [8] [10 10]]` | |
" | |
([f coll] (partition-while f coll [] [])) | |
([f [_ & t :as c] result intermediate] | |
(let [[a b & _] c] | |
(cond | |
(nil? a) result |
(ns com.heroku.sdk.CljKeyStore | |
"Dynamically generated class to allow creating custom key stores by directly passing the certs and keys | |
instead of relying on env vars" | |
(:gen-class | |
:name com.heroku.sdk.CljKeyStore | |
:extends com.heroku.sdk.EnvKeyStore | |
:methods [#^{:static true} [fromTrustWithRandomPassword [String] com.heroku.sdk.EnvKeyStore] | |
#^{:static true} [fromKeyAndCertWithRandomPassword [String String] com.heroku.sdk.EnvKeyStore]] | |
:constructors {[String String] [String String], | |
[String String String] [String String String]})) |
- http://the-paper-trail.org/blog/distributed-systems-theory-for-the-distributed-systems-engineer/
- https://github.com/palvaro/CMPS290S-Winter16/blob/master/readings.md
- http://muratbuffalo.blogspot.com/2015/12/my-distributed-systems-seminars-reading.html
- http://christophermeiklejohn.com/distributed/systems/2013/07/12/readings-in-distributed-systems.html
- http://michaelrbernste.in/2013/11/06/distributed-systems-archaeology-works-cited.html
- http://rxin.github.io/db-readings/
- http://research.microsoft.com/en-us/um/people/lamport/pubs/pubs.html
- http://pdos.csail.mit.edu/dsrg/papers/
- http://scalingsystems.com/2011/09/07/reading-list-for-distributed-systems/
- http://courses.engr.illinois.edu/cs525/sp2011/sched.htm
Commit Message Guidelines
Goals
- allow generating CHANGELOG.md by script
- allow ignoring commits by git bisect (not important commits like formatting)
- provide better information when browsing the history
Proposal
{:user {:plugins [[cider/cider-nrepl "0.16.0"] | |
[lein-midje "3.1.3"] | |
[lein-cloverage "1.0.9"] | |
[com.jakemccrary/lein-test-refresh "0.21.1"] | |
[lein-ancient "0.5.5"] | |
[jonase/eastwood "0.2.5"] | |
[lein-kibit "0.0.8"] | |
[lein-pprint "1.1.2"]]}} |
alias pserv='python -m SimpleHTTPServer $*' | |
alias wget='wget --trust-server-names --no-check-certificate' | |
alias ls='LC_COLLATE=C ls -lFha -G' #--group-directories-first --color ' | |
alias grep='grep --color=always' | |
alias less='less -R' | |
# some more ls aliases | |
alias ll='ls -alF' | |
alias la='ls -A' | |
alias l='ls -CF' |
import java.util.concurrent.CompletableFuture; | |
import java.util.concurrent.ExecutionException; | |
import java.util.concurrent.TimeUnit; | |
import java.util.concurrent.TimeoutException; | |
public class FutureWUT { | |
static void sleep(long millis) { | |
try { | |
Thread.sleep(millis); |
(ns clj-quasar.core | |
(:require | |
[co.paralleluniverse.pulsar | |
[core :refer :all] | |
[actors :refer :all]])) | |
(defsfn adder [] | |
(receive [from v] | |
(do | |
(+ v 1)))) |
Quick Tips for Fast Code on the JVM
I was talking to a coworker recently about general techniques that almost always form the core of any effort to write very fast, down-to-the-metal hot path code on the JVM, and they pointed out that there really isn't a particularly good place to go for this information. It occurred to me that, really, I had more or less picked up all of it by word of mouth and experience, and there just aren't any good reference sources on the topic. So… here's my word of mouth.
This is by no means a comprehensive gist. It's also important to understand that the techniques that I outline in here are not 100% absolute either. Performance on the JVM is an incredibly complicated subject, and while there are rules that almost always hold true, the "almost" remains very salient. Also, for many or even most applications, there will be other techniques that I'm not mentioning which will have a greater impact. JMH, Java Flight Recorder, and a good profiler are your very best friend! Mea