Eric D. Schabell

Sunday, August 3, 2008

Macbook - Macports MySql server complete install HowTo

Some time ago I setup MySql on my macbook using macports and the comments I got about this post included some useful information to automate starting MySql on startup.

Here is the complete process to get mysql server working (mysql5 in my case):
# install server and the launch script
# needed to start it. (I like the -v option
# to see what is happening.)
#
$ sudo port -v install mysql5 +server

# initialize the setup as mysql user.
#
$ sudo -u mysql mysql_install_db5

# start mysql and set your root password.
#
$ sudo -u mysql /opt/local/lib/mysql5/bin/mysqld_safe &
$ sudo /opt/local/lib/mysql5/bin/mysqladmin -u root password '[new_passwd]'


Now it would be nice if this all started on bootup instead of the last command above. Here are the steps to include it in the automated launchd configuration:
# Create the launchd directory.
#
$ sudo mkdir -p /Library/StartupItems/LaunchDaemons

# Now create a launch plist file:
#
$ sudo vim /Library/StartupItems/LaunchDaemons/org.mysql.launchd.mysql.plist

# Here is the XML you need to put into the plist file:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" 
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>org.mysql.launchd.mysql</string>
<key>ProgramArguments</key>
<array>
<string>/usr/local/mysql-max-5.0.24-osx10.4-i686/bin/mysqld_safe</string>
</array>
<key>KeepAlive</key>
<true/>
<key>SuccessfulExit</key>
<true/>
<key>RunAtLoad</key>
<true/>
<UserName>
<string>_mysql</string>
<GroupName>
<string>_mysql</string>
</dict>
</plist>

# Finally, need to load this into launchd or you can just
# reboot to have it picked up automatically.
#
$ sudo launchctl

launchd% load /System/Library/LaunchDaemons/org.mysql.launchd.mysql.plist
launchd% exit


I would also like to point to VelociPeek where Eric (another software man in the Eric club!) details more in this area.

Friday, August 1, 2008

Lost my domain name registration this week

Well, if you are seeing this post then the site DNS has finally propagated around to your corner of the world. It seems the DNS hosting I had setup decided to expire my DNS management module, so all of the settings just disappeared.

I took a closer look at the WHOIS information and it seems my auto-renewal system failed with some old credit card information. No warning from my registration company (Names Direct), just let it free.

The results were that my domain got hijacked by a pill selling spammer. A bit of research showed that the following person thought they were being rather sneaky:

PANINA, NATALIA [email protected]
67-87 Hlopina street
St. Petersburg, St. Petersburg 197729
RU
+7.8202506400

Feel free to spam or bash the site...

I have migrated my site over to http://www.schabell.org and when you can read this post it will have hit the DNS near you.

Let this be a lesson to those of you out there, auto-renewals are not worth the crappy service they implement at registration companies (I am holding back their name, even though I should dump this on the Internet). I am so disappointed to lose my original domain, registered in June 2001 - June 2008...

Monday, July 28, 2008

Arhnem and the Veluwe

Yesterday went on a bit of a ride through the hills and forests of Arnhem. 75 km, very hot and humid day so was a bit of a workout when out into the open sunny areas (called 'heide' there), but lovely and cool in the forested areas.

The fellow riders were a bit on the un-trained side so it was a rather relaxed ride (something like 25km/hr average) and we avoided the Postbank climb (bummer...), but on the last 15km to home we just let each person blow open the doors as he saw fit.

I did that last part in an average speed over 35km/hr, passed a motorized bike (he never caught back up to me either), and kept my heart rate between 180-185 the whole way with lovely rolling hills to tire me out. Nice time trial type of finish to the ride.

Thursday, July 24, 2008

BMW builds electric Mini for California

From AutoMotive News, earlier this month an announcement that the new Mini Cooper will be 'ported' to run on batteries. They will only be shipping to California and only 500, but it is a good start.
"This step will allow the BMW Group to gain an initial knowledge of how mobility can be achieved efficiently using purely electrically powered vehicles. Our task here is to combine the ultimate driving experience with an efficient electrified drive with practically no emissions", underlined Dr. Norbert Reithofer, Chairmanof the Board of Management of BMW AG.
Finally a cool car that is a bit easier on the gas budget! Wonder if I could 'port' my 1987 Austin Mini?

Saturday, July 19, 2008

Turn off revisions in Wordpress 2.6

Some of my other activities are hosted on Wordpress, so when I updated to 2.6 last week I was rather surprised with the amount of speed lost to revisions. I wanted to turn this off, so this is what I did:

# add these to your wp-config.php file.
#
// disabel revisions and slow down the saving!
define('WP_POST_REVISIONS', false);
define('AUTOSAVE_INTERVAL', 120);


The second line is for saving drafts, but I hate that too!

Friday, July 18, 2008

Install Subversion 1.4.6 on SLES 9

This is an example of an installation on SLES 9 x64_86 using fresh Apache 2 and Subversion 1.4.6 sources.

I choose to install all components from the newest sources and into /usr/local. First the apache apr-1.3.3, then the apr-util-1.3.4, then httpd-2.2.9, and finally subversion-1.4.6 as follows:

# obtain apr sources from apache site and unpack
#
$cd [path-to-sources]/apr-1.3.3

$ ./configure --prefix=/usr/local  \
--enable-threads                 \
--enable-other-child

$ make && make install



# obtain apr-util sources from apache site and unpack
#
$cd [path-to-sources]/apr-util-1.3.4

# for the APR-UTIL (here showing the lib64 for 64bits, 
# just use lib for 32bit):
#
$ ./configure --prefix=/usr/local         \
--enable-shared                         \
--with-apr=/usr/local/bin/apr-1-config  \
--with-berkeley-db=/usr/include/db4     \
--with-ldap-lib=/usr/lib64              \
--with-ldap-include=/usr/include        \
--with-ldap=ldap

$ make && make install



Now we are ready for the apache install which will be put
into /opt/apache2:
# obtain sources from apache site and unpack
#

$ cd [path-to-sources]/httpd-2.2.9

# for non ldap building of apache2, see here,
# otherwise see the next configure section below.
#
$ ./configure --prefix=/opt/apache2   \
--enable-mods-shared=all            \
--enable-so                 

$ make && make install

# if you want to build ldap then you will need to add ldap
# flags to the configure and it will look like this:
#
$ ./configure --prefix=/opt/apache2   \
--enable-mods-shared=all            \
--enable-so                         \
--enable-authnz-ldap                \
--enable-ldap

$ make && make install


Finally we will build our Subversion:

# unpack somewhere
#
$ tar xjvf [path-to-taball]/subversion-1.4.6.tar.bz2

$ tar xjvf [path-to-taball]/subversion-deps-1.4.6.tar.bz2

$ cd [path-to-sources]/subversion-1.4.6

# Now we can build Subversion 1.4.6 and use
# the prebuilt dependencies in /usr/local.
#
$ ./configure --prefix=/usr/local   \
--with-apxs=/opt/apache2/bin/apxs

$ make && make install

# Finally you need to expand the standard library search path with
# and entry in /etc/ld.so.conf for /usr/local/lib and run:
#
$ ldconfig


Finally need to create your svn repository and ensure your dav_svn.conf is setup correctly.

Test it all with http://localhost/svnroot/[repo-name] in a browser.

Thursday, July 17, 2008

SpringIDE 2.0.6 install in Eclipse 3.3.0

Taking a look at the Spring framework so thought it might be nice to install the SpringIDE in my Eclipse. Here is roughly the steps I took:

  • From the menu: Help->Software Updates
  • Click Add remote site…
  • Enter the the Spring IDE update site URL: http://springide.org/updatesite
  • Click OK
  • Check the box next to Sprint IDE Update Site
  • Expand Sprint IDE Update Site
  • Expand Dependencies
  • Uncheck Spring IDE Dependencies (only for Eclipse 3.2.x) not needed for 3.3.0
  • Expand Integrations
  • Uncheck Spring Mylyn Integration (optional)
  • Click Install
This is roughly the steps you need to follow and caused no dependency problems for my installation.

Wednesday, July 16, 2008

PRIMA project graduation

As most of the SNS IT development organization has seen in the last few months, the Java Domain has a new (very) large flat screen on the wall. It is part of the results of the PRIMA project which supplies management information about our running projects.

The project was completed by two interns, Lisa and Ikram, during a six month project starting in January 2008. It completed in June 208 and guess what? Lisa and Ikram, have graduated!

Not only did they receive a 9.0 for their project, they graduated on July the 8th cum laude! To top this off they have had their graduation thesis submitted for the Dutch 2008 Thesis Prize, a nation wide competition that only the very best are submitted to. Well done guys!

Lisa is starting her first job next month at DAF Trucks in Eindhoven as an Information Analyst. Ikram will be continuing his studies at the Technical University Delft, hoping to complete a Masters in the next two years (and still available for a part-time job during his studies).

Good luck to you both from all of us at the SNS Bank IT.

Monday, July 14, 2008

Macbook osX reporting USB stick full with free space

I was having this problem before and every time it takes me a bit of time to figure out that osX likes to use .Trashes directories to hold trashed files on the volume itself instead of moving them off onto the macbooks own trash folder.

It is irritating as the Finder applications does not show dot (.) files by default and I hate to mess around in a file browser. Next time you encounter this you can try this in your terminal:

$ df -h

Filesystem                Size   Used  Avail Capacity  Mounted on
/dev/disk1s1              984M   970M    14M    99%    /Volumes/USBStick


$ ls -a /Volumes/USBStick

.
..
.DS_Store
.Trashes      <<<< need to dump this.
._.Trashes
BPM Paper


$ rm -rf /Volumes/USBStick/.Trashes


$ df -h
Filesystem                Size   Used  Avail Capacity  Mounted on
/dev/disk1s1              984M    45M   939M     5%    /Volumes/USBStick


This will get you back your free space.

Will It Blend? - iPhone3G

This is just the best usage of an iPhone I have ever seen!

Thursday, July 10, 2008

PMS BibTexManager class on PHP Classes site answers

"Dear Eric,

 I looking for a php package to publish the list of my publications
contained in a bibtex file on a website, and to sort them according to
their type, year, .. I've found your BibtexManager package on PHP
Classes. I wish to know if it was powerfull enough to do that, and if
you had some documentation or example to use it correctly."


This is an example of the kind of questions I have been getting lately about a class (there are a few other related classes I get questions about, but this is the main one) I wrote for the Radboud University Nijmegen's Publication Management System (PMS).

I wanted to put the basic answer I keep sending out here so that future queries can be easily referred to this page, so here goes:

You might want to take a look at the PMS project, an Open Source project I setup that manages a database full of publications and bibtex data for the Radboud University Nijmegen, Netherlands. Here you will find the running PMS application using this code and other related classes.

The project code can be checked out at the CodeYard hosted PMS Project site.

The PMS application website is built with e107 CMS and the PMS code is the backend. Feel free to post questions here and I will try to help out where I can.

Tuesday, July 8, 2008

Backyard renovation project completed

The backyard renovation project (link takes you to before pictures) has been completed!

As you can see when we left on our vacation the backyard was almost finished. Just a few finishing touches were needed and the gardener took care of these before we got home.

What we encountered is pictured on the bottom right, a very nice job indeed! A week later the electrician came over to wire the lighting into a remote controlled switch in the garage. I can sit anywhere in my house and turn on the backyard lighting at the push of a button. The lighting consists of 4 LED lights in the big stepping stones and 5 spots arranged in the border plants around the yard. I spent the evening in a patio chair, drinking some rose wine, and switched my new backyard lights on and off with a big silly grin on my face...

The watering system is also built into the backyard, two sprinkler heads that pop up when water pressure is in the system. They cover the entire yard, excluding the back left corner so that we don't have to spray the back patio.

We are very happy with the results and as you can see, the kids are already playing on the slide and with their soccer ball. They have even been running through the sprinklers once already! ;-)

Wednesday, July 2, 2008

Cycling in the Belgian Ardennes by Rochefort

I just spent a lovely vacation in the Ardennes with my family and had the chance to cycle almost every two days. The weather was great, mostly around 26 degrees. I have mapped out some of the better climbs and routes I took.



I rode a total of 135 km spread over 5 rides, 52 km was the longest, and it was either climbing upwards or descending downwards. I was unable to find any flat roads at all. I spent the better part of my best rides in the 180+ heart rate range, just loving the steep hills.

See the map for details about the better climbs I found.