Blog-a-go-go.

Wednesday, July 28, 2004

Need to make your own fortune database?

Put your quotes in a text file, one per line, with % in between them:
A man wrapped up in himself makes a very small bundle.

%
A penny saved is a penny earned.
%
Watch me pull a rabbit outta my hat!

Then use the strfile command to turn it into a fortune.dat file:
strfile -r myquotes myquotes.dat

Easy and fun!~

Monday, July 26, 2004

A Note for the PHP Manual's MSSQL page
(because it won't accept my submission at the moment)

When you edit freetds.conf, you are defining named interfaces that you can use 

*in place of* ip addresses in your scripts. This is essential if you are
communicating with MS SQL Server 2000 or better, because you need to up the tds
version of the connection to 8.0.

In /etc/freetds.conf:

[MYTDS]
host = 10.0.17.71
port = 1433
tds version = 8.0

In PHP scripts:

$db = mssql_connect ("MYTDS", "sa", "admin");

I was getting all kinds of Unicode-related errors until I finally grokked that
you could use the name in place of the ip address in order to use a defined
connection with a higher version specified.

That is all.

Saturday, July 24, 2004

Nagios Nightmares

Great program, inhuman configuration.

You know, Nagios isn't all that difficult to grok (though I still don't know how to enable checks of, say, disk free space via ssh) but it is unnecessarily complex to configure because you have to manually maintain a suite of config files.

I mean, suppose I want to change the name of host novel1 to example.org...

[root@example.org /]# grep novell1 /usr/local/nagios/etc/*
/usr/local/nagios/etc/hostgroups.cfg: members novell1
/usr/local/nagios/etc/hostgroups.cfg~: members novell1,novell2
/usr/local/nagios/etc/hostgroups.cfg-sample: members novell1,novell2
/usr/local/nagios/etc/hosts.cfg:# 'novell1' host definition
/usr/local/nagios/etc/hosts.cfg: host_name novell1
/usr/local/nagios/etc/hosts.cfg~:# 'novell1' host definition
/usr/local/nagios/etc/hosts.cfg~: host_name novell1
/usr/local/nagios/etc/hosts.cfg-sample:# 'novell1' host definition
/usr/local/nagios/etc/hosts.cfg-sample: host_name novell1
/usr/local/nagios/etc/services.cfg: host_name novell1
/usr/local/nagios/etc/services.cfg: host_name novell1
/usr/local/nagios/etc/services.cfg: host_name novell1
/usr/local/nagios/etc/services.cfg~: host_name novell1
/usr/local/nagios/etc/services.cfg~: host_name novell1
/usr/local/nagios/etc/services.cfg~: host_name novell1
/usr/local/nagios/etc/services.cfg~: host_name novell1
/usr/local/nagios/etc/services.cfg-sample: host_name novell1
/usr/local/nagios/etc/services.cfg-sample: host_name novell1
/usr/local/nagios/etc/services.cfg-sample: host_name novell1
/usr/local/nagios/etc/services.cfg-sample: host_name novell1

OMFG! What a nightmare!

Perl-centric folk might wonder what the big deal is, but my org has 20 or so systems and many services we'd like to monitor -- and no one wants to learn Perl to do it. There must be a more elegant way to store this information that involves fewer files and less repetition of keys. The reason no one wants to read the documentation is becauuse this stuff *isn't actually rocket science*.

( Don't blame me for your inscrutable configs, thanks. )

If nagios could do host and service discovery via multicast dns, that would be a beautiful, birds-singing thing. That's looking like a project for this fall.
Friday Night in the Big Rainy City

I'm sick of Red Hat, which is all around me, forcing me to compile and configure software ( that I don't really care about ) from scratch ( ironically ) because I refuse to use rpm ( prefab binaries ). Different wizards need different wands, and sometimes the mismatch is palpable.

The whole point of the original Unix was portability. To me, this includes freedom from depending on specific builds of other packages.

So I downloaded a Gentoo Rescue Image, which includes a bootstrap portage tree, and installed it on top of my Red Hat 9 workstation. I should just do a clean upgrade, I have most of my data in the /home partition. But it ain't broke -- I just need some packages and I don't want to go hunting around for the rpms. emerge sync updates the tree and downloads all the profiles. You link the right profile to /etc/make.profile, emerge portage and you're good to go.

Brilliant. I had a problem with autoconf that halted emerge portage in its tracks.
configure.in:5: your implementation of AM_INIT_AUTOMAKE comes from an

configure.in:5: old Automake version. You should recreate aclocal.m4
configure.in:5: with aclocal and run automake again.
make: *** [Makefile.in] Error 1

!!! ERROR: sys-devel/libtool-1.4.3-r4 failed.
!!! Function src_compile, Line 154, Exitcode 2
!!! (no error message)

Now, I know how to fix that, but I don't know how to fix it in portage, which highlights why building by hand from source is such a Good Thing.

Bottom line: pending.


The other Friday night activity -- just as maddening but perhaps more successful -- was installing the nagios monitoring system on the same Linux box. From scratch, since I had no portage yet. But then, you get the feeling that nagios is *meant* to be installed by hand. If you love config files with reams of comments, this is the package for you. Personally, I just want this stuff to work, which made it a little painful to open and resave the 562 different .cfg files found in /usr/local/nagios/etc

I understand the reason why (at least in a pre-rendezvous/zeroconf world), and I appreciate the control which that will give me. But with **so much** sample config to wade through, something seems a little wrong. Every page of the manual pleads with you to read the manual, but all of the documentation is inside the config files. Really dumb.

Creating a php autoconfig package for nagios seems like a fine idea.

But I got it up and looking at a couple hosts on my local network. Neat. It still hasn't sent me any email, but I suppose I'm glad of that since none of the sample hosts has been online yet!

Wednesday, July 21, 2004

Comin' down to the wire

You know the wire. It's what you're left with when all the other options fall away, and there is just a single path that leads to the airport, and thence to Paris or Antigua or Johannesburg or Bangkok.

The wire is the Very Small List of stuff that you promise to do from an internet cafe in Rome, even though you know that you'll be lucky if you can keep up with the volume of email from cron, let alone the list subscriptions and daily administrivia.

I'm tired. I haven't worked this hard in ages. But it feels good, and somehow or another it will all work out.

Word.

Saturday, July 17, 2004

Did you know that you can hide messages in webdings?

Do you know about ABCDERFHIJKMPQRST?





ABCDERFHIJKMPQRST
ABCDERFHIJKMPQRST


I have no idea why that table is so nasty looking.
In which it occurred to me that this new html editor in blogger is pretty freekin handy. It could be more semantic, though -- it uses <span style="font-weight: bold;"> instead of the simpler <em>.
And in which it also occured to me pigeon feathers might sticky as a defense mechanism. Imagine you're a cat, sneaking up an a pigeon. Two good flaps of its wings and your face is full of feathers, really sticky ones.

In fact, it's very format centric, which makes it ungood for long compositions. So many <span>s!

Wednesday, July 14, 2004

Unravelling the mysterious rocket science behind Flash Communication Server MX.

As usual, it's not as magical as the $7500 price tag would have you believe. However, there is some serious obfuscation going on as to the actual capabilities of, for example, the Microphone object -- what happens if you ship that off via LoadVars.send?

Here's the gateway to Flash remoting with PHP: http://www.amfphp.org/?g=home

Tuesday, July 13, 2004

If business users were less shortsighted, [Alan] Kay says, they would seek to create computer models of their companies and constantly simulate potential changes ... today's PC is too dedicated to replicating earlier tools, like ink and paper.

"The chances that in the last week or year or month you've used the computer to simulate some interesting idea is zero — but that's what it's for."

A PC Pioneer Decries the State of Computing, Fortune.
PHP 5, in particular, has http_build_query(), which simplifies the
task of constructing and urlencoding the query string.
-- Adam Trachtenberg

http_build_query()

Monday, July 12, 2004

Now could someone please give me a tiny camera with a weblog client in it? A treo? A sony? I don't really care. If it has decent memory it can cache everything and upload it at the next wifi connection, so as not to eat up cellwidth or transmit insecurely.

AvantGo has a neat trick for that: you know how the web is stateless? That means you can queue POST requests for later transmission. For that matter you can queue any http request, if you're dealing with resources that you have an exclusive lock on, or creating brand new ones.

That feature has to be part of the client, but that's not hard.

The request queueing webservice must already exist?

Send an encapsulated http request (including headers), and a time, get back an event id. Then you can run checks against the event id to discover the response.

Sunday, July 11, 2004

So then there's imagine04.org. The Imagine Festival of Arts, Issues, and Ideas if you want to be precise about it. Aug 28 - Sep 2, in and around New York City. A distributed response to the madness.

Wednesday, July 07, 2004

Why do I like this blog so much?

I feel free here.

By yesterday I'll need to have a secure, language neutral, fully templated and administratable php objectbase that speaks http and rfc822. Efficient enough for message threading. With queues.

Intelligent request, auth, db, language, object, action and template classes form the framework. A number of secondary classes fill out the suite: cache, queue, rfc822, subscription, filter, subrequest.

Actions can make subrequests to get external data from webservices. Subrequests can trigger a wait loop in the main requst. Objects will also make http subrequests if necessary to discover content.

Action scripts can call filters, chains of php scripts that act on a common stdin, stdout, and stderror.

Templates are objects that execute php scripts in output buffers, each with a local scope. The template itself and helper methods are available to template writers using $this.

You can learn alot by tacking ?debug=1 on the end of the request url.

Well, it should be pointed out that I have all of this stuff scattered around in 4 different projects, and I desperately want to bring them together under a sinle open license. We'll see if I can swing that.

The open library has request, db, flat objects, actions, and templates. No auth. No language.

The not-yet-open library has 3d objects (almost), auth, and language. And a capable imageserver.

Paxi has subrequests.

Clew has subscriptions, and, sans filters, mail handling. Clew mails itself a copy of every new object.

Cache, queue and filter are mia. But it's all good.
Multi-headed Madness

The DIY Version and the Hewlett Packard Version of the same multi-user PC.

I tried this at home when I was working on the Chateau project (many dual-head video cards just sitting around!) and it worked then. XWindows was meant for this kind of thing!
Gah! I'm soo stoopid. I need to start scheduling presentations of this tech!

rdiff-backup - creates a versioned file repository / mirror with all file metadata intact

freebsd unix
- runs webservers like nobody's business

xhtml + css + rdf - professional hypertext resources

php - the people helping people language

cp - content portable (internal still :-( )

clew - conversationally linked email and other writings

awstats...

Tuesday, July 06, 2004

Want to port Gentoo's portage to Red Hat?

I do. Apparently the rescue images of which they speak may be found here.
Okay, here's an idea. You keep a blog on some topic, call it widgets, and your blogging service has email notification of new comments.

In your clew, you have a resource node for the widgets blog at /csnyder/widgets/log.

Now, tell your blogging service to send all new comments to comments+log+widgets+csnyder@clew.example.org -- they won't be threaded, but they will be in the system. Oh, and you could probably abbreviate that email address to node5682@clew.example.org.

Cheers!
The MySQL Set Datatype explained:







You know all those bitwise flags you want to set? readable is 1,
writable is 2, appendable is 4, shareable is 8, ..., property is n*2 ???





You might want a set field in your next table.

Sunday, July 04, 2004

Your standard naming conventions for Website Divs:

Some example standard div names


• Container div: container
• Header or banner div: header
• Main or global navigation div: main-nav
• Left or right side columns: sidebar-a, sidebar-b
• Content div: content
• Footer div: footer

A fuller, more thoughtful list, by Malarkey.

This meme is making the rounds now, expect to see a lot of lightweight "CSS skin" stylesheets that expect this kind of namespace.

Friday, July 02, 2004

Perhaps working your way through this would clear up a few things...
Testing post collapsing?
Windows Services For Unix

Love the name of it, subtle. Here ya go, ssh and nfs and make. A single root filesystem. And unicode support. Now sfu.
The problem with xhtml vs HTML, is that it encouraged hyper-anal markup. Scary-looking all caps tag displays, that hid your content behind a specialized graphical gui.

But when you make it simpler to write ( like automatically converting double line breaks to <p>s and single to <br>s, to take out even more of the drudgery --- when you give people fewer choices about how things look, it frees them up to just write. That's why people love Word, it looks good to them.

But Word was designed in the 80s.
We have to design for 2030 to beat Word.

CSS is the way and the light of web design. Even if we have to give everyone a free copy of Mozilla on CD.

Which I hereby suggest.