- Pro: Both are production ready
- Pro: Can handle any throughput we will see
- Pro: More feature rich
- Healthchecks
- DNS and HTTP API available to map endpoints
- Lots of service discovery built in
- Pro: Solution could be used in more than one place (bld/prod/etc..)
| echo substr(hash('sha256', time()), 0, 32); |
Some thoughts on using node-postgres in a web application
This is the approach I've been using for the past year or so. I'm sure I'll change and it will change as I grow & am exposed to more ideas, but it's worked alright for me so far.
I would definitely use a single pool of clients throughout the application. node-postgres ships with a pool implementation that has always met my needs, but it's also fine to just use the require('pg').Client prototype and implement your own pool if you know what you're doing & have some custom requirements on the pool.
| (ns mutabots | |
| "Reimplementation of transducers, in terms of processing functions instead | |
| of reducing functions. | |
| tl;dr: reducing-fn based transducers are a special case, influenced by reducers, | |
| of processing-fn based transducers. | |
| In Clojure 1.7.0-alpha2, transducers are expressed in terms of the existing | |
| concept of reducing functions. | |
| To sum it up, a transducer has currently the signature : |
This is all personal opinion and a matter of taste. I'm putting it here because people have asked - I'm glad Cider exists and that a lot of people are obviously using it to great effect. This is not an attack on Cider or a an attempt to negate the experience of those who like it, just my own experience.
Also some of the critiques are more properly aimed at nRepl than Cider - I don't use nRepl either, in Emacs. For some reason I have fewer issues with it in Cursive (though I still do have some).
- With Cider, there's too much "going on" between Emacs and Clojure. When something glitches, hangs, doesn't return a value, throws an excption, etc (as it does, multiple times a day), I don't know whether the problem is in Emacs, in the Cider client, the nRepl server, one of any of the default middlewares or in my actual program. I run Emacs in inferior lisp using
lein trampoline -m clojure.main- if something goes wrong, it's either in Emacs (which is usually obvious) or my program. Mi
Someone tried to exploit the Shellshock vulnerability in Bash on lodash.com, likely as part of a mass-exploit attempt.
In this case, the exploit attempted to download a modified version of @schierlm’s pseudo-terminal Perl script that would connect to 72.167.37.182 on port 23. The download URL contains the targeted host name (?h=lodash.com) which gives the attacker an indication of which hosts might have the /tmp/a.pl backdoor in place.
| operator (<~) 49 | |
| { $channel } => #{ yield csp.take($channel) } | |
| operator (~>) 50 right | |
| { $value, $channel } => #{ yield csp.put($channel, $value) } | |
| macro (<~alts) { | |
| rule { } => { | |
| yield csp.alts | |
| } |
| ;;; To add a tooltip, write (tooltip {:className "foo"}) instead of #js {:className "foo"} | |
| ;;; You can simplify this and just show what you need: #js {:title (pr-str (om/...))}. | |
| ;;; testfoo.core (cljs) | |
| (ns testfoo.core | |
| (:require-macros [testfoo.macros :refer (tooltip)]) | |
| (:require [om.core :as om :include-macros true] | |
| [om.dom :as dom :include-macros true] | |
| [cljs.reader :as reader])) |
| # | |
| # Proof of concept for a HAProxy maintenance mode | |
| # | |
| # | |
| # Control the maintenance page during runtime using the stats socket: | |
| # | |
| # To put the whole site in maintenance mode (for all IPs): | |
| # > add acl #0 0.0.0.0/0 | |
| # | |
| # To exclude your own ip, so you are able to test things out: |