Skip to content

Instantly share code, notes, and snippets.

cldwalker / explore_datafy_nav.clj
Created Aug 11, 2020 — forked from sashton/explore_datafy_nav.clj
Clojure datafy/nav exploration
View explore_datafy_nav.clj
(ns explore-datafy-nav
"Sample code demonstrating naving around a random graph of data.
The graph very likely will have circular references, which is not a problem.
To see the results, execute the entire file.
Each step in the nav process will be printed out, as well as the initial db.
Subsequent executions will generate a new random db."
(:require [clojure.datafy :refer [datafy nav]]
(defn generate-db
cldwalker /
Last active Mar 2, 2021
GraalVM dive in Clojure at work


I looked into the state of GraalVM and Clojure and wrote some small work-related scripts.

GraalVM Build Tools

cldwalker /
Last active Jan 25, 2021
knowledge graph experiment

I like to learn, index and retrieve information a lot. I know a lot of others do as well. We share data but I don't think we share our information and rarely our ontologies (a.k.a. our mental models). If we shared our ontologies, I think we could learn more from each other. With this hope in mind, I'm looking for a tool that provides these features:

  • Shares my ontology publicly
  • Shares my bookmarks publicly
  • Provides easy entry, extension and querying of my ontology
  • Provides easy entry and querying of my bookmarks
  • Shares interesting snapshots of my bookmarks
  • Encourages discovery of information that is new and interesting to others

Since I have not found such a tool, I have built a tool that:

cldwalker / gist:3043504e79c389bec5ebd2a4f4fa8a57
Last active Apr 29, 2020
ClojureScript ReactNative Unsession
View gist:3043504e79c389bec5ebd2a4f4fa8a57
View when-let-lol.clj
(defroutes chapter-routes
;; Example story-slug: 42-my-first-story
;; Example chapter-slug: 99-introduction
;; (util/parse-uid "42-my-first-story") -> 42
;; (util/parse-uid "99-introduction") -> 99
(GET "/chapters/:chapter-slug" [story-slug chapter-slug]
(let [story (some-> story-slug util/parse-uid db/find-story-by-uid)
chapter (some-> chapter-slug util/parse-uid db/find-chapter-by-uid)]
(and story chapter
(zizkov.views/show-chapter layout story chapter)))))
cldwalker / gist:4690642
Created Feb 1, 2013
Example lein grep search
View gist:4690642
Searching over Artifact ID...
| artifact | group | version | desc |
| lein-create-template | lein-create-template | 0.1.1 | A Leiningen plugin for creating templates from existing skeleton projects |
| lein-template | misaki | 0.0.1-alpha | FIXME: write description
cldwalker / rails-overview.rb
Created Jul 20, 2011
Prints out a tree of classes and their methods for a rails project
View rails-overview.rb
#!/usr/bin/env ruby
# == Description
# Prints out a tree of classes and their methods for a rails project. Can be run from the
# root directory of a rails project or with a specified rails directory. By default
# this script only looks in the models, controllers and helpers directories for ruby classes but that can be
# configured.
# This was useful back in the day when Rails projects were small and I wanted to a quick overview of
# the project.
cldwalker / .riplrc
Created Apr 24, 2011
ripl multi-line history plugin - two ways to easily access last edited code block
View .riplrc
# Add to ~/.riplrc
module Ripl::MultiLineHistory
attr_reader :last_buffer
# hacks multi-line's loop_once
def loop_once
cldwalker / example use
Created Jan 19, 2011
using sparql_client and hirb
View example use
$ ruby sparql_client_example.rb
| s | p | o |
| | | |
| | | |
| | | |