Skip to content

Instantly share code, notes, and snippets.

View superstructor's full-sized avatar
🎯
Focusing

Isaac Johnston superstructor

🎯
Focusing
View GitHub Profile
@superstructor
superstructor / lein-git-inject.md
Last active December 30, 2019 04:26
lein-git-inject.md
  ;; left matched against [ "v0.0.4" ahead? dirty? ]
  ;; right matched against git describe --tags output "v0.0.4-5-ge2028de"
  :lein-git-inject {[#"v\d+\.\d+\.\d+" false? (constantly true)] #"v(\d+\.\d+\.\d+).*"
                    [#"v\d+\.\d+\.\d+" true?  (constantly true)] [#"v(\d+\.\d+\.\d+-\d+-[a-z0-9][8])" "-SNAPSHOT"]}

  ;; same but with static values instead of fns
  ;; except there is an issue with using `_` which is idiomatic syntax as we cannot write as a macro and:
 ;; WARNING: Can't take value of macro cljs.core/_ at line..

Content Add-ins Leak Memory Eventually Crashing Add-in

Content Add-ins leak memory on every call to Excel.run() at a rate large enough to eventually crash the add-in.

TaskPane Add-ins with exactly the same code do not display the same behaviour.

The amount of memory leaked ranges from 10MB to 100MB per Excel.run() call.

The amount of memory leaked correlates with the complexity of the Excel.run()

@superstructor
superstructor / README.md
Last active September 4, 2020 04:34
re-frame Maps vs Vectors

Data Structure

Vectors

[:find-primes {:n 100}]

Maps & Maps++

@superstructor
superstructor / README.md
Last active September 11, 2020 07:41
Dependency Resolution in CLJS+JS Projects

Part 1. Problem Definition

Dependency resolution and installation (provision) of mixed CLJS (maven) and JavaScript (npm) projects.

A Tangled Web

Lets consider a relatively simplified example in the following diagram:

+--------------+
@superstructor
superstructor / comparison.adoc
Last active February 11, 2021 22:08
re-com-css
Table 1. Comparison of re-com CSS Options
Current Inline Styles 'Utility First' CSS Garden CSS Garden 'CSS in [CL]JS'

Removes re-com.css

Reverses CSS→DOM Dep

Composable

'Pruning' not Required

Styles as Data

Styles in Namespace

// $id: "",
$schema: "http://json-schema.org/draft-07/schema#",
title: "JSONWebKeySet",
description: "A set of JSON Web Keys, as defined in IETF RFC 7517.",
type: "object",
required: [
"keys",
],
/**
* From IETF RFC 7517, Section 5:
@superstructor
superstructor / install.sh
Created July 21, 2023 23:01
MERN Stack Ubuntu 22.04
curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash -
sudo apt-get install -y nodejs
curl -fsSL https://pgp.mongodb.com/server-6.0.asc | \
sudo gpg -o /usr/share/keyrings/mongodb-server-6.0.gpg \
--dearmor
echo "deb [ arch=amd64,arm64 signed-by=/usr/share/keyrings/mongodb-server-6.0.gpg ] https://repo.mongodb.org/apt/ubuntu jammy/mongodb-org/6.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-6.0.list