Skip to content

Instantly share code, notes, and snippets.

View cch1's full-sized avatar

Chris Hapgood cch1

  • Sun Tribe Trading
  • Center of the Universe
View GitHub Profile
@robert-stuttaford
robert-stuttaford / notes.md
Last active March 18, 2024 13:52
Datomic 0.9.5927 observations and questions

Query basics

{:db/ident       :meta/tag
 :db/valueType   :db.type/tuple
 :db/tupleAttrs  [:meta/tag-namespace :meta/tag-key :meta/tag-value] ;; all unique strings
 :db/cardinality :db.cardinality/one
 :db/unique      :db.unique/identity}

Then

@crisptrutski
crisptrutski / kahn.clj
Last active February 18, 2023 21:28 — forked from alandipert/kahn.clj
Kahn's topological sort in Clojure
;; Copyright (c) Alan Dipert. All rights reserved.
;; The use and distribution terms for this software are covered by the
;; Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php)
;; By using this software in any fashion, you are agreeing to be bound by
;; the terms of this license.
;; You must not remove this notice, or any other, from this software.
(ns alandipert.kahn
(:require
[clojure.set :refer [union]])
module ActionView
module Helpers
class FormBuilder
Check = Struct.new(:box, :label)
# Behaves almost exactly like the select method, but instead of generating a select tag,
# generates Checks. These consist of two attributes, +box+ and +label+,
# which are (unsurprisingly) the HTML for the check box and the label. Called without a block,
# this method will return an array of check boxes. Called with a block, it will yield each
# check box to your template.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>org.redis.redis-server</string>
<key>Program</key>
<string>/usr/local/redis/bin/redis-server</string>
<key>ProgramArguments</key>