Skip to content

Instantly share code, notes, and snippets.

Avatar

Henrique Carvalho Alves hcarvalhoalves

View GitHub Profile
View gist:1291bfbb40ecf525184e24452ff18567
(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)))
@hcarvalhoalves
hcarvalhoalves / nginx_status_codes.rb
Created May 1, 2012 — forked from mipearson/nginx_status_codes.rb
Very simple munin plugin to graph nginx HTTP error codes
View nginx_status_codes.rb
#!/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',