“To record for posterity, those things I once knew, but might otherwise forget.”

Not From The Front Room

Much has changed since I last updated this blog. My friend babbage is now a Mac Mini, and I use the stock Apple web servers for babbage.cs.qc.cuny.edu and senate.qc.cuny.edu. The big change is that I install everything except Apache using homebrew. All those notes to myself are pretty much irrelevant now. I do still have to tweak the Apache config file when Apple updates OS X-soon-to-be-MacOS. But it's not enough tweaking to warrant a blog post.

Not From The Front Room

Much has changed since I last updated this blog. My friend babbage is now a Mac Mini, and I use the stock Apple web servers for babbage.cs.qc.cuny.edu and senate.qc.cuny.edu. The big change is that I install everything except Apache using homebrew. All those notes to myself are pretty much irrelevant now. I do still have to tweak the Apache config file when Apple updates OS X-soon-to-be-MacOS. But it's not enough tweaking to warrant a blog post.

SizeUp

SizeUp requires X11, which is not included in Mountain Lion by default, but can be installed.

Mountain Lion

Upgrading Lion to Mountain Lion on iMac. PHP, Apache, and PostgreSQL need to be dealt with.

New IEEE-754 Analyzers

The new IEEE-754 Analyzers have now gone live at http://babbage.cs.qc.cuny.edu/IEEE-754.

Lots of new features: Input decimal, binary, or hex, and it figures out what to do with it; decimal values can be entered as rationals, making it possible to explore repeating fractions; support for all three IEEE-754 2008 binary formats (single, double, and quad precision); put multiple analyzers on the page so you can compare different values; uses GNU Multiprecision Library (GMP) for long calculations, allowing precise representation of edge values.

Lion Web Server

I spent a lot of time getting OS X Lion Server to work with my web sites last summer. Most of the problems had to do with security certificates for one of the sites, but I also had to figure out how to get Server.app to stop overwriting my configuration files each time I restarted Apache.

What follows are the notes I made towards the end of the process.

Sending email from PHP scripts

The PHP builtin function, mail() can be used to send email using either SMPT or using the operating system’s sendmail program. These features can be configured in the php.ini file, but I found I was having problems authenticating to my smtp relay server, and I wanted to minimize the number of SpamAssassin test failures so my messages would go to the recipients’ inboxes instead of their spam folders.

This post is about the gotchas I dealt with, not a tutorial on sending email in general.

OS X Lion Server: readline and rlwrap

Well, it's time to make some notes to myself again.

There are many wonderful tales to tell about upgrading babbage from Leopard server to Lion server this summer, but today's topic is just about getting sqlplus working. The sqlplus command works best, as does psql, php, and others, when run under rlwrap. It turned out that getting rlwrap to build under Lion was problematic enough to warrant a reminder here.

vim regex revealed

I wanted to use Vim to change graduation dates into a standard format. The form requires them to enter the date as mm/yy, but to enter it in the database, I need in in the form yyyy-mm. Sometimes they leave the leading 0 out of the month. For the database, the graduation month has to be 06, 09, or 02. But they often use 05 instead of 06 (because that’s when they want to be finished?). Here’s the Vim command to do it:

:%s/0\=\([4-6]\)\/\(\d\d\)/\="20".submatch(2)."-06"/

Plastic Bag

Two photos of a plastic bag I picked up at the photo show yesterday:
plastic bag from Nikon
bottom of bag says made from 100% recycled film

Syndicate content