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
@wire(check-shard-no-tests { | |
= shard | |
"." | FS.Iterate(Recursive: true) >= filepaths | |
Remove( | |
filepaths | |
Predicate: { | |
Regex.Match(""".*(test|samples).*(\.shs|\.edn|\.clj)""") | Is([]) | |
Or | |
FS.Read | ExpectString | String.Contains(shard) | Not }) | |
When(Is([]) { |
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
.error-bg { | |
color-background: #FFCCCC; | |
} |
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
#!/usr/bin/env hy | |
(import sys) | |
(import subprocess) | |
(import [pathlib [Path]]) | |
(import [functools [partial]]) | |
(setv current-branch-name (subprocess.check_output ["git" "symbolic-ref" "--short" "HEAD"] :encoding "utf-8")) | |
(setv work-time (subprocess.check_output ["glass" "-s" "status" "--commit-template"] :encoding "utf-8")) |
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
; 1. rename attribute: :url/path → :legacy/url-path-v1 | |
(do (require '[datomic.api :as datomic] '[kanasubs.db :as db]) | |
(datomic/transact @db/connection | |
[{:db/id :url/path, :db/ident :legacy/url-path-v1}])) | |
; 2. repurpose :url/path | |
(do (in-ns 'kanasubs.db) | |
(transact @connection | |
[{:db/id #db/id[:db.part/db] | |
:db/ident :url/path |
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
#!/usr/bin/env hy | |
; Author: <Carlos C. Fontes> [email protected] | |
(import [sh [touch ls lein sleep]] | |
[glob [glob]] | |
sys | |
[subprocess [call Popen PIPE STDOUT]] | |
[thread [start_new_thread]]) | |
(defn with-print-call [exe] |
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
#!/usr/bin/env hy | |
; Author: <Carlos C. Fontes> [email protected] | |
(import [sh [cat lein echo tee rm]]) | |
(import [script.hy-lib.hyclops.hyclops [comp]]) ; you must provide this your own | |
(setv irrelevant-note-patterns | |
["/.repl/" "/out/" "/README.md" "/target/" "/script/hy_lib/"]) | |
(defn irrelevant-note? |
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
#!/usr/bin/env hy | |
; Author: <Carlos C. Fontes> [email protected] | |
(defn cljs-modified? | |
"""Verifies if the Clojurescript sources were modified since last build.""" | |
[] | |
(let [ls-by-time-modified (partial ls "-t")] | |
(-> (glob "src-cljs/app/*.cljs") | |
(ls-by-time-modified "resources/public/js/main.js") | |
.split |
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 insert | |
"Insert user registration invitation." | |
[to_email] | |
(let [invite-id (make-random)] | |
(db/insert :invites | |
{:id invite-id | |
:to_email to_email | |
:created_at (to-sql-date (now)) | |
:users_id (app.session/get :id)}) | |
(.toString invite-id))) |
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 foo | |
(let [eggs #(str %)] | |
([x y] (println (eggs x) y)) | |
([x] (println (eggs x))))) |
NewerOlder