Skip to content

Instantly share code, notes, and snippets.

@afresh1
afresh1 / openbsd-httpd-fastcgi-notes.md
Created July 12, 2020 21:26
Notes on how OpenBSD's httpd handles its FastCGI parameters. Debugging it with slowcgi.

These examples all live in a default server block in your httpd.conf(5).

server "default" {
	listen on * port 80
	... # all the location blocks can together right here
}

We'll be using slowcgi(8) as the example, because with the -d flag it helpfully spits out the FastCGI environment it got from httpd(8) and what it's planning to do with that.

@dnmiller
dnmiller / pidift.m
Created April 7, 2015 21:04
Iterative Feedback Tuning
function K = pidift(K, yd, y, u, gamma, lambda, beta)
% K = pidift - Calculate new PID gains from existing gains of a discrete
% PID controller
%
% K = pidift(K, yd, y, u)
%
% Calculate the new PID gains that will move the current system
% response closer to the desired system response. K is a vector of
% the current PID gains, [Kp, Ki, Kd], where the controller structure
% is of the following form: