Skip to content

Instantly share code, notes, and snippets.

View athanhat's full-sized avatar

Athanassios I. Hatzis athanhat

View GitHub Profile
@athanhat
athanhat / race_stats_summary.sql
Created November 3, 2022 09:58
Race Stats Summary
```sql
SELECT
coalesce(
json_agg(
"root"
ORDER BY
"root.pg.rss_elapsed_min" DESC NULLS FIRST
),
'[]'
) AS "root"
@athanhat
athanhat / hodur-visualize-datomic-schema.clj
Created July 8, 2022 13:30
Hodur Visualize Datomic Schema with graphviz
(ns hodure-test.getting-started
(:require [hodur-engine.core :as hodur]
[hodur-datomic-schema.core :as hodur-datomic]
[hodur-graphviz-schema.core :as hodur-graphviz]
[clojure.java.io :as io]
))
(def person-schema (hodur/init-schema
'[^{:datomic/tag-recursive true}
Person
@athanhat
athanhat / hodur-datomic-graphviz-schema.edn
Created July 8, 2022 13:26
Datomic Schema in Hodur Descriptive Domain Modeling Engine format
[
^{:datomic/tag-recursive true
:graphviz/tag-recursive true
:graphviz/color "lightyellow"
:graphviz/stereotype "Person"
:graphviz/group "person-group"
}
Employee
[^String name
^Float salary
@athanhat
athanhat / pathom3_geojs_accuweather_api.clj
Last active July 2, 2022 14:21
Alternative Pathom3 Tutorial using GeoJS and AccuWeather APIs
[:name "GeoJS and AccuWeather EQL API with Pathom3"
:description "Alternative Pathom3 Tutorial using GeoJS and AccuWeather APIs"
:version "0.1"
:author "Athanassios I. Hatzis"
:copyright "(C) Athanassios I. Hatzis 2022-07-02"
:license "Eclipse Public License 2.0"
:url "http://healis.eu"]
(ns weather-tutorial2
(:require
@athanhat
athanhat / fulcro-shadow-cljs.edn
Created June 24, 2022 08:51
fulcrologic/fulcro shadow-cljs.edn configuration file
{:deps {:aliases [:dev :test :workspaces]}
:nrepl {:port 9000}
:dev-http {9001 "resources/public"}
:jvm-opts ["-Xmx2G"]
:builds {:workspaces {:target nubank.workspaces.shadow-cljs.target
:ns-regexp "-cards$"
:output-dir "resources/public/js/workspaces"
:asset-path "/js/workspaces"
:compiler-options {:external-config {:fulcro {:html-source-annotations? true}}}
:preloads [com.fulcrologic.fulcro.inspect.preload
@athanhat
athanhat / project.clj
Last active June 1, 2022 12:40
Figwheel project file with modifications to run ClojureScript nREPL middleware library
(defproject figwheel-demo "0.1.0-SNAPSHOT"
:description "FIXME: write this!"
:url "http://example.com/FIXME"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:min-lein-version "2.9.1"
:dependencies [[org.clojure/clojure "1.10.0"]
[org.clojure/clojurescript "1.10.773"]
@athanhat
athanhat / user.clj
Last active June 1, 2022 10:51
figwheel project user namespace - start figwheel server
(ns user
(:require
[figwheel-sidecar.repl-api :as f]))
;; user is a namespace that the Clojure runtime looks for and
;; loads if its available
;; You can place helper functions in here. This is great for starting
;; and stopping your webserver and other development services
@athanhat
athanhat / athanhat.gist
Created August 27, 2015 10:04
Athanassios Hatzis Gist
One
Two
Three