Skip to content

Instantly share code, notes, and snippets.

@cldwalker
cldwalker / ripl-play-example
Created December 2, 2010 14:03
ripl-play example
a = 10 ** 2
a + 10
@cldwalker
cldwalker / example use
Created January 19, 2011 01:59
using sparql_client and hirb
$ ruby sparql_client_example.rb
+--------------------------------------------------------------------+-------------------------------------------------+-------------------------------------+
| s | p | o |
+--------------------------------------------------------------------+-------------------------------------------------+-------------------------------------+
| http://dbpedia.org/resource/Elizabeth_Peabody__Teacher | http://www.w3.org/1999/02/22-rdf-syntax-ns#type | http://www.w3.org/2002/07/owl#Thing |
| http://dbpedia.org/resource/Bonython_Hall | http://www.w3.org/1999/02/22-rdf-syntax-ns#type | http://www.w3.org/2002/07/owl#Thing |
| http://dbpedia.org/resource/Zemfira | http://www.w3.org/1999/02/22-rdf-syntax-ns#type | http://www.w3.org/2002/07/owl#Thing |
| http://dbpedia.org/resource/Myles_Ke
@cldwalker
cldwalker / .riplrc
Created April 24, 2011 20:22
ripl multi-line history plugin - two ways to easily access last edited code block
# Add to ~/.riplrc
module Ripl::MultiLineHistory
attr_reader :last_buffer
# hacks multi-line's loop_once
def loop_once
@cldwalker
cldwalker / rails-overview.rb
Created July 20, 2011 06:47
Prints out a tree of classes and their methods for a rails project
#!/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
cldwalker / gist:4690642
Created February 1, 2013 10:54
Example lein grep search
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
(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
cldwalker / gist:3043504e79c389bec5ebd2a4f4fa8a57
Last active April 29, 2020 14:06
ClojureScript ReactNative Unsession
@cldwalker
cldwalker / knowledge-graph-experiment.md
Last active March 11, 2024 11:10
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
cldwalker / spike-day-02-03-20.md
Last active December 29, 2023 04:52
GraalVM dive in Clojure at work

Spike

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

GraalVM Build Tools