Categories
Computers Mac

Install git on Mac OS X 10.5

Git is the version control system initially developed for the Linux kernel. Nowadays it is used in many other areas and recently the Rails community has migrated from svn to git. This means that a working git client is required to install many plugins when developing a Rails application.

Git install screenshot

The best way to install git on Mac OS X is to build it from sources. The script below makes this process effortless. This script has been verified on Mac OS X 10.5.4 (Leopard) but may work on other OS X versions as well. Your mileage may vary.

Download script

Categories
Gadgets Photography

Finally, an update to EOS 5D

Today Canon released the upgrade to the 5D model. Finally! And after all the rumours regarding the name it was as unrevolutionary as ever – EOS 5D Mk II. Who would have guessed?

Canon EOS 5D Mk II pre-release photo

So is it any good? Actually, my first reaction was – so so. The resolution is a great step forward sure – but who really needs 21 MP? What I do like is the increased sensitivity and I hope that it is as good as they say. Another nice thing I found in the specification is the support for micro adjustments of the AF – a problem I have had with my 20D which focuses slightly behind the subject.

One thing I could do without is the live view and the video option. Sounds like a nice-to-have feature that I would use very seldom, if ever. With the 12 minute limit on recorded video (which sounds like it comes from the 4GB limitation on FAT32) I will still carry along my Canon HV10 if I want to record video.

What I would like to have seen is:

  • Built-in GPS. I mean, come on Canon, GPS chipsets are dirt cheap and take no place at all these days.
  • Built-in WiFi to be able to trickle-sync the Images to my Aperture library without the need to physically connect the camera.
  • Bluetooth remote control compatible with any standard phone or computer.

The real problem is that with the image quality at this level I find it difficult to understand why I would upgrade again in the foreseeable future. A resolution of 21 MP craves good glass and until I have filled my bag with even more L optics I don’t think I can justify another camera. Due to that the lack of GPS and WiFi is really troubling because I know that I will have to live without it for quite some time.

So will I buy the 5D Mk II? Yeah, probably.

Categories
Computers Gadgets Linux

No wireless on Acer Aspire One using OneLinux

Acer Aspire One is a cool little device but out of the box it is somewhat crippled. I have tried to install the standard Ubuntu and Xubuntu 8.4.1 distributions with the help from the information on the Ubuntu community pages. For some reason, the system started behaving erratically – the trackpad worked only intermittently, the computer could sometimes appear to hang for a few seconds etc. I then restored the system using the CD that came with it and noticed that everything was working as normal. Clearly, all my problems were software related.

I started looking for an alternative OS and found OneLinux, a distribution based on Ubuntu specifically targeted for the Acer Aspire One. Perfect! Only problem is that the wireless network doesn’t work. The hardware driver dialog shows the following (my AAO model is 110-Ab, using an Atheros AR5BXB63):

OneLinux beta 1 wireless hardware issue

While I am writing this I am downloading (all too slowly) the updated beta of OneLinux. Hopefully it will correct the wireless issue. Stay tuned.

Categories
Computers Linux

File permission error with bind on Ubuntu 8.04

Starting with Ubuntu 8.04 slave zones under bind9 may not work as well as you may think – depending on where you believe you should save your zone files. The syslog shows permission error when bind tries to write to any folder under /etc/bind. That is where I had kept such files before – I realise now that this was a mistake – or at least not in line with common best practice.

This is the error you may see:


dumping master file: /etc/bind/slave/tmp-31s25Singg: open: permission denied
transfer of 'example.com/IN' from 192.168.16.10#53: failed while receiving responses: permission denied
transfer of 'example.com/IN' from 192.168.16.10#53: end of transfer

Starting with Ubuntu 8.04, apparmor is included by default in the installation. This was a new feature for me. In short, apparmor prevents unauthorised file activities and the reason for my file permission problem with bind was that I tried to write slave zone files to /etc/bind/slave. But, by definition, the local host does not hold the master copy of a slave zone. Such data should instead be saved in /var/cache/bind. Once I changed my zone definition and restarted bind it went well.

Categories
Computers Linux

Re-disabling the root password

Sometimes it doesn’t help to think twice. The other night I was changing my password on an Ubuntu system and realised too late that I was right then root after having run ‘sudo su’. So, instead of changing my own password I changed the password of the root account. By default it is not possible to log onto the system by using the root account but by changing the password I immediately lowered that bar.

So how to fix this?

Some sources say that ‘sudo passwd -l root’ is the way to go but this just locks the account. Others point to ‘sudo passwd -d root’ but that just removes the password completely. While this means that it will not be possible to log onto the system remotely since ssh prevents logons using blank passwords, it does mean that the system is wide open to anyone who can gain access to a console.

The correct method is ‘sudo usermod -p ! root’. This inserts an exclamation point in the password hash for the root account. This means that no entered password will ever match the stored hash.

Categories
Computers Linux Mac Windows

Clearing the local DNS cache

On Mac OS X
Type “sudo nslookupd -flushcache”

On Linux
DNS records are not cached locally unless you have installed a local DNS server. Intead DNS records are cached in the upstream DNS servers.

On Windows
Type “ipconfig /flushdns”

Categories
Computers Linux Mac Windows

Getting out of Sharepoint

I have been using Sharepoint at work for a number of years now. In theory, it is a good product that takes away some of the anarchy that usually is the result of a just using a file share to exchange documents. In practice the benefits are less stellar, especially in a mixed environment.

Since starting to use a Mac in what is otherwise a Windows shop, it has become painfully obvious how much one ties oneself into the Microsoft world by using Sharepoint. People might be concerned about being locked in to Office but that is nothing to Sharepoint. Unless you run the combination of Windows, Office and Internet Explorer you are in for a rocky ride indeed.

So, trying to get out of Sharepoint, what do you do? You may still have a lot of documents saved there that you don’t want to lose.

I tried using wget but it wouldn’t download everything. I then tried httrack but it wouldn’t follow links into subfolders in document libraries (I did keep a copy downloaded by httrack though since it managed to keep most of the contents). I also tried to map UNC paths to the document libraries to be able to copy the documents that way. Didn’t work. I tried various freewares that were supposedly able to archive documents from Sharepoint. Not so.

Then I tried Sharepoint Documents Exporter by Brennan Stehling and that did the trick. Finally, I got a complete set of files directly from the MSSQL server, including files saved on the users’ private pages.

Thanks Brennan!

Now the big question remains: Should I head back to the file share or is there some open source Sharepoint wannabee solution with support for multiple client platforms, full browser compatibility and support for both Office and OpenOffice? Drop a comment if you have a suggestion.

Categories
Computers Linux

Fix for APT on Voyage Linux

When running apt-get on a system with Voyage Linux you may get the following error:

debconf: unable to initialize frontend: Dialog
debconf: (No usable dialog-like program is installed, so the dialog based frontend cannot be used. at /usr/share/perl5/Debconf/FrontEnd/Dialog.pm line 75.)
debconf: falling back to frontend: Readline
debconf: unable to initialize frontend: Readline
debconf: (Can't locate Term/ReadLine.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.8.8 /usr/local/share/perl/5.8.8 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.8 /usr/share/perl/5.8 /usr/local/lib/site_perl .) at /usr/share/perl5/Debconf/FrontEnd/Readline.pm line 7.)
debconf: falling back to frontend: Teletype

To fix this just install a fix by running the following:

apt-get install dialog apt-utils

Categories
Computers Linux Mac

Ping with timestamp

For some reason standard ICMP utilities (e.g. ‘ping’) do not support formatting the output in a way that makes it easy to do further processing. The following Perl script should work on any Mac or Linux system. It wraps the standard ping command and formats the output as comma separated values that can be directly imported into for instance Microsoft Excel.


#!/usr/bin/perl

use strict;
$| = 1;

my $host = $ARGV[0];
open PING, "ping $host |" or die "Error :$!";

while() {
 if($_ =~ m/.*seq=(\d+).*time=([\.0-9]*).*/) {
  my($s,$m,$h,$mday,$mon,$year,$wday,$yday,$isdst)=localtime(time);
  my $dt = sprintf("%4d-%02d-%02d,%02d:%02d:%02d", $year+1900, $mon+1, $mday, $h, $m, $s);
  print "$dt,$1,$2\n"
 }
}

Download script.

Categories
Uncategorized

Get latitude/longitude from Google Maps

When using Google Maps, you may find that you want to get the latitude and longitude of a position. One ease way to do this is make sure that the map is centered on the position and then type the following in the browser address bar:

javascript:void(prompt('',gApplication.getMap().getCenter()));

css.php