Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am gregorstocks on github.
  • I am gregorstocks (https://keybase.io/gregorstocks) on keybase.
  • I have a public key ASBIK1mTX14c5I_9HQQerpzmu6HVbR-vZ-AZhbxXqZcfRAo

To claim this, I am signing this object:

intended
(s/def ::boop string?)
(s/def ::blah (s/keys :opt {::boop}))
{::boop 5} ;; error
{::booop 5} ;; not an error
@GregorStocks
GregorStocks / scary-people.clj
Last active August 21, 2016 14:12 — forked from j-po/scary-people.clj
Go `n` levels deep into the "Normal people scare me" shirt
(defn scary-people
"Go `n` levels deep into the 'Normal people scare me' shirt"
[n]
(loop [i n
ret "Normal people scare me"
quotes (if (odd? i) \" \')]
(if (zero? i)
ret
(recur (dec i)
(str "Normal people wearing " quotes ret quotes " shirts scare me")
weird-abs.core=> (Math/abs -10000000000000)
10000000000000
weird-abs.core=> (def a -10000000000000)
#'weird-abs.core/a
weird-abs.core=> (Math/abs a)
1316134912
@GregorStocks
GregorStocks / extranapkins.clj
Last active May 3, 2016 06:35
extranapkins.clj
(defn extranapkin [s]
(let [n (number->words (count (string/split s #" ")))]
(str "I've got " n " words for you: " s)))
(defn extranapkins [x]
(loop [so-far "Fuck off"
i 1]
(if (> i x)
so-far
(recur (extranapkin so-far) (inc i)))))
(def number->words)
(defn small->word [n]
(case n
1 "one"
2 "two"
3 "three"
4 "four"
5 "five"
6 "six"
(ns extranapkins.core-test
(:require [clojure.test :refer :all]
[clojure.string :as string]
[extranapkins.core :refer :all]))
(def from-blog "I've got nine hundred and twenty-one words for you: I've got nine hundred and twelve words for you: I've got nine hundred and three words for you: I've got eight hundred and ninety-four words for you: I've got eight hundred and eighty-five words for you: I've got eight hundred and seventy-six words for you: I've got eight hundred and sixty-seven words for you: I've got eight hundred and fifty-eight words for you: I've got eight hundred and forty-nine words for you: I've got eight hundred and forty words for you: I've got eight hundred and thirty-one words for you: I've got eight hundred and twenty-two words for you: I've got eight hundred and thirteen words for you: I've got eight hundred and four words for you: I've got seven hundred and ninety-five words for you: I've got seven hundred and eighty-six words for you: I've got seven hundred and

Updog FAQ

  1. What's Updog?

Nm what's up with you? 2. Okay, so why should I care about Updog?

What's Updog?

-*- mode: clojure; -*-
; vim: filetype=clojure
(logging/init {:file "riemann.log"})
; Listen on the local interface over TCP (5555), UDP (5555), and websockets
; (5556)
(let [host "0.0.0.0"]
(tcp-server {:host host})
(udp-server {:host host})
set :port, 6969
set :bind, "0.0.0.0"