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:
| 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; |
| (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 %)) |
| (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))) |
I hereby claim:
To claim this, I am signing this object:
| set nocompatible | |
| filetype on " to prevent non-0 exit codes | |
| filetype off | |
| " | |
| " PLUGINS | |
| " | |
| set rtp+=~/.vim/bundle/Vundle.vim |
| 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 |
| ;; 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" |
| - |
| const _ = require('lodash'); | |
| export default class MemcachedStore { | |
| constructor (memcached, { keyPrefix, ttl = 15 * 60 }) { | |
| this.memcached = memcached; | |
| this.keyPrefix = keyPrefix; | |
| this.ttl = ttl; | |
| this.queuedGets = {}; | |
| } |