July 26, 2006
Bought the Black MacBook...
I'm back in Seattle on business, but then in Montana for my 20th high school reunion. Yes, I'm that damn old.... Damn (shakes head in amazement).
Anyway, I bought a new MacBook and kitted it out with 2 gigs of RAM. I have lots of observations that I'll find time to share in the next few days, but I had to at least drop a short note. Until now, I've been using a 15" PowerBook that I religiously keep up to date. To configure the new MacBook, I simply connected the 2 notebooks with a FireWire cable and started the old one in FW drive mode. The new MacBook copied everything over, with the exception of two applications I don't use and probably misinstalled anyway.
My first reactions to both the odd new Chiclet-like keyboard and pimp-style glossy screen are positive. Yeah, I'm surprised but I like both. The keyboard's responsive and touch typing is a breeze. I've yet to have problems with glare.
What do I miss most? My backlit keyboard :( Really.... Oh, and with only 512 megs stock, this thing crawls! I installed 2 gigs myself and it took off like a rocket. ah, much better. And I think the whole controversy about the Intel GMA 950 integrated graphics is much ado about nothing. I bought the notebook for size, speed and general Unixy goodness. I don't play games on it.
For the record, here's a problem I encountered a problem when I installed Fink Here's the solution.
Posted by cbrown at
5:38 PM
July 14, 2006
Goofing with TCPSocket & Kernel.select in Ruby on Mac
I wanted to quickly check something with the following code:
port_start = 8000
port_count = 100
port_end = port_start + port_count
listeners = []
connected = []
port_start.upto(port_end) do |port|
listeners << TCPServer.new('localhost', port)
end
loop do
select_set = Kernel.select(listeners+connected,nil,nil,2.5)
puts "returned from select: #{select_set}"
end
I fired up the script, then fired up trusty netcat:
echo "Bob" | nc localhost 8000
Hmm, nothing happened..... I check netstat -na
Active Internet connections (including servers)
Proto Recv-Q Send-Q Local Address Foreign Address (state)
tcp6 0 0 ::1.8100 *.* LISTEN
tcp6 0 0 ::1.8099 *.* LISTEN
tcp6 0 0 ::1.8098 *.* LISTEN
.....
I didn't realize that 'localhost' in my Ruby code would cause IPv6 bindings, yet nc using 'localhost' would attempt an IPv4 connection. Interesting. The problem is quickly fixed by using '127.0.0.1' directly in the Ruby code.
Posted by cbrown at
9:31 AM
July 12, 2006
Building a custom Xen rpm for Fedora Core
I build a custom Xen 3.0.2 rpm for installation on Fedora Core 4 (and 5). Problem is, Xen provides backend agent scripts for both hotplug and udev. Hotplug and udev are both up, running & configured on Fedora Core. Installing for both is a recipe for disaster.
When both run, the Xen vbd and vif scripts run twice and collide with each other, both on the way up and way down. Ouch.
Both hotplug and udev work - just don't use both!
Posted by cbrown at
11:10 PM
Desktop Manager for the Mac
I can't get by without this thing! It's quite configurable and everyone is impressed by the cube rotation transition effect.
The latest version includes my pet feature: the ability to move existing windows from one desktop to another. I frequently launch, do some work and then realize I need to separate and reorganize, moving one app off to the side, i.e. to another desktop.
My only gripe so far is there is no System Preferences pane. Here's what happened to me: Somehow the menu bar item for Desktop Manager disappeared. Normally I set all my preferences using that item's dropdown menu. Without it, I could no longer change anything. I fixed the problem by finding and deleting the preferences file below:
rm /Users/cbrown/Library/Preferences/net.sf.wsmanager.desktopmanager.plist
After restarting Desktop Manager, the menu bar item was back (and all my other prefs lost of course) and I was back in business.
Posted by cbrown at
4:19 PM
July 11, 2006
What I've learned about making backups...
This is a cautionary tale, like so many you've heard before. In a land not far from here, with people just like me and you, data is being lost.... lots of data.
I was an accidental participant in the great data loss of 2006. It wasn't my data, but I helped lose it.
Please take it from me, back up your data early and often. For my part, I use Retrospect for the Macs in my house. My solution for Linux.... Amazon S3
Posted by cbrown at
11:49 PM
Little things about the OpenSSL command line...
I use OpenSSL often enough to appreciate it and care about the details, but not often enough to memorize the intricacies of the command line tools. Here's something I need often enough to remember it:
|
openssl ca -batch -notext -passin file:/openssl-pass.txt -config ./openssl.cnf -infiles ~/Desktop/XXXX-csr.pem 1> XXXX-cert.pem 2> XXXX-cert.err |
- batch to suppress prompts about saving cert
- passin to avoid password prompt for CA private key
- pass:XXXXXX to put password right on the commandline
- file:XXXXXX to get password from a file
Posted by cbrown at
4:05 PM
July 9, 2006
Amazon S3 and "your private info-vault"
Disclaimer: I work for Amazon.com
Can't you think of *dozens* of uses for
storage that's cheap and available anywhere, anytime? I'm currently using .Mac, but S3 provides cheaper, larger storage with more obvious guarantees. S3 doesn't yet have webdav support, but wouldn't that cinch the deal? I'm also thinking that smooth support for an svn repository (public and/or private) on S3, with the trimmings would be a SourceForge killer. Any takers?
Posted by cbrown at
11:15 AM
Xen 3.0.2 on Ubuntu 6.06 (Dapper)
I've been doing *lots* of Xen stuff on Fedora and now more on Ubuntu. I've been impressed by Ubuntu's easy installation, recognition of hardware (my finicky Averatec laptop especially) and solid Debian background. However, getting Xen 3.0.2 working isn't obvious. I did "make world" and "make install", then found that
xend wouldn't start after reboot. Apparently /var/run and /var/lock are on
tmpfs and not mounted when Xen starts? No juggling so far of the start order has helped, but doing
/etc/init.d/xend restart
once the system has booted, and including
mkdir -p /var/run/xenstored
mkdir -p /var/lock/subsys
to the init-script (right before "xend start") fixes the problem. This was
bug 670 against Xen and apparently already fixed in the unstable tree.
Posted by cbrown at
11:05 AM
Headed Stateside again
I'll be in Seattle from Jul 22 to Jul 27, then headed to Montana for
my 20th high school reunion. I'll be back in Seattle from Aug 1 to Aug 5. Looking forward to seeing everyone, both in Billings and in Seattle. Drop me a line to coordinate.
Posted by cbrown at
10:13 AM
July 8, 2006
Growl for the Mac
This is the coolest new Mac tool I've run into recently.
Growl enables applications to send UI notifications in a standard fashion. With very little effort, even your AppleScript and shell scripts can raise colourful, Mac-style alerts on the desktop. I bet you are running about a half-dozen Growl-capable applications and don't even know it.
Posted by cbrown at
7:49 PM
Lambda the Ultimate and getting started...
I'm very interested in programming language design from an "armchair quarterback" standpoint. From time to time I read
Lambda the Ultimate but I just found the
getting started link which I'll be recommending to friends from now on. It's got the list of necessary books, background and recommendations for understanding modern languages and type systems. Me, I'd recommend working through
the Venerable SICP as any budding computer scientist's first step to understanding computation and programming as art.
Posted by cbrown at
11:45 AM
Oh great, another idea I'll never implement...
I'm busy installing all these FireFox plugins on all the computers around the house. I'd really like to define the necessary list and have FireFox do it for me. I know *nothing* about FireFox plugins and the extensibility model. How easy would it be to write a plugin that installs plugins?
Posted by cbrown at
11:40 AM
Interaction between FireFox AdBlocker and MovableType?
I just installed a host of plugins to better protect me in FireFox (see earlier post). But, I visited my blog and found my banner missing? Somehow, AdBlocker feels the need to block the banner because the id of the <div> tag is "banner".
It does this even after I've exempted my whole site from its filters. Either I've messed up the filter, I've misunderstood the order in which they apply the filters, or they have a bug. Does anyone know?
Posted by cbrown at
11:22 AM
Avoiding the dread Telkom proxy caching
Can't remember where I picked up this tidbit, but it's very helpful when debugging remote web content (where you keep reloading the page and expect the content to be updated). I'm in South Africa, where Telkom likes to cache content and put as little traffic on the international link as possible.
To avoid the cache, simply put a '?' at the end of your URL, signaling the page takes parameters and has dynamic content. Every invocation goes all the way to your server and no content is cached!
e.g.
http://atbash.net/blog/?
Posted by cbrown at
11:19 AM
How do you save & share your bookmarks?
I'm still trying to figure out the best way to centralize my bookmark store for use between my home G5, my laptops, my work computer, and of course to share with my friends. For sharing, I'm using
Ma.gnolia which is great, easy to use, etc. but I'm a bit loathe to just dump *all* my bookmarks there. After all, isn't its purpose *to share* with others? I don't want to share everything, but I do want a vault where I can backup and access all my bookmarks. What's the solution?
Posted by cbrown at
9:56 AM
Safe and Secure Browsing with FireFox
Like many "switchers" out there, FireFox is my browser of choice on the Mac. The Mac (with OS X) is the computer of choice for me, my wife, my daughter, my mother... You get the picture. I do the support for my entire family and since I bought them all Macs, that's no longer a burden.
Anyway, you need to read this link and install the recommended plugins for a better, safer, ad-free browsing experience:
Safe and Secure Browsing with FireFox
Posted by cbrown at
9:41 AM