Skip to content

Instantly share code, notes, and snippets.

Divyansh Prakash divs1210

Block or report user

Report or block divs1210

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
ibraheem4 /
Last active Feb 26, 2020 — forked from sgnl/
Installing Postgres via Brew (OSX)

Installing Postgres via Brew


Brew Package Manager

In your command-line run the following commands:

  1. brew doctor
  2. brew update
sgnl /
Last active Feb 10, 2020
Installing Postgres via Brew (OSX) (outdated see top most note)

Outdated note: the process is a lot easier now: after you brew install postgresql you can initialize or stop the daemon with these commands: brew services start postgresql or brew services stop postgresql.

new out put may look like

To have launchd start postgresql now and restart at login:
  brew services start postgresql
Or, if you don't want/need a background service you can just run:
  pg_ctl -D /usr/local/var/postgres start
beders / mini-promise.cljc
Last active Nov 23, 2019
Super minimal macro to simplify dealing with promise/async/await code in ClojureScript
View mini-promise.cljc
(defn create-function-call [param expr]
"Create an sexp for calling expr with a first argument provided by a promise.
If expr is a list (already in form suitable for a function call), insert the first argument at second position,
otherwise turn expr into a function call expression, unless the function is an fn, which is simply returned.
println -> (fn [param] (println param))
(* 2) -> (fn [param] (* param 2))
View mergesort.clj
(defn mrg [[x & xrest :as X] [y & yrest :as Y] R]
(if (and (not-empty X) (not-empty Y))
(if (<= x y)
(mrg xrest Y (conj R x))
(mrg X yrest (conj R y)))
(concat R X Y)))
(defn mrgsrt [X]
(if (> (count X) 1)
(let [sides (split-at (/ (count X) 2) X)]
danielrw7 / replify
Last active Jun 10, 2019
replify - Create a REPL for any command
View replify
printf "Initialized REPL for `%s`\n" "$command"
printf "%s> " "$command"
read -r input
while [ "$input" != "" ];
eval "$command $input"
printf "%s> " "$command"
marick /
Last active May 20, 2019
About Those Lava Lamps

Around 2006-2007, it was a bit of a fashion to hook lava lamps up to the build server. Normally, the green lava lamp would be on, but if the build failed, it would turn off and the red lava lamp would turn on.

By coincidence, I've actually met, about that time, (probably) the first person to hook up a lava lamp to a build server. It was Alberto Savoia, who'd founded a testing tools company (that did some very interesting things around generative testing that have basically never been noticed). Alberto had noticed that people did not react with any urgency when the build broke. They'd check in broken code and go off to something else, only reacting to the breakage they'd caused when some other programmer pulled the change and had problems.

danneu /
Last active Sep 28, 2017
Google I/O 2012 - Go Concurrency Patterns ported to Clojure Video:
You can’t perform that action at this time.