Archive for the ‘Technology’ Category

Getting Flymake to work with Emacs nXhtml

Saturday, March 13th, 2010

If you develop in PHP on Emacs, then you’ve probably got a hook setup to run flymake-mode on PHP files. And if so, then you’ve probably noticed that this doesn’t work with nXhtml, which will often return an error like “mumamo can’t find the file” (or some such), causing flymake-mode to disable itself.

The culprit is likely to be a bind like this:

(add-hook 'php-mode-hook (lambda () (flymake-mode t)))

which says, “turn on flymake-mode when php-mode is started. (Sacha Chua has a post that recommends using this from couple of years back.) The problem, as far as I can tell, is that nXhtml tries to process the fleetingly available _flymake file rather than the original PHP script whenever it toggles into php-mode.

A better hook to use is the find-file-hook, like this:

(add-hook 'find-file-hook 'flymake-mode)

With this, Flymake will properly validate PHP chunks in nXhtml mode, as well as any other files that Flymake is smart enough to process.

Internal error: pcfg_openfile() called with NULL filename

Friday, February 26th, 2010

Yeah, so even if you turn off basic authentication and specify a different auth method, Apache (at least some versions of it) still looks around for an auth file and throws a “pcfg_openfile() called with NULL” error when it can’t find one.  To fix, set the user auth file to /dev/null:

AuthBasicAurhorative off
AuthUserFile /dev/null

Or you can just ignore the errror I suppose. It looks more serious than it is.

Mantis 1.2.0 Released

Thursday, February 25th, 2010

Mantis is apparently on an Emacs-esque release schedule.  Two years of work gives us 1.2.0.  This release includes a new, and long-needed, plugin repository.

These days I spend most of my time in Trac, though I long for a switch back to Mantis.

ntop is not iftop

Wednesday, January 13th, 2010

On a couple of occasions now I have accidentally installed ntop, a web-based “top” clone for network monitoring, when really I want iftop, with it’s libcurses-based command-line goodness. The web thing is cool and all, and I’ve got nothing against it’s suite of dependencies, such as graphvis, however when I’m frantically installing a network visualizer — which generally means that bad shit is going down on some box over which I’ve formally had little control — then I really do need to know what’s happening *right this second*. Hence iftop.

I think iftop used to be called ntop on some distros, which is why I keep mixing them up.

Must remember: dispatch-conf

Tuesday, January 5th, 2010

Instead of etc-update.   So.  Much.  Easier.

Why can’t Gentoo come up with easy-to-remember command names.  Like “updateallthedamnconffiles -anddontaskanystupidquestions“.

I’m going to spend the morning aliasing.

Defeating the flymake configuration error in Emacs php-mode

Tuesday, December 22nd, 2009

Getting the following message when trying to use Flymake with PHP?:

“Flymake: Configuration error occurred while running. Flymake will be switch OFF”

This threw me, though it probably shouldn’t have. If you’re seeing it as well, double check two settings in your php.ini file:

1. The error_reporting setting needs to include E_PARSE. I personally like to use error_reporting = E_ALL | E_STRICT. This shows everything that the PHP compiler thinks you are doing wrong.

2. Also double check your php.ini file for display_errors = On. I almost always forget about this when setting up on a new box because I tend to override php.ini with .htaccess values.

Finally, triple check your command line php settings with a quick $ php -i, which dumps the content of phpinfo() to the command line.

Cygwin More

Monday, December 14th, 2009

Everytime I install Cygwin I find myself rooting around for the “more” command. It’s been removed in favor of “less”, however I prefer “more”. It’s more or less (ha! Linux humor!) a simpler pager.

Install the util-linux package for a random collection of older utilities, including “more” and “whereis”.

Rackspace Cloud: As much as 40% downtime depending on what cluster you end up in…

Saturday, November 28th, 2009

Believe it.  And good luck getting any details from the Magic Eight Ball known as Rackspace technical support.

Web-based Emacs

Thursday, November 26th, 2009

Ymacs: http://www.ymacs.org/

I just spent a few minutes playing around with it. Missing a ton of key bindings, and the all-important butterfly-mode, but it definitely feels like you’re in Emacs.

It’s kind of an eerie feeling.

QR Cow

Thursday, November 19th, 2009

How moooving.

qr coded cow 300x225 QR Cow

As seen on 2d code.