Skip to content

Instantly share code, notes, and snippets.

View schmonz's full-sized avatar

Amitai Schleier schmonz

View GitHub Profile

Keybase proof

I hereby claim:

  • I am schmonz on github.
  • I am schmonz (https://keybase.io/schmonz) on keybase.
  • I have a public key whose fingerprint is 684B FA24 EE34 0AFD 18A6 B585 3BF0 7B5F 1E86 F91F

To claim this, I am signing this object:

@schmonz
schmonz / Apache with Kerberos
Created January 8, 2015 15:47
Ikiwiki + httpauth + Apache + Kerberos
<VirtualHost *:80>
ServerName wiki.example.com
DocumentRoot /home/wiki/html
UserDir /home/wiki/html/users
<Location />
Require all granted
</Location>
ErrorLog "|/usr/pkg/sbin/rotatelogs /u0/log/httpd/wiki-error 86400"
@schmonz
schmonz / motd2rss.sh
Created April 2, 2015 16:06
motd2rss
#!/bin/sh
#
# $ motd2rss < /etc/motd > motd.xml
#
# adapted a great deal from NetBSD's pkg-changes2rss
print_header()
{
cat <<EOF
<?xml version="1.0"?>
@schmonz
schmonz / schmonz-software-rebuild.md
Last active December 18, 2016 15:53
Build packages for NetBSD VPS on local NetBSD VM
@schmonz
schmonz / tap.md
Last active December 18, 2016 16:02
Running Unity tests? Run them with `prove tap.pl` for red/green.
@schmonz
schmonz / pound.md
Last active December 19, 2016 21:31
@schmonz
schmonz / proxied_apache_and_lighttpd.md
Last active December 19, 2016 21:37
Apache: one proxied site running as regular user, one reverse proxy
@schmonz
schmonz / apache_schmonz.com_redirects.md
Last active December 19, 2016 21:59
Apache configuration from migrating schmonz.com from Textpattern to ikiwiki
@schmonz
schmonz / summary.md
Created August 21, 2017 21:53
inconsistent installed path for C# .dll across platforms

What I tried

In pkgsrc (a cross-platform Unix package system), I've created a package of Xapian (a search engine) and a package of its C# bindings.

Each package has a packing list (PLIST) that specifies exactly which files are part of it. If a given source build would generate a binary package that doesn't contain both everything in the PLIST

#include "exit.h"
#include "readwrite.h"
#include "substdio.h"
char sserrbuf[128];
substdio sserr = SUBSTDIO_FDBUF(write,2,sserrbuf,sizeof sserrbuf);
void err(char *s) {
substdio_puts(&sserr,s);
substdio_puts(&sserr,"\n");