I hereby claim:
- I am tie-rack on github.
- I am tierack (https://keybase.io/tierack) on keybase.
- I have a public key whose fingerprint is 27FD D8B6 2705 5CA3 8228 6C8B C1AB 0987 55CD 0198
To claim this, I am signing this object:
(ns collection-predicates) | |
(defmacro report | |
"A macro that takes Clojure code then prints the code and its results." | |
[title & forms] | |
(concat | |
`(do | |
(printf "=== %s ===\n" ~title)) | |
(map (fn [form] | |
(if (= 'skip (first form)) |
// ==UserScript== | |
// @name oulipo.social pal | |
// @namespace http://kilosecond.com/ | |
// @version 0.1 | |
// @description Warn when you try to input a wrong thing | |
// @author ghosss | |
// @match https://oulipo.social/* | |
// @grant none | |
// ==/UserScript== |
I hereby claim:
To claim this, I am signing this object:
(defn chunk-rows | |
"Given a seq of maps, split them into groups, such that no group | |
have more than n total keys across its maps." | |
[rows n] | |
(lazy-seq | |
(loop [this-chunk [] | |
this-chunk-size 0 | |
to-go rows] | |
(if (empty? to-go) | |
(list this-chunk) |
h2:before { | |
content: "Name: " | |
} | |
h3:before { | |
content: "Status: " | |
} | |
h4:before { | |
content: "Serial number: " |
#!/bin/zsh | |
COMMAND=$1 | |
COMMAND=${COMMAND[2,-1]} | |
ARGUMENTS=$@[2,-1] | |
echo "\e[33mYou typed: \e[31mgi $@\e[0m" | |
echo "\e[33mYou meant: \e[32mgit $COMMAND $ARGUMENTS\e[0m" | |
echo |
(defn example-middleware [handler] | |
(fn [request] | |
(let [now (System/currentTimeMillis) | |
modified-request (assoc-in request [:headers "received-at"] now) | |
response (handler modified-request)] | |
(assoc-in response | |
[:headers "processing-time"] | |
(- (System/currentTimeMillis) now))))) |
#!/bin/zsh | |
COMMAND=$1 | |
COMMAND=${COMMAND[2,-1]} | |
ARGUMENTS=$@[2,-1] | |
echo "\e[33mYou typed: \e[31mgi $@\e[0m" | |
echo "\e[33mYou meant: \e[32mgit $COMMAND $ARGUMENTS\e[0m" | |
echo |
var comic = $("div.s img[title]"); | |
var titleP = $("<p></p>"); | |
titleP.css({"font-variant": "normal", | |
"border": "1px solid yellow", | |
"padding": "1em", | |
"background-color": "#FFFFCC"}); | |
titleP.text(comic.attr("title")); | |
comic.after(titleP); |
#!/usr/bin/env ruby | |
require 'yaml' | |
begin | |
YAML.load(STDIN) | |
puts '<h1 style="color: green;">GOOD</h1>' | |
rescue Exception => e | |
puts '<h1 style="color: red;">BAD</h1>' | |
puts e.message |