Skip to content

Instantly share code, notes, and snippets.

View oubiwann's full-sized avatar
💭
🌌

Duncan McGreggor oubiwann

💭
🌌
View GitHub Profile
@oubiwann
oubiwann / saturn-jupiter-earth.ipynb
Last active November 7, 2017 05:06
Saturn/Jupiter/Earth Distances over Next 60 Years (and who would trade with whom)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@oubiwann
oubiwann / ansi_example.clj
Last active June 30, 2017 14:20
Clojure ANSI Example
(ns ansi-example
(:require [clansi :as ansi]))
(defn -main
"COLORS!!!
From a terminal in the direectory where you cloned this gist,
just run:
```
$ lein run
@oubiwann
oubiwann / cmr.clj
Last active May 26, 2017 18:52
Debugging ACLs for CMR Variable Ingest
scratch
=======
(reset)
(run-tests 'cmr.system-int-test.ingest.variable-ingest-test)
=============================================================================
(reset)
@oubiwann
oubiwann / pubsub_with_callbacks.clj
Last active May 11, 2021 02:09
Clojure core.async Pub/Sub Example (with callbacks)
(ns pubsub-with-callbacks
"Adapted from Timothy Baldridge's 2013 core.async examples:
* https://raw.githubusercontent.com/halgari/clojure-conj-2013-core.async-examples/master/src/clojure_conj_talk/core.clj"
(:require [clojure.core.async :as async]))
(def pub-channel (async/chan 1))
(def publisher (async/pub pub-channel :tag))
(def print-channel (async/chan 1))
(defn run-print-channel
@oubiwann
oubiwann / appify.sh
Last active April 29, 2023 10:32 — forked from advorak/appify.sh
appify — create the simplest possible Mac app from a shell script (adds an application icon)
#!/usr/bin/env bash
VERSION=4.0.1
SCRIPT=`basename "$0"`
APPNAME="My App"
APPICONS="/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/GenericApplicationIcon.icns"
OSX_VERSION=`sw_vers -productVersion`
PWD=`pwd`
function usage {
@oubiwann
oubiwann / winter-wonderland.lfe
Last active December 7, 2016 14:53
LFE Winter Wonderland
;; Start an LFE REPL:
;;
;; $ lfe
;;
;; Load the file:
;;
;; lfe> (run "winter-wonderland.lfe")
;;
;; Then run these:
;;
@oubiwann
oubiwann / jars.diff
Last active July 13, 2016 03:13
.jar diff for schema 1.1.2
$ diff -ru . /tmp/schema-1.1.2
diff -ru ./META-INF/MANIFEST.MF /tmp/schema-1.1.2/META-INF/MANIFEST.MF
--- ./META-INF/MANIFEST.MF 2016-07-12 22:01:02.000000000 -0500
+++ /tmp/schema-1.1.2/META-INF/MANIFEST.MF 2016-06-13 14:41:58.000000000 -0500
@@ -1,6 +1,6 @@
Manifest-Version: 1.0
-Build-Jdk: 1.7.0_91
-Built-By: oubiwann
-Created-By: Leiningen 2.5.3
+Built-By: w01fe
$ make repl
#error {
:cause java.util.concurrent.atomic.AtomicReference cannot be cast to schema.utils.PSimpleCell
:via
[{:type clojure.lang.Compiler$CompilerException
:message java.lang.ExceptionInInitializerError, compiling:(lcmap/config.clj:1:1)
:at [clojure.lang.Compiler load Compiler.java 7391]}
{:type java.lang.ExceptionInInitializerError
:message nil
:at [java.lang.Class forName0 Class.java -2]}
@oubiwann
oubiwann / project.clj
Created March 16, 2016 15:49
Working with nested sequences in Clojure
(defproject nestseq "0.1.0-SNAPSHOT"
:description "FIXME: write description"
:url "http://example.com/FIXME"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.8.0"]
[org.clojure/core.async "0.2.374"]
[tesser.core "1.0.1"]
[twig "0.1.6"]])
@oubiwann
oubiwann / codox-build-error.md
Last active February 7, 2016 03:35
codox example build errors (core.typed branch)

Update: This was fixed by changing the soure paths to the following:

:source-paths ^:replace ["src-typed/clojure"]

Issue

Exception getting thrown on examples that shouldn't be there: