I hereby claim:
- I am kornysietsma on github.
- I am korny (https://keybase.io/korny) on keybase.
- I have a public key whose fingerprint is CCA6 2821 5A0F 290B 5040 1F49 1C12 9115 703D B610
To claim this, I am signing this object:
source 'https://rubygems.org' | |
gem 'asciidoctor-pdf', '>= 1.5.0.alpha.11' | |
gem 'asciidoctor' | |
gem 'asciidoctor-diagram', '~> 1.5.1' | |
gem 'rake' | |
gem 'coderay' | |
gem 'pygments.rb' | |
gem 'git' | |
gem 'edn' |
#!/usr/bin/env python | |
try: | |
import boto3 | |
except ImportError: | |
print 'Please install boto3 - either set up a virtualenv, or run: pip install boto3' | |
exit(1) | |
import sys |
(def AnyPost | |
{ | |
:id (s/either s/Str s/Int) | |
:slug s/Str | |
:from-feed-id s/Int | |
:url s/Str | |
:url-with-slug s/Str | |
(s/optional-key :tags) [s/Str] | |
}) |
(defn irc-loop | |
"core.async based main loop" [config] | |
(let [killer (chan)] | |
(go-loop [data config] | |
(when data | |
(println "running") | |
(alt! | |
killer ([reason] (println "killed because:" reason)) | |
(timeout 1000) (do (println "tick!") | |
(recur data))))) |
(ns gitlab-utils.config) | |
(def api-base "http://localhost/api/v3/") |
(def default-wait-death (time/seconds 5)) | |
(def default-wait-delay-ms 10) | |
(defn wait-until* | |
"wait until a function has become true" | |
([name fn] (wait-until* name fn default-wait-death)) | |
([name fn wait-death] | |
(let [die (time/plus (time/now) wait-death)] | |
(loop [] | |
(if-let [result (fn)] |
#!/bin/bash -e | |
set +e | |
xchat_pid=$(pidof xchat) | |
set -e | |
if [[ -z $xchat_pid ]]; then | |
xchat & | |
echo "waiting for xchat to calm down" | |
sleep 3 | |
fi | |
xchat -e --command "set net_ping_timeout 60" |
(defn try-topology [conn fn] | |
(let [ch (lch/open conn)] | |
(try | |
(fn conn ch) | |
true | |
(catch IOException e | |
(when-not (instance? ShutdownSignalException (.getCause e)) | |
(throw (Exception. "Unexpected exception trying RabbitMQ operation" e))) | |
(let [reason (-> e .getCause .getReason)] | |
(when-not (instance? AMQP$Channel$Close reason) |
(defn graphiteisze-path | |
"Graphite uses a dot (.) as a separator. Whisper stores metrics on disk by name, so we cannot have slashes in the metric name" | |
[path] | |
(clojure.string/replace path #"[/\.]" "_")) | |
(defn timed-hook-fn | |
[metric-registry group type name] | |
(let [timer (timer metric-registry [(graphiteisze-path group) (graphiteisze-path type) (graphiteisze-path name)])] | |
(fn [f & args] | |
(time-fn! timer #(apply f args))))) |
I hereby claim:
To claim this, I am signing this object: