=> (crux/submit-tx node [[:crux.tx/put {:crux.db/id :legend/picasso :kind :human}]
[:crux.tx/put {:crux.db/id :legend/picasso :planet :earth}]
[:crux.tx/put {:crux.db/id :legend/picasso :alive? :always}]
[:crux.tx/put {:crux.db/id :legend/picasso :location "Barcelona"}]])
separate namespace for routes:
(ns hubble.routes
(:require [reitit..]))
(defn make-routes [config]
[["/api/hubble" {:swagger {:tags ["ops"]}}
;; ....
This file contains hidden or 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
(require '[jsonista.core :as json] | |
'[org.httpkit.client :as http] | |
'[buddy.core.keys :as keys] | |
'[buddy.sign.jwt :as jwt]) | |
(def mapper (json/object-mapper {:decode-key-fn keyword})) | |
;; if done fo real => check for http/get error | |
(defn jwks->pubkey [jwks-url] | |
(-> @(http/get jwks-url) |
Manage Jenkins
=> Script Console
import jenkins.model.Jenkins
import hudson.model.Job
MAX_BUILDS = 10
Jenkins.instance.getAllItems(Job.class).each { job ->
println job.name
def recent = job.builds.limit(MAX_BUILDS)
=> (pprint agenda)
{:first-topic #{:justin :scott :les :valentin :andy},
:second-topic #{:justin :scott :les :valentin :andy :gopi},
:third-topic #{:les :valentin :andy :gopi},
:fourth-topic #{:les :valentin :andy :gopi},
:fifth-topic #{:beth :les :valentin :andy :gopi},
:sixth-topic #{:beth :gopi},
:seventh-topic #{:justin :scott :beth}}
This file contains hidden or 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 issue-104.core | |
(:require [mount.core :as mount :refer [defstate]])) | |
(mount/in-cljc-mode) | |
(defstate ^{:on-reload :noop} teststate | |
:start "hi") |
Chariot wants you to learn a basic idea about what the blockchain is made of. The only way to learn it is to use it: really.
Hence here is what we offer you, proud Charioteer:
You can get any educational materials such as ebooks, books, online courses, etc. and reimburse all or some of its cost by using the new and shiny Chariot cryptocurrency.
You do it by creating a Stellar account via BB-8 (instructions below),
This file contains hidden or 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 transpose [m] | |
(apply mapv vector m)) | |
=> (transpose [[1 2] [3 4]]) | |
[[1 3] [2 4]] | |
=> (transpose [[1 2 3] [4 5 6] [7 8 9]]) | |
[[1 4 7] [2 5 8] [3 6 9]] |
This file contains hidden or 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
use std::fmt::{self, Formatter, Display}; | |
struct Matrix(f32, f32, f32, f32); | |
// do we prefer pure or since &mut is safe (and faster) it is preferable? | |
fn transpose(Matrix(a, b, c, d): Matrix) -> Matrix { | |
Matrix(a, c, b, d) | |
} | |
impl Display for Matrix { |
NewerOlder