Archive for the ‘Technology’ Category

Cygwin SSH just doesn’t call $HOME lately…

Tuesday, May 11th, 2010

With the new version of Cygwin, SSH suddenly doesn’t seem to phone $HOME anymore.  Which is usually going to be set to something like c:\Users\<username>.  In general Cygwin is supposed to look at $HOME first and then use alternative home settings, such as /etc/passwd.

The quick fix is to make sure the relevant entry in /etc/passwd matches what you have in $HOME.

BrokeP on sinking in the Pirate Bay

Wednesday, May 5th, 2010

Normally I don’t read technical interviews, but the Register’s interview with BrokeP is fascinating. Kelly Fiveash asks great questions and doesn’t pull any punches.

Apparently TPB has “become this HAL entity that kinda runs itself”.

Maybe it can explain to the record labels about how they’re completely doomed.

Tweetz Sidebar Gadget

Tuesday, April 6th, 2010

I’ve been following WikiLeaks Twitterings with great interest and stumbled across Tweetz while looking for a better way to stay passively up-to-date. Most Windows sidebar gadgets are buggy or, in general, horribly designed, but Blue Onion’s Tweetz works and doesn’t get in the way. Check it out.

Get WordPress to stop asking for “Connection Information” when upgrading plugins

Saturday, April 3rd, 2010

Recent versions of WordPress have taken a queue from Janis Elsts’ One Click Plugin Updater and made it *much* easier to keep plugins up-to-date without having to fire up FTP. The problem is that WP seems to use permissions of it’s script files to determine whether or not plugins and themes can be uploaded to the server or not. Really WP should be looking at the target directory rather than the executing script; consequently I assume most folks just assign web server ownership to the entire WP source tree. Which, frankly, kind of freaks me out security-wise.

If you’d also rather avoid recursively chown’ing the WordPress tree to your web server, then simply give web server ownership to three files in the wp-admin directory: plugin-install.php, plugins.php, and update.php. Of course the web server will also need to own the plugins directory (and everything therein), as well as the wp-content directory itself. The “upgrade automatically” links should now work without kicking you to the “Connection Information” screen.

Why is MySQL so slow?

Tuesday, March 16th, 2010

Ever try truncating large datasets on a Windows development box? Ugh.

This kind of explains where MySQL is stuck:

mysql> show processlist

Kind of.

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 also 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.