Skip to content

Instantly share code, notes, and snippets.

View camprr's full-sized avatar

Robert Campbell camprr

View GitHub Profile
I pass these options to the varnishncsa daemon (this line is from my /etc/init.d/varnishncsa)...
DAEMON_OPTS="-a -F "\''%h "%{X-Forwarded-For}i" %u %t "%r" %s %b "%{Referer}i" "%{User-agent}i" %{Varnish:time_firstbyte}x %{Varnish:handling}x'\'" -c -w ${LOGFILE} -D -P $PIDFILE"
I parse that with the following grok pattern...
VARNISHNCSALOG %{IPORHOST:remoteip} %{QUOTEDSTRING:xforwardedfor} %{USER:auth} \[%{HTTPDATE:timestamp}\] "%{WORD:verb} %{NOTSPACE:request} HTTP/%{NUMBER:httpversion}" (?:%{NUMBER:status}|\(null\)) (?:%{NUMBER:bytes}|-) "(?:%{NOTSPACE:referrer}|-)" %{QUOTEDSTRING:agent} %{BASE10NUM:berespms} %{WORD:cache}
[
[
{
"y": 1
},
"Esc",
"!\n1",
"@\n2",
"#\n3",
"$\n4",
@camprr
camprr / voron_24_printed_parts.md
Last active March 19, 2023 17:59 — forked from cmidgley/voron_24_printed_parts.md
Printed parts list for the Voron 2.4 organized by assembly order

Voron 2.4 Printed Parts List

List of parts to print for Voron 2.4 organized by the Assembly Manuals order of assembly, allowing for just-in-time printing of parts while building the printer. Configuration is standard Voron 2.4 (Afterburner Direct Feed, DIN rail mounts) with choices for E3D, Dragon or Mosquito hot ends on a 250mm, 300mm or 350mm frame. No parts for the drag chain are included, as often these are purchased parts rather than printed.

Names of the sections (such as Gantry/X_Axis/XY Joints) match the name of the STL directory that contains the prints. Note that Voron Design uses filenames starting with [a]_ at the start of a filename to indicate parts that can be printed in an accent color.

_Credit to krobertson for maki

@camprr
camprr / gist:82e8124817907938c990c9dc360bf588
Created August 18, 2023 08:34
APC isc-dhcpd option 43
root@<server>:~# cat /etc/dhcp/dhcpd.conf
# dhcpd.conf
#
# Sample configuration file for ISC dhcpd
#
INTERFACES="enp4s0";
# option definitions common to all supported networks...
option domain-name "example.org";
option domain-name-servers ns1.example.org, ns2.example.org;