wip
This commit is contained in:
parent
d2c183dc4a
commit
a08c5346ae
10 changed files with 0 additions and 154 deletions
|
|
@ -1,10 +0,0 @@
|
|||
(require '[babashka.pods :as pods])
|
||||
|
||||
(pods/load-pod 'retrogradeorbit/bootleg "0.1.9")
|
||||
|
||||
(require '[pod.retrogradeorbit.bootleg.utils :as utils])
|
||||
|
||||
(-> [:div
|
||||
[:h1 "Using Bootleg From Babashka"]
|
||||
[:p "This is a demo"]]
|
||||
(utils/convert-to :html))
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
#!/usr/bin/env bb
|
||||
|
||||
(require '[babashka.pods :as pods])
|
||||
|
||||
(pods/load-pod 'justone/brisk "0.2.0")
|
||||
|
||||
(require '[pod.brisk :as brisk])
|
||||
|
||||
(brisk/freeze-to-file "pod.nippy" {:han :solo})
|
||||
(prn (brisk/thaw-from-file "pod.nippy"))
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
#!/usr/bin/env bb
|
||||
|
||||
(require '[babashka.pods :as pods])
|
||||
|
||||
(pods/load-pod 'borkdude/clj-kondo "2020.12.12")
|
||||
|
||||
(require '[pod.borkdude.clj-kondo :as clj-kondo])
|
||||
|
||||
(-> (clj-kondo/run! {:lint ["src"]})
|
||||
:summary)
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
#!/usr/bin/env bb
|
||||
|
||||
(require '[babashka.pods :as pods])
|
||||
(pods/load-pod 'org.babashka/filewatcher "0.0.1-SNAPSHOT")
|
||||
|
||||
(require '[pod.babashka.filewatcher :as fw])
|
||||
|
||||
(fw/watch "/tmp" (fn [event] (prn event)) {:delay-ms 50})
|
||||
|
||||
@(promise)
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
(require '[babashka.pods :as pods])
|
||||
|
||||
(pods/load-pod 'org.babashka/hsqldb "0.0.1")
|
||||
|
||||
(require '[pod.babashka.hsqldb :as db])
|
||||
|
||||
(def db "jdbc:hsqldb:mem:testdb;sql.syntax_mys=true")
|
||||
|
||||
(db/execute! db ["create table foo ( foo int );"])
|
||||
|
||||
(db/execute! db ["insert into foo values (1, 2, 3);"])
|
||||
|
||||
(db/execute! db ["select * from foo;"])
|
||||
|
|
@ -1,33 +0,0 @@
|
|||
(require '[babashka.pods :refer [load-pod]])
|
||||
|
||||
(load-pod 'org.babashka/lanterna "0.0.1-SNAPSHOT" {#_#_:force true #_#_:transport :socket})
|
||||
|
||||
(require '[pod.babashka.lanterna.terminal :as terminal])
|
||||
|
||||
(def terminal (terminal/get-terminal))
|
||||
|
||||
(terminal/start terminal)
|
||||
|
||||
(terminal/put-string terminal
|
||||
(str "Hello TUI Babashka!")
|
||||
10 5)
|
||||
(terminal/put-string terminal
|
||||
(str "The size of this terminal: "
|
||||
(terminal/get-size terminal))
|
||||
10 6)
|
||||
(terminal/put-string terminal
|
||||
"Press q to exit."
|
||||
10 7)
|
||||
|
||||
(terminal/flush terminal)
|
||||
|
||||
(def k (terminal/get-key-blocking terminal))
|
||||
|
||||
(terminal/put-string terminal
|
||||
(str "You pressed: " k)
|
||||
10 8)
|
||||
|
||||
(Thread/sleep 1000)
|
||||
|
||||
(terminal/stop terminal)
|
||||
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
(require '[babashka.pods :as pods])
|
||||
(pods/load-pod 'org.babashka/parcera "0.0.1-SNAPSHOT")
|
||||
(require '[pod.babashka.parcera :as parcera])
|
||||
|
||||
(prn (parcera/ast "(ns foo)"))
|
||||
;;=> (:code (:list (:symbol "ns") (:whitespace " ") (:symbol "foo")))
|
||||
|
||||
(prn (parcera/code (parcera/ast "(ns foo)")))
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
#!/usr/bin/env bb
|
||||
|
||||
(require '[babashka.pods :as pods])
|
||||
(pods/load-pod 'justone/tabl "0.2.0")
|
||||
|
||||
(require '[pod.tabl.fancy :as fancy])
|
||||
(require '[pod.tabl.doric :as doric])
|
||||
|
||||
(fancy/print-table [{:foo 1 :bar 2} {:foo 2 :bar 3}])
|
||||
(doric/print-table [{:foo 1 :bar 2} {:foo 2 :bar 3}])
|
||||
|
|
@ -1,34 +0,0 @@
|
|||
(require '[babashka.pods :as pods])
|
||||
(pods/load-pod 'tzzh/aws "0.0.3")
|
||||
(require '[pod.tzzh.dynamodb :as d])
|
||||
(require '[pod.tzzh.s3 :as s3])
|
||||
(require '[pod.tzzh.paginator :as p])
|
||||
|
||||
|
||||
(d/list-tables)
|
||||
|
||||
(d/batch-get-item {:RequestItems
|
||||
{"AmazingTable" {:Keys [{:some-property {:S "SomeValue"}
|
||||
:something-else {:S "SomethingSomething"}}]}}})
|
||||
|
||||
(d/batch-write-item {:RequestItems
|
||||
{"AmazingTable" [{:PutRequest {:Item {:some-property {:S "abxdggje"}
|
||||
:something-else {:S "zxcmbnj"}
|
||||
:another-thing {:S "asdasdsa"}}}}]}})
|
||||
|
||||
(d/get-item {:Key {:lalala {:S "zzzzzzzz"}
|
||||
:bbbbbb {:S "abxbxbxx"}}
|
||||
:TableName "SomeTable"})
|
||||
|
||||
(d/describe-table {:TableName "SomeTable"})
|
||||
|
||||
(s3/list-buckets)
|
||||
|
||||
;; Paginators example
|
||||
(let [s3-paginator (p/get-paginator s3/list-objects-v2-pages)]
|
||||
(s3-paginator {:Bucket "some-bucket"
|
||||
:Prefix "some-prefix/something/"}))
|
||||
;; this returns a list of all the pages i.e a list of ListObjectsV2Output that are lazily fetched
|
||||
|
||||
(let [glue-paginator (p/get-paginator g/list-crawlers)]
|
||||
(glue-paginator))
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
(require '[babashka.pods :as pods])
|
||||
(pods/load-pod 'tzzh/mail "0.0.2")
|
||||
(require '[pod.tzzh.mail :as m])
|
||||
|
||||
(m/send-mail {:host "smtp.gmail.com"
|
||||
:port 587
|
||||
:username "kylian.mbappe@gmail.com"
|
||||
:password "kylian123"
|
||||
:subject "Subject of the email"
|
||||
:from "kylian.mbappe@gmail.com"
|
||||
:to ["somebody@somehwere.com"]
|
||||
:cc ["somebodyelse@somehwere.com"]
|
||||
:text "aaa" ;; for text body
|
||||
:html "<b> kajfhajkfhakjs </b>" ;; for html body
|
||||
:attachments ["./do-everything.clj"] ;; paths to the files to attch
|
||||
})
|
||||
Loading…
Reference in a new issue