Skip to content

Instantly share code, notes, and snippets.

###########
queue of 10
###########
##############
pedestal: sync
##############
10.61µs
Evaluation count : 51774 in 6 samples of 8629 calls.
https://github.com/clojure/clojure/blob/b8c78ebf79b6a996f349dd112aaed658c132735d/src/clj/clojure/walk.clj
***********************************************************************
"I'm" -> "I am"
"They're" -> "they are"
матчатся по реджексам.
@dosbol
dosbol / Advent of Code - 2019
Last active December 21, 2019 16:58
advent-of-code-2019.clj
(defn solve1-1 [x]
(int (- (Math/floor (/ x 3)) 2)))
(->> input
(map solve1-1)
(apply +))
(defn solve1-2 [s x]
(if (<= (solve1-1 x) 0) s
(recur (+ s (solve1-1 x)) (solve1-1 x))))
const selectRandom = numbers => {
return numbers[Math.floor(Math.random() * numbers.length)];
}
const strategy1 = numbers => {
return numbers[0];
}
const strategy2 = numbers => {
return selectRandom(numbers);
@dosbol
dosbol / gist:e453fcdbc40edda8ec8923f4e5d90398
Created March 19, 2019 09:06
Расписание встреч с использованием re-frame
Браузерное приложение - расписание встреч. Возможности: добавление встреч, удаление, редактирование.
На главном экране отображаются все встречи на выбранный день (соответственно есть контрол в выбором даты).
У встречи есть три состояния: запланирована, в процессе, завершена. Создавать встречи на прошлое запрещено,
они не должны пересекаться, отображение даты и времени должно быть в часовом поясе браузера.
Экран добавления встречи: дата и время начала, дата и время окончания, часовой пояс
(доступны три часовых пояса: Москва, Хабаровск, Гринвич), краткое описание.
При вводе времени валидировать формат: dd.MM.yyyy hh:mm A, где dd - день, MM - месяц, yyyy - год,
hh - часы от 1 до 12, mm - минуты, A - AM/PM.
https://www.infoq.com/news/2009/01/clojure-interview-halloway
Introduction to Clojure
Copyright© 2016 by Bill Burcham [email protected]
Philosophy of (Good) Software—Why Clojure?
Are We There Yet (video)
yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel gcc perl-ExtUtils-MakeMaker
cd /usr/src
wget https://www.kernel.org/pub/software/scm/git/git-<version>.tar.gz
tar xzf git-<version>.gz
cd git-<version>
make configure
./configure --prefix=/usr
make all

Rich Already Answered That!

A list of commonly asked questions, design decisions, reasons why Clojure is the way it is as they were answered directly by Rich (even when from many years ago, those answers are pretty much valid today!). Feel free to point friends and colleagues here next time they ask (again). Answers are pasted verbatim (I've made small adjustments for readibility, but never changed a sentence) from mailing lists, articles, chats.

How to use:

  • The link below in the summary jumps at the answer on this page.
  • The link on the question itself points back at the original post.

Summary

rpm -ivh https://yum.postgresql.org/9.6/redhat/rhel-6-x86_64/pgdg-centos96-9.6-3.noarch.rpm
yum install postgresql96 postgresql96-server postgresql96-libs postgresql96-contrib postgresql96-devel
service postgresql-9.6 initdb
vi /var/lib/pgsql/9.6/data/pg_hba.conf
host all all 0.0.0.0/0 md5
host all all ::1/128 md5
get .rpm from http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
sudo yum localinstall jdk-8u161-linux-x64.rpm