I hereby claim:
- I am clifton on github.
- I am cliftonk (https://keybase.io/cliftonk) on keybase.
- I have a public key whose fingerprint is 0FD0 6D84 6C24 EAFF DB41 9921 0CE0 D254 8EA0 3B6B
To claim this, I am signing this object:
;; Fib sequence from http://www.futilitycloset.com/2015/06/28/made-to-order-4/ | |
(def denom 999999999999999999999998999999999999999999999999M) | |
(->> (.divide 1M denom (java.math.MathContext. 2780)) | |
.toString | |
(re-find #"\.(\d+)") last ;; extract digits after decimal place | |
(partition 24) | |
(map #(apply str %)) | |
clojure.pprint/pprint) | |
;; => | |
["000000000000000000000001" |
VAGRANTFILE_API_VERSION = '2' | |
Vagrant.require_version '>= 1.6.3' | |
def require_plugin(name) | |
unless Vagrant.has_plugin?(name) | |
raise <<-EOT.strip | |
#{name} plugin required. Please run: "vagrant plugin install #{name}" | |
EOT | |
end | |
end |
set nocompatible | |
filetype on " to prevent non-0 exit codes | |
filetype off | |
" | |
" PLUGINS | |
" | |
set rtp+=~/.vim/bundle/Vundle.vim |
I hereby claim:
To claim this, I am signing this object:
(defn minmax-by-codepoint | |
"Takes a string and outputs the most and least common | |
characters along with their total counts. In the event of a | |
tie, return the character with the lowest code point" | |
[s] | |
(->> (frequencies s) | |
((juxt (partial sort-by (fn [[c cnt]] [cnt c])) | |
(partial sort-by (fn [[c cnt]] [(- cnt) c])))) | |
(map first))) |
(defn gen-name [] | |
(let [letter-range (range (int \a) ((comp inc int) \z)) | |
rand-letter #((comp char rand-nth) letter-range) | |
rand-number #((comp int rand) 1000)] | |
(format "%s%s%03d" (rand-letter) (rand-letter) (rand-number)))) | |
(def robot #(atom (gen-name))) | |
(def robot-name #(deref %)) |
package com.orgsync.api.examples; | |
import java.util.List; | |
import java.util.concurrent.ExecutionException; | |
import com.orgsync.api.ApiClient; | |
import com.orgsync.api.ApiResponse; | |
import com.orgsync.api.FormsResource; | |
import com.orgsync.api.OrgSync; | |
import com.orgsync.api.OrgsResource; |
(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 |