Griffin EarJams Revisited
I was quite quick to complain about about my ear jams. I’m tempering my original judgement a little… after giving them a bit more of a go, I’m finding listening to some types of music decent enough. (E.g. The White Stripes, who seem to be heavy on the mid-range in production anyway, or Beck, where the prominent bottom end really helps.)
Just don’t try for anything like a Bach violin concerto. I’m still saving for a really good pair of in-ear buds.
Got some Griffin EarJams
I really should learn to read reviews before I rush out and buy something…
So, I grabbed a set of Griffin EarJams for my iPod yesterday. I was finding the standard iPod ear buds difficult to keep in my ears if I moved my head at all. And the EarJams promised “massive bass” and “improved sound”, along with the “enhanced comfort” of in-ear buds.
Well, they were certainly right about the massive bass, but they neglected to mention the massively attenuated top end. The “jams” are indeed quite comfortable in my ears, but the sound is muddied and flat.
It’s quite disappointing, because I wasn’t unhappy with the sound quality of the ear buds that came with my iPod, I just wanted them to stay in my ears while I walked. But even after playing with the “eq” settings on the iPod to pull the bass back a bit, I just couldn’t listen to music through the things. I suppose they will be ok for podcasts (such as the excellent ABC Radio National ones).
I guess I’ll have to save up for some “real” in-ear headphones.
Adium.NetNewsWire script
This is an Adium plug-in script that will insert a link to the url of the headline you are currently viewing in NetNewsWire. This works in a similar way to the standard “Safari” button that inserts a link to the web page you are currently viewing in Safari, but for your RSS aggregator.
It can insert an HTML link, which works in most chat clients, or a
plain-text URL if your chat partner’s client won’t/can’t render HTML.
To use, either select the scripts from the menus (Edit/Insert
Script/…), or type /nnw
or /nnwurl
in a chat/message window.
Download the bundle below. The source code is available at my svn repository. See also this blog entry.
Adium script to insert NetNewsWire URL
I quite often find myself reading feeds in NetNewsWire and find something I want to share with a “buddy” in an Adium chat. Adium has a neat little “safari” button that inserts a link to the web page you are currently viewing in Safari, but nothing equivalent for NetNewsWire. And to do it manually is a pain, involving multiple mouse movements and clicks (including right clicks, which are cumbersome with the powerbook) and key presses to cut and paste.
AppleScript to the rescue!
The following bit of AppleScript (my first actual functional applescript!) gets the necessary values from NetNewsWire:
using terms from application "NetNewsWire"
tell application "NetNewsWire"
set linkHTML to "<HTML><A HREF=\"" & (URL of selectedHeadline) \
& "\">" & (title of selectedHeadline) & "</A></HTML>"
return linkHTML
end tell
end using terms from
This code needs to be wrapped in the appropriate Adium hook:
on substitute()
....
end substitute
Finally, the whole thing needs to be packaged up in a bundle that can be installed in Adium. The source code is available at my svn repository, and the installable bundle can be downloaded from NetNewsWire.AdiumScripts.zip.
Problem adding a user in Mac OS X
Weird… I tried to create an account for a friend on my Powerbook today (Mac OS X Tiger 104.1), and it kept failing. Well, it appeared to work ok (no errors in the GUI), but the account would not be created. I tried a couple of times (thinking I must have hit the wrong button or something), but same result. In the system.log, the following lines appeared:
2005-06-05 09:06:07.121 System Preferences[16863] ### Error:-14120 File:DSRecord.m Line:349
2005-06-05 09:06:07.124 System Preferences[16863] ### Error:-14120 File:DSRecord.m Line:349
A quick google search turned up nothing. So I rebooted and tried again, and it worked. Weird.
Google site search
Finally, I have Google site search working. (See the search box on the left.) I’m not sure what the problem was, but the last few times I tried, google claimed not to have any indexed pages for mojain.com. Which was demonstrably wrong, since I came up in searches. But anyway, it works now. If only I had some interesting content… ;)
Powerbook back in business
So, Friday afternoon I picked up my powerbook, resplendant with its new hard disk. Thanks to Desktop Power for the quick turn around. They had installed panther, so of course the first thing I did was to do a clean install of Tiger.
I briefly considered partitioning the disk to allow me install linux, but I figured… what’s the point? I’m very happy using OS X, and if I need to run linux for some reason, the Ubuntu live cd works a treat.
So a few hours of installing and configuring and restoring later, I was back up and running.
While I had what I thought was a complete backup of my home directory, it turned out there were a few gaps… I had made the backup by dragging /Users/mrowe to an external firewire in Finder. Unfortunately, Finder ignores little things like dot files (.bash_profile, .emacs, .muttrc). :-/
Fortunately, I have the equivalents of all of those files on my linux desktop, so it didn’t take too much work to fine-tune them for my powerbook. But the first thing I did afterwards was whack them all in subversion. :)
Subversion and IPCop
In the default configuration, IPCop’s transparent proxy does not allow subversion to work (when using WebDAV–ssh would be fine of course).
Although the squid proxy supports WebDAV, subversion uses some non-standard methods that squid blocks.
For example, trying to check out a module fails:
svn: REPORT request failed on '/svn/mojain/!svn/vcc/default'
svn: REPORT of '/svn/mojain/!svn/vcc/default': 400 Bad Request (http://...)
Adding the following lines to squid.conf (which on IPCop 1.4.6 is located at /etc/squid/squid.conf) allows svn to work:
extension_methods request REPORT
extension_methods request MKACTIVITY
extension_methods request CHECKOUT
extension_methods request MERGE
You need to restart squid for this to take effect:
/usr/local/bin/restartsquid
Dead powerbook :(
My powerbook died. Well, more precisely, my powerbook’s hard disk died. But it amounts to the same thing.
I’d been noticing an accelerating degradation of performance over the past week or two, starting with little oddities like pauses on disk access, or suspend taking much longer than normal (1-2 minutes as opposed to a couple of seconds), and disturbing noises from deep in the bowels of the powerbook. Then yesterday afternoon, things started going pear-shaped very rapidly.
Simple stuff like moving to the next article in NetNewsWire resulted in the Beachball Of Death, and nothing happening for several minutes. Closing tabs in Safari took similarly forever. Basically, I couldn’t even shut down, and had to resort to ^-Cmd-Power. On restart, the login window came up, but when I tried to log in (which took, again, forever), Finder never really started (no desktop icons).
When I got home, I booted off the Tiger DVD, and managed to save a bit of data to my external firewire disk. The installer gives you a “Tools” menu that includes Disk Utility. So, I launched Disk Utility and used it’s “Create image from folder” functionality to create a DMG on my external drive of my ~/Library folder. It took, once again, forever (at least hours–I went to bed), for a total size of about 500MB. I also tried to do the same thing for my iTunes library, but that was looking unlikely to finish before the heat-death of the universe.
This morning I dropped in at my local Apple Centre (Desktop Power in Ivanhoe, for those to whom it might be relevant). They listened to my description of the symptoms, listened to the noises from the hard disk and quickly agreed with my diagnosis. :( By the time they got it out the back and booted of an external drive, the system wasn’t recognising the disk at all. *sigh*
Anyway, the good news from the whole thing is (a) it’s still under warranty, (b) I made a complete backup before installing Tiger a few weeks ago, and (c) I was planning on doing a fresh install some time anyway. Silver lining and all that…
Displaying a node in a block
I had a requirement to display a custom block on a drupal site, but to allow site editors to update the contents of the block. I don’t particularly want to give editors the ability to create/edit blocks, but they are already able to edit nodes.
A bit of PHP in a custom block does the (somewhat hackish) trick:
<?php
$node = node_load(array('nid'=>1));
echo node_view($node, false, false, false);
?>
Obviously, the node id is hard coded. No, this is not elegant or ideal, but it quickly solves a problem.
Also worth noting is the following snippets of template.php and node.tpl.php in my phptempalte theme, which allow me to contol the display of the “info” (attribution) for node types–if you use a page node as the target of the above block, you can turn off the display of the info line while not affecting story nodes.
template.php:
<?
function _phptemplate_variables($hook, $vars) {
switch ($hook) {
case 'node':
$vars['info'] = theme_get_setting('toggle_node_info_' . $vars['node']->type);
break;
}
return $vars;
}
?>
node.tpl.php:
<?php if ($info): ?>
<div class="info"><?php print $submitted ?>
<?php if ($terms): ?>[<?php print $terms ?>]<?php endif; ?>
</div>
<?php endif; ?>