Skip to content

Instantly share code, notes, and snippets.

View clifton's full-sized avatar
🎯

Clifton King clifton

🎯
View GitHub Profile
@clifton
clifton / robbyrussell-hostname.zsh-theme
Last active May 5, 2022 17:53 — forked from SteelPangolin/robbyrussell-hostname.zsh-theme
Tweak robbyrussell ZSH theme to prepend hostname
if [[ -n $SSH_CONNECTION ]]; then
local hostname="%{$fg_bold[black]%}%m "
else
local hostname=""
fi
local ret_status="%(?:%{$fg_bold[green]%}➜ :%{$fg_bold[red]%}➜ %s)"
PROMPT='${hostname}${ret_status}%{$fg_bold[green]%}%p %{$fg[cyan]%}%c %{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%} % %{$reset_color%}'
ZSH_THEME_GIT_PROMPT_PREFIX="git:(%{$fg[red]%}"
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
(use '[datomic.api :only [q db] :as d])
(def uri "datomic:mem://accounts")
;; create database
(d/create-database uri)
;; connect to database
(def conn (d/connect uri))
(use '[datomic.api :only [db q] :as d])
;;LOOK IN THE BOTTOM FOR CORRECT USE OF DATOMIC :)
;;not supplied:
;;* connecting to a db named "conn"
;; (checkout awesome Jonas Edlunds gist
;; for inspiration: https://gist.github.com/3122363 )
;;* a schema that fit's the following person-datoms
#!/bin/bash
set -o errexit
set -o nounset
if [[ ${#} -ne 1 ]]
then
echo "Usage: ${0} upstart-conf-file" >&2
exit 1
fi
(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:
<account>
<account_id>1918</account_id>
<username>demo_user_0007</username>
<first_name>Amy</first_name>
<last_name>Tallon</last_name>
<email_address>demo@orgsync.com</email_address>
<phone_number>512-388-4668</phone_number>
<city>Austin</city>
<state>TX</state>
<webcal_url>