Skip to content

Instantly share code, notes, and snippets.

@c-spencer
c-spencer / preprocess-schema.clj
Last active December 10, 2015 05:28 — forked from anonymous/preprocess-schema.clj
Simple template expansion meta-definitions for Datomic
(defn extract-key [m k]
(when-let [value (k m)] [(dissoc m k) value]))
(defn expand-entry-id [entry]
(if (keyword? (:db/id entry))
(update-in entry [:db/id] d/tempid)
entry))
(defn expand-schema-entry [entry templates]
(if (and (map? entry) (:meta/templates entry))
#coding: utf8
#################################### IMPORTS ###################################
# Sublime Libs
import sublime
import sublime_plugin
################################################################################
class ExpandselectionCommand(sublime_plugin.TextCommand):
var Tween = (function () {
var animations = {}, nanim = 0;
var Tween = {};
Tween.step = function () {
var d = new Date();
var thisTick = d.getTime();
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<script type="text/javascript" src="Eventful.js"></script>
<script type="text/javascript" src="Mustache.js"></script>
</head>
<body>
<div style="float: left; margin-right: 30px;">
<h2>Object Definition</h2>
<pre> var Person = function (name) {