Trying out Flex – HgWatch

Since I recently noticed I can get the FlexBuilder for free as a Student, I just had to check it out. I really like Flash / ActionScript to build WebApps, it easy effective and feels more like “Real Programming” than building a Website. So to also build something usefull (at least for me) I build a little WebApp to check my Mercurial Repositories automatically so, if any of my Colleges pushes a Update I get notified quickly.

If somebody likes to check ist out you find the App under HgWatch.

Comments are welcome, I’m by now way an expert on Flex Development but it seems fun, maybe I port the App to Air someday.

Setup Mercurial over SSL with Apache

Since some of my SVN Repositories did not survive the last Update of the Database, and were really hard to recover, or some even needed to be recovered from older Backup, I decided to switch to Mercurial for all me Repository needs.

Looking around on the Web there a probably 100s of guides explaining the basics and setup, but actually None of them worked as a whole for me, so I decided to write down my experiences maybe they apply to somebody, and if not, at least it will be easier for me next time.

First of all thanks to the following Guides I got everything working:

Second I’m running on a Debian Lenny Server with all Updates until 5/5/2009, Mercurial is 1.0.1, Apache is Apache/2.2.9 (Debian).

Now a couple hints, make sure cgi is enabled

sudo a2enmod cgi
sudo a2enmod cgid

Now Setup a new Location for Mercurial like this one

ScriptAliasMatch ^/merc(.*) /MYREPOPATH/hgwebdir.cgi$1
   <Location /merc>
   Allow from all
   Options ExecCGI
   AuthType Digest
   AuthName “REPOSNAME”
   AuthDigestProvider file
   AuthUserFile PATHTOPASSWORDFILE
   Require valid-user
   </Location>

Now copy the file hgwebdir.cgi found in /usr/share/hg to the Repository Path and Setup a hgweb.config file in the same location to point to your repositories

[collections]
MYREPOPATH = MYREPOPATH

Now just the repositories need to be initilized in this Path

mkdir testrepo
cd testrepo && hg init

and the Password file has to be created

mkdir testrepo
htdigest -c PASSWORDFILE ‘REPOSNAME’ USERNAME

If you now add allow_push = USERNAME to the hgrc file for the repository you can push your changes to the newly initilized repository after cloning it.

Hope those hints will help, if not comments are welcome.

Windows 7 Release Candidate on Acer Aspire One A110

Since I bought my Acer Aspire One, I never was really sure what OS to put on it, I tried Ubuntu, Kubuntu, Slackware, Windows XP but nothing seemed just right. Recently I downloaded Windows 7 RC and ran it in a VM on my Mac, and really liked it. Since it is supposed to run on Netbooks I gave it a spin today, and here are my thoughts:Build the Windows 7 Install USB Key using this Guide and it worked perfectly. All drivers work out of the Box, I got WLAN and Sound right from the first start, great improvement over the Beta, which was missing the WLAN drivers for the Acer. Since I’m running the SSD based Aspire one I was kind of worried that the 8GB might not be enough but there is actually about 700MB left after installing, and since I moved all my User Folders to an SD Card which is always plugged into my Aspire One thats actually not a problem at all.

One more nice thing, Areo works (after you turn it on) great! Actually the OS is snappier with Areo turned on than without.

So far I’m pretty happy going to explore the OS more soon, keep updating!

First Update using Sparkle

I just pushed my first update using Sparkle, it works like a charm. If you don’t know the Sparkle Framework, definitely check it out here . Integration in MacOSX is great, while from a developers point of view its great, too. I had everything needed Setup in just about 1 hour.

The only thing giving me headaches at first was that the downloader didn’t find my dmg file, and simply exited with

Sparkle Error (continued): file does not exists

The Problem was a % in the URL, after moving the files to a different folder, it worked great. I’m still going to file a bug but that should not keep you away from using Sparkle, its just the thing missing from OSX to handle Application updates.

EDIT: Reached Version 0.8.2, Sparkle works great while the Error mentioned was on my Part, sorry :)

FlyingPics posting Pictures to TwitPic — Update2: NEW LOGO!

I’ve done it! My first little Cocoa Mac App is here and working, so download FlyingPics v07.2 it now.

The propose is to Post Pictures to TwitPic, and also Tweet a Message, quick and easy from your Desktop. If you like to know more check the Software section.

I’ve written this over the weekend together with my buddy Martin Riedel . Any Suggestions a highly welcome, just drop me a line via software@dirtylittlecoder.com.

UPDATE: New Version is availible FlyingPics v07.2

UPDATE2: New Logo is now integrated FlyingPics v07.2

Wifi Speed Draft-N: 2.4GHz vs 5GHz

Just a quick comparison, after using my Airport Extreme with Draft-N Wifi in the 2.4GHz b/g compatibility mode for some time I realized how much more speed you can get using the N only 5GHz mode, just for comparison:

Using 2.4GHz B/G/N mode: 140MBit

Using 5GHz N only mode: 270MBit

Since I have 2 Wifi routers at home using 1 for B/G and the Airport Extreme for N only really pays of, suddenly copying large files via Wireless makes sense and is useable. Knowing that the addition of the second Wifi Set in the latest Airport Extremes make a lot of sense, especially when sharing Media over Wifi.

Using S/MIME in GMail

I’m a big fan of EMail encryption and Authentification, because I use EMail like Letters, and would like to assure the recipient that it’s really me who’s sending it. Also if it’s Privat or if I might be sending the occasional Password, I would like to encrypt.

Since S/MIME is build into pretty much every EMail Programm on the Planet (Apple Mail, Outlook, Thunderbird, Evolution etc.) I prefer it over PGP/GPG. Well I got my Certificat from www.thawte.com which worked really flawlessly, and they also tell you how to Integrate it in about ever Mail Programm there is, the only Problem I have is:

What do I do If I’m on a Computer without my Mail Programm?

But since I use GMail there is a nice solution, GMail S/MIME I finally no longer have to run Thunderbird on my Netbook but can stick to Firefox, and thats all I need. Simply Import your Certificate, and the Thawte Root CA under Certificates (Preferences -> Advanced -> View Certificates ), and your good to go, no other Configuration needed.

It works great for me, so I guess finally I can tell more People to use S/MIME.

Use SSHKeychain and Sequel Pro to access a remote Database

Since I’m running my own Server, I also am in charge of my own Databases and their Backups. For the longest time I#ve been doing all the Database work via SSH and the Terminal on my Mac, well even though that works quite well if you know your way around MySQL and the Command Line, it gets kind of annoying and impractical if you are starting to use a couple different Databases and maybe once in a while want to check on your other users on your Server, too.

What first comes to mind administering DB is PHPMyAdmin, which is the all powerful and great MySQL Server administration tool, but oh well I don’t like it. I don’t like the UI, and it always felt “flaky” to me, even though its supposed to be perfectly stable from what I hear. So I stuck with the Terminal, until I figured that I could use my favorite MySQL tool on the Mac Sequel Pro and use it via an SSH Tunnel on my Remote Server.

To set this up you first need SSHKeychain (or use the Terminal to dig the Tunnel), and of course Sequel Pro. Now to setup the Tunnel.

  • Got to SSHKeychains Preferences, and set up a Tunnel Forwarding the Local Port (ie 3307) you want to the MySQL Port (3306 by default), you also need to enter your Server Data unter SSH.
  • Now Configure Sequel Pro to access your Database via this Portforward, thats easy just enter 127.0.0.1 as the Host (or use localhost), enter your User for the Server, Password, and finally the Forwarded Port (ie 3307)

Thats all, now you can connect and have access to your Databases via a nice Interface, and a Secure Connection via SSH.

Get Wireshark to recognize the Networkinterfaces on MacOSX

Since working extensively with PXEBoot, TFTP, Xen Virtual Networking and all this good stuff I’m very depended on Wireshark for my debugging. Sadly the way Wireshark works on BSD style Network devices, like in MacOSX, it would have to be run as Root to be able to read the capture. Since I’m kind of security conscious, I really don’t like running Apps as root, and especially Apps exposed to the Network. Looking around I discovered 2 workarounds, one good one and one hack.

1. The Hack:

Make the capture devices readable by the user by running:

sudo chgrp staff /dev/bpf*

sudo chmod g+r /dev/bpf*

This works great if you are administrator on your Mac (I’m not, I’m a standart user), and if you are willing to enter this every time you reboot in the Terminal.

2. The Good way:

Install a Startup Item which is executed at boot by the lauchd as root, to change the Permissions on the capture devices. To do this first you need to login as Administrator once to create the Startup Item then you need to create a Folder

sudo mkdir -p /Library/StartupItems/ChmodBPF

in this Folder there will be 2 files: 1 executable shell script which sets the Permissions and 1 plist, which just has to be there I guess. On how to create those files you can look here or just download the once created already from here and put it in the Folder.

Now make sure the Permissions are set correctly

sudo chown -R root:wheel /Library/StartupItems/ChmodBPF

sudo chmod 644 /Library/StartupItems/ChmodBPF/StartupParameters.plist

sudo chmod 755 /Library/StartupItems/ChmodBPF/ChmodBPF

Now after a reboot Wireshark should work fine, recognizing all the Interfaces, and being able to capture from them.