This document is my personal writeup of trying to make sense of all the clojure(script) tooling chain. It might contain errors and it actually contains a few questions
REPL: A prompt in its simples form.
- Waits for and Reads input,
#!/bin/bash | |
brew unlink ghostscript | |
cd /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula | |
git checkout 6ec0c1a03ad789b6246bfbbf4ee0e37e9f913ee0 ghostscript.rb | |
brew install ghostscript | |
brew pin ghostscript |
(ns shred | |
(:require [schema.core :as s] | |
[om.next.impl.parser :refer [expr->ast]] | |
[clojure.walk :refer [prewalk postwalk]] | |
[clojure.pprint :refer [pprint]] | |
[clojure.string :refer [lower-case]] | |
[clojure.test :refer :all])) | |
; TODO: Perhaps don't split if params are present since they are select query modifiers. | |
; TODO: Not currently adding the joining keys necesary to stitch up data. |
(ns om-starter.relational-mapper | |
(:require [om.next.impl.parser :as parser] | |
[om.next.server :as om] | |
[clojure.zip :as zip :refer [zipper]] | |
[clojure.test :refer [deftest is]]) | |
(:use clojure.pprint)) | |
(defn make-node | |
"Build new om.next ast node making sure query and children match." | |
[old-node children] |
time_namelookup: %{time_namelookup}\n | |
time_connect: %{time_connect}\n | |
time_appconnect: %{time_appconnect}\n | |
time_pretransfer: %{time_pretransfer}\n | |
time_redirect: %{time_redirect}\n | |
time_starttransfer: %{time_starttransfer}\n | |
----------\n | |
time_total: %{time_total}\n |
(def sidebar-items [{ :name "Dashboard" :color "red" :icon "dashboard" :link "/dashboard" } | |
{ :name "Обращения" :color "blue" :icon "comments-2" :link "/ticket" } | |
{ :submenu [ | |
{ :name "Инциденты" :icon "bug" :link "/incidents" } | |
{ :name "Запросы на обслуж" :icon "basket" :link "/requests" } | |
{ :name "Запросы на изм" :icon "cog" :link "/rfcs" } | |
{ :name "Фидбеки" :icon "comments" :link "/feedbacks" }]} | |
{ :name "Изменения" :icon "cog" :link "/changes" } | |
{ :name "Проблемы" :icon "shit" :color "green" :link "/problems" } | |
{ :name "Знания" :icon "book" :link "/knowledges" } |
#!/usr/bin/env bash | |
# MIT © Sindre Sorhus - sindresorhus.com | |
# git hook to run a command after `git pull` or `git checkout` if a specified file was changed | |
# Run `chmod +x post-checkout` to make it executable then put it into `.git/hooks/`. | |
changed_files="$(git diff-tree -r --name-only --no-commit-id HEAD@{1} HEAD)" | |
check_run() { | |
echo "$changed_files" | grep --quiet "$1" && echo " * changes detected in $1" && echo " * running $2" && eval "$2" |
Simply put, destructuring in Clojure is a way extract values from a datastructure and bind them to symbols, without having to explicitly traverse the datstructure. It allows for elegant and concise Clojure code.