Skip to content

Instantly share code, notes, and snippets.

View olivergeorge's full-sized avatar

Oliver George olivergeorge

  • Tasmania, Australia
  • 19:56 (UTC +10:00)
View GitHub Profile
@roman01la
roman01la / re-frame.clj
Last active October 21, 2020 11:32
Debugging re-frame subscriptions
(ns utils.re-frame
(:require [cljs.compiler :as cljsc]))
(defn- anonymous-function-declaration? [form]
(and (list? form)
(= 'fn (first form))
(vector? (second form))))
(defn- query-id->js-fn-name [query-id]
(let [ns-part (when-let [ns-part (namespace query-id)]
@projetnumero9
projetnumero9 / Generate diagram legend.ajs
Created December 9, 2020 18:32
#jArchi Generate a legend for the selected view, based on the concept types currently used
//
// Generate diagram legend
//
// 2020 David GERARD
//
// For a selected view, create a group named 'Legend', in which will be nested for each concepts type found in view
// - a concept, specifically sized to show the pictogram
// - a note, to be used to name or explain the concept specifically in the view, hence preventing to rename the concept
// That way,
// - a model will be a bit polluted but with a specific set of concepts, for legend purpose, prefixed so easily identifiable
@roman01la
roman01la / analyze.clj
Created March 18, 2021 01:42
analyzing unused and undefined re-frame subscriptions via clj-kondo
(ns analyze.core
(:require [clj-kondo.core :as clj-kondo]
[clojure.set :as set]))
;; checks re-frame's :<- syntax
;; to mark dependency subscriptions as used
(def analyze-reg-sub
"(require '[clj-kondo.hooks-api :as api])
(fn [{node :node}]
(let [[_ kw & children] (:children node)
@FrancoisCoudeville
FrancoisCoudeville / Step by step script examples - v0.1.ajs
Created May 26, 2021 10:48
jArchi Step by step Tutorial Beginner Guide script example creating, updating, navigating, deleting objects, relationship #jArchi
/****************************************
* Step by Step JArchi script examples *
* v0.1 *
* Francois Coudeville *
* May 2021 #jArchi *
* #Beginner #Guide #Tutorial #Example *
****************************************/
//---------
// 1 Utils
@cybye
cybye / gpt.ajs
Last active December 23, 2024 10:17
AutoDescribe a view and add to view documentation #jarchi
/*
* AutoDescribe a view and add to view documentation
*/
function CallApi(url,api_key, query) {
var imports = new JavaImporter(java.net, java.util, java.lang, java.io, java.nio.charset)
var result=""