Skip to content

Instantly share code, notes, and snippets.

@Folcon
Folcon / oz-fails-render.clj
Last active Apr 27, 2020
Example from the docs converted and failing to render
View oz-fails-render.clj
This file has been truncated, but you can view the full file.
;; Example from here: https://vega.github.io/vega-lite/docs/repeat.html#multi-series-line-chart-with-repeated-layers
(ns failing-example
(:require [clojure.data.json :as json]
[oz.core :as oz]))
@Folcon
Folcon / install-mapnik-amazon-ami.sh
Last active Nov 20, 2018 — forked from springmeyer/install-mapnik-amazon-ami.sh
Mapnik on Amazon Linux Default AMI (Fedora)
View install-mapnik-amazon-ami.sh
# http://aws.amazon.com/amazon-linux-ami/
# http://aws.amazon.com/amazon-linux-ami/faqs/
# Boot up a machine with at least 1.5 to 2 GB Ram
# login
chmod 600 key.pem
ssh -i key.pem ec2-user@ec2...compute.amazonaws.com
# update
View todo-spec-issue.cljs
(ns todo-spec-issue
(:require
[clojure.spec :as s]
[clojure.spec.test :as stest]
[clojure.spec.impl.gen :as gen]))
(s/def ::id int?)
(s/def ::name string?)
(s/def ::todo (s/keys :req-un [::id ::name]))
(s/def ::todos (s/and
View keybase.md

Keybase proof

I hereby claim:

  • I am folcon on github.
  • I am folcon (https://keybase.io/folcon) on keybase.
  • I have a public key whose fingerprint is 02B2 BD89 01C9 B8FA 0284 ED52 06C8 A92E 5296 739B

To claim this, I am signing this object:

@Folcon
Folcon / Create-Release.ps1
Created Apr 11, 2013
Modifications to Create-Release.ps1
View Create-Release.ps1
[CmdletBinding()]
param (
[Parameter(Position=0, ValueFromPipeLine=$true, Mandatory=$false)]
[string] $ProjectNameToBuild = '',
[Parameter(Mandatory=$false)]
[string] $SolutionDir,
[Parameter(Mandatory=$false)]
[string] $BuildDirectory
)
@Folcon
Folcon / sample6.txt
Created Jan 17, 2012
A Clojure Implementation of the Viterbi Algorithm
View sample6.txt
======================================
In/IN
[ an/DT Oct./NNP 19/CD review/NN ]
of/IN ``/``
[ The/DT Misanthrope/NN ]
''/'' at/IN
@Folcon
Folcon / clipboard-utils.clj
Created Aug 24, 2011
Just a quick clipboard slip/slurp I put together because I didn't find anything similar, don't know if it's useful for anyone but found it invaluable when getting large strings being returned from the repl and sticking the result in an editor for more car
View clipboard-utils.clj
(defn get-clipboard []
(.getSystemClipboard (java.awt.Toolkit/getDefaultToolkit)))
(defn slurp-clipboard []
(try
(.getTransferData (.getContents (get-clipboard) nil) (java.awt.datatransfer.DataFlavor/stringFlavor))
(catch java.lang.NullPointerException e nil)))
(defn spit-clipboard [text]
(.setContents (get-clipboard) (java.awt.datatransfer.StringSelection. text) nil))
You can’t perform that action at this time.