Skip to content

Instantly share code, notes, and snippets.

View clifton's full-sized avatar
🎯

Clifton King clifton

🎯
View GitHub Profile
(ns datomic-helpers
(:require [clojure.java.io :as io]
[clojure.walk :as walk]
[datomic.api :as d :refer (db)]))
;;; Expose Datomic vars here, for convenience
(def tempid d/tempid)
(def connect d/connect)
(def create-database d/create-database)
@clifton
clifton / index.txt
Created September 24, 2012 03:21 — forked from gus/index.txt
Ruby/Clojure analogs
For each Ruby module/class, we have Ruby methods on the left and the equivalent
Clojure functions and/or relevant notes are on the right.
For clojure functions, symbols indicate existing method definitions, in the
clojure namespace if none is explicitly given. clojure.contrib.*/* functions can
be obtained from http://github.com/kevinoneill/clojure-contrib/tree/master,
ruby-to-clojure.*/* functions can be obtained from the source files in this
gist.
If no method symbol is given, we use the following notation:

Fellow wizards of λ,

I'm a developer that's been doing Ruby for about 5 years at OrgSync, an awesome company that I helped bootstrap out of a house in Austin, TX while studying CS at UT. We have a really great subscription-based business model; directly serving over 300 colleges and universities (to include Stanford as well as USF & SFSU) at a 95+% annual renewal rate. We have also never taken any VC funding, which I believe is a stance in vogue right now (I'm only kind-of joking if any githubbers read this).

#! /usr/bin/ruby
# Pre-commit hook for removing trailing whitespace, converting tabs to
# spaces and removing blank lines at the end of a file.
#
# Author: Clifton King <cliftonk@gmail.com>
# gist: https://gist.github.com/3173611
if File.exists? '.git/merge-rebase'
puts "Detected '.git/merge-rebase'! Skipping pre-commit hook..."
$(document).ready(function() {
// automatically fix obfuscated email addresses pasted into
// to/cc/bcc fields
$("textarea[name=to], textarea[name=cc], textarea[name=bcc]")
.live('blur', function(e){
var text = $(this).val();
var separators = ['_', ' ', '\\[', '\\]', '\\(', '\\)'];
var separatorExp = '(' + separators.join('|') + ')+';
<?xml version="1.0" encoding="UTF-8"?>
<course_entry>
<account_id>3287</account_id>
<name>Chemistry</name>
<date>2012-05-15</date>
<id>1</id>
<link>https://courses.yourschool.edu/chemistry</link>
</course_entry>
<?xml version="1.0" encoding="UTF-8"?>
<course_entries>
<course_entry>
<account_id>3287</account_id>
<name>Chemistry</name>
<date>2012-05-15</date>
<id>1</id>
<link>https://courses.yourschool.edu/chemistry</link>
</course_entry>
</course_entries>
<?xml version="1.0" encoding="UTF-8"?>
<journal>
<name>Example</name>
<id>39603</id>
<balance>500.0</balance>
<transactions>
<transaction>
<id>54395</id>
<transaction_date>2011-07-18</transaction_date>
<description>jjj</description>
<?xml version="1.0" encoding="UTF-8"?>
<journal>
<name>Maintenance</name>
<id>39603</id>
<balance>10000.0</balance>
<transactions>
<transaction>
<id>54395</id>
<transaction_date>2011-07-18</transaction_date>
<description>jjj</description>
<?xml version="1.0" encoding="UTF-8"?>
<journal>
<name>example</name>
<id>48639</id>
<balance>10000.0</balance>
<transactions>
</transactions>
</journal>