Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View hcarvalhoalves's full-sized avatar

Henrique Carvalho Alves hcarvalhoalves

View GitHub Profile
@hcarvalhoalves
hcarvalhoalves / nginx_status_codes.rb
Created May 1, 2012 17:58 — forked from mipearson/nginx_status_codes.rb
Very simple munin plugin to graph nginx HTTP error codes
#!/usr/bin/env ruby
CODES = {
'400' => 'Bad Request',
'401' => 'Unauthorized',
'403' => 'Forbidden',
'404' => 'Not Found',
'405' => 'Method Not Allowed',
'406' => 'Not Acceptable',
'408' => 'Request Timeout',
(ns logic.y
(:refer-clojure :exclude [== reify inc])
(:use [clojure.core.logic minikanren prelude
nonrel match]))
(defna findo [x l o]
([_ [[?y :- o] . _] _]
(project [x ?y] (== (= x ?y) true)))
([_ [_ . ?c] _] (findo x ?c o)))