Skip to content

Instantly share code, notes, and snippets.

View mfn's full-sized avatar

Markus Podar mfn

View GitHub Profile
@rivalitaet
rivalitaet / fibonacci.sql
Last active April 28, 2016 11:11
Creates fibonacci numbers directly in postgreSQL
WITH RECURSIVE fibs(val, tmp) as (
SELECT 1::NUMERIC, 1::NUMERIC UNION ALL
SELECT tmp, val + tmp FROM fibs
)
SELECT val FROM fibs limit 100
@mfn
mfn / http_responsetime_detailed.rb
Last active December 12, 2015 08:49 — forked from anonymous/http_responsetime_detailed.rb
Munin script written in Ruby to get more details about a single HTTP connection, namely: DNS lookup time, connect time, send request time, wait for first byte of response and response time.
#!/usr/bin/env ruby
require 'uri'
require 'socket'
if ARGV[0] and ( ARGV[0] == "-h" or ARGV[0] == "--help" )
puts "#{$0} [-h|--help] [config]"
puts "Munin plugin to measure individual HTTP timings"
puts " --help,-h Show this help"
puts " config Prints the configuration for munin"