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 update-task-data-from-jira | |
"Update task data in Gantt EDN-files by Jira data" | |
(:require [babashka.curl :as curl] | |
[babashka.fs :as fs] | |
[cheshire.core :as json] | |
[clojure.string :as string] | |
[rewrite-clj.zip :as z]) | |
(:import (java.net URLEncoder))) | |
(def login (-> (System/getenv) (get "LOGNAME"))) |
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
(defn diff-between-days | |
"Calculate difference in days between two dates." | |
[date1 date2] | |
(let [df (DateTimeFormatter/ofPattern "yyyy-MM-dd'T'HH:mm:ss.SSSxxxx" Locale/ROOT) | |
d1 (if (string? date1) (ZonedDateTime/parse date1 df) date1) | |
d2 (if (string? date2) (ZonedDateTime/parse date2 df) date2)] | |
(.between ChronoUnit/DAYS d1 d2))) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
curl -v -u username https://jira.mycompany.com/browse/PMR-50 | |
curl -v -u username:password https://jira.mycompany.com/browse/PMR-50 | |
echo -n username:password | base64 | |
dXNlcm5hbWU6cGFzc3dvcmQ= | |
curl -D- -X GET -H "Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ==" -H "Content-Type: application/json" "https://jira.mycompany.com/browse/PMR-50 |
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
asciidoctor-revealjs ml-team.adoc | |
decktape -s 1900x1187 --slides 1-500 reveal "file:///Users/user/projects/ml-team.html?fragments=true" slides.pdf |
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 update-current-day-in-gantt | |
"Script for updating current day in Gantt EDN-files" | |
(:require [babashka.fs :as fs] | |
[rewrite-clj.node :as node] | |
[rewrite-clj.parser :as parser] | |
[rewrite-clj.zip :as z]) | |
(:import (java.time LocalDate) | |
(java.time.temporal ChronoUnit))) | |
(defn diff-between-days |
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 user | |
(:import (java.util.concurrent Executors))) | |
;; Thread factory for virtual threads | |
(defn thread-factory [name] | |
(-> (Thread/ofVirtual) | |
(.name name 0) | |
(.factory))) | |
;; Define an executor which just produce a new virtual thread for every task |
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 org.rssys.swim | |
(:import (java.net DatagramPacket DatagramSocket SocketTimeoutException InetSocketAddress InetAddress))) | |
(def host "127.0.0.1") | |
(def port 5200) | |
(def socket (DatagramSocket. ^long port)) | |
(def running (atom true)) | |
(def buffer (make-array Byte/TYPE 1024)) |
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
{ | |
:scale "900*1200" ;; размер картинки | |
:project-title "Бэклог на эпик или проект" ;; Название эпика или проекта | |
:project-header "План на 15-02-2022" ;; Дата обновления плана | |
:project-scale-zoom {:scale :daily :zoom 1} | |
:tasks-colors {:color/in-progress "GreenYellow/Red" ;; цвета задач | |
:color/completed "GreenYellow/Green"} |