@startgantt Project starts the 15th of june 2017 [Angular2 and ReactJS training] as [T1] lasts 13 days and is colored in Lavender/LightBlue [Alerts web design] as [T2] lasts 13 days and is colored in Lavender/LightBlue and starts 3 days before [T1]'s end [Alerts web programming] as [T3] lasts 9 days and is colored in Coral/Green and starts the 1st of july 2017 [Alerts web prototype tunning] as [T4] lasts 10 days and is colored in Coral/Green and starts 3 days before [T3]'s end [Deploy] as [T8] lasts 4 days and starts 3 days after [T4]'s start [Data Models] as [T5] lasts 5 days and is colored in Coral/Green and starts 2 days before [T4]'s end
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns logger) | |
(defmacro log [& msgs] | |
(let [m (meta &form)] | |
`(binding [*out* *err*] ;; or bind to (io/writer log-file) | |
(println (str (ns-name *ns*) ":" | |
~(:line m) ":" | |
~(:column m)) | |
~@msgs)))) | |
(ns bar (:require logger)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# add to ~/.zshrc | |
export GRAALVM_HOME="/Library/Java/JavaVirtualMachines/graalvm-ce-java11-21.0.0/Contents/Home/" | |
# allow to execute graalvm | |
$ sudo xattr -r -d com.apple.quarantine /Library/Java/JavaVirtualMachines/graalvm-ce-java11-21.0.0 | |
# install native-image tool | |
$ /Library/Java/JavaVirtualMachines/graalvm-ce-java11-21.0.0/Contents/Home/bin/gu install native-image | |
# install espresso |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# start repl on localhost on remote machine | |
$ clj "-J-Dclojure.server.repl={:port 5555 :accept clojure.core.server/repl}" | |
# create ssh tunnel on local machine | |
$ ssh -L :5555:localhost:5555 remoteuser@remotehost -p 10022 -N -v | |
# start repl on local machine and connect to remote repl via ssh | |
$ clj -Sdeps '{:deps {vlaaad/remote-repl {:mvn/version "1.1"}}}' | |
Downloading: vlaaad/remote-repl/1.1/remote-repl-1.1.pom from clojars | |
Downloading: vlaaad/remote-repl/1.1/remote-repl-1.1.jar from clojars |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns jks-example | |
(:require [clojure.java.io :as io] | |
[io.pedestal.log :as log]) | |
(:import (javax.net.ssl SSLContext KeyManagerFactory TrustManager TrustManagerFactory X509TrustManager) | |
(java.security KeyStore) | |
(java.security.cert CertificateException X509Certificate))) | |
(defn cn-check-trust-manager | |
[^String cn-match-string] | |
(reify X509TrustManager |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; order for printing values | |
(def prn-lock (Object.)) | |
(defmacro dbg* | |
"Macro sends form to tap> and returns the same form" | |
[args] | |
`(let [args# ~args] | |
(tap> (sorted-map :form (quote ~args) :meta (assoc ~(meta &form) :ns ~(str *ns*)) :ret args#)) | |
args#)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defmacro nif-let | |
"Nested if-let. If all bindings are non-nil or true, executes body in the context of | |
those bindings. If a binding is nil or false, evaluates its `else-expr` form and stops | |
there. `else-expr` is otherwise not evaluated. | |
bindings* => binding-form else-expr | |
Example: | |
(nif-let [a x :a-is-nil | |
b y :b-is-nil |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. Go to: Edit Configurations -> + -> (at the end of list) Remote | |
You should select "Remote", not Clojure REPL | |
2. Select port for debuger. In this example we use 5005. | |
3. Run Debug (green bug button). | |
4. Select Remote repl in configuration. Run it as normal remote repl. | |
5. Have a nice debugging... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; Copyright (c) Mikhail Ananev, 2020. | |
;; Red Stars Systems (https://rssys.org). | |
;; | |
;; Licensed to the Apache Software Foundation (ASF) under one | |
;; or more contributor license agreements. See the NOTICE file | |
;; distributed with this work for additional information | |
;; regarding copyright ownership. The ASF licenses this file | |
;; to you under the Apache License, Version 2.0 (the | |
;; "License"); you may not use this file except in compliance | |
;; with the License. You may obtain a copy of the License at |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defmacro until-> | |
[pred & [expr & forms]] | |
(let [g (gensym) | |
steps (map (fn [step] | |
`(if (or (~pred ~g) (instance? Throwable ~g)) | |
~g | |
(try | |
(-> ~g ~step) | |
(catch Throwable t# | |
t#)))) |