1 0
post icon

Weather web, Ubuntu and Mac mini

Having your own weather station is fun. Making charts of rainfall, UV radiation and temperature is pure porno. But unless you’re kinky enough to consider the GUI below to be sexy, prepare for resistance.

weatherinfo.png

I hope no one takes offence, that software (Weather Display) does what it should, but in my eyes it’s just… uh, Windows 3.11. There is a web add-on you can buy which looks nicer, but that will cost you US$113 which is way off. So I have decided to write my own software where I control the colours. (more…)

Read full story »
post icon

Dynamic DNS and finding the right server

I have a few Mac minis now, running various server software. Two on Ubuntu and one still on Mac OS X – but not for much longer since I have found Linux superior when it comes to support for home automation stuff and weather stations. A challenge is to always find the servers when IP changes.

My Web hotel provider Space2u offers a dynamic DNS service and I have registered a few aliases to my servers there. On the Ubuntu servers I have installed EZ-ipupdate to /usr/local/bin, configured with my settings. That takes care of updating the dynamic DNS service. To make sure it’s always running I added it to startup by creating a file “local” like this

sudo nano /etc/init.d/local

and put

#!/bin/sh
/usr/local/bin/dyndns.conf

it it. Then made sure this file is executable and added to the init chain:

sudo chmod +x /etc/init.d/local
sudo update-rc.d local defaults 80

That’s all for dynamic IP handling. Now, to always find the right server when routing through my Airport Base Station I set up port mappings to a fixed local IP, like 10.0.1.222 and added an alias on the server by editing /etc/dhcp3/dhclient.conf and add

alias {  
  interface "eth0";  
  fixed-address 10.0.1.222;  
}

to it. Finish up by hitting

/etc/init.d/networking restart

and Voilá! The Ubuntu server is now listening on a fixed local IP as well but still getting all router and DNS info through DHCP. Next step: install ez-ipconfig on the Mac server, but first some digging in the garden.

Read full story »
post icon

Ny rättsprincip?

Rubrik i svd.se idag:

Ingen ska dömas utan rimligt tvivel

Read full story »
post icon

Calling me mini?

I finally got myself together and dug into layers of dusty and antiquated computer peripherals to get rid of old stuff and reclaim some space in the home office. I found kilometers of unused FireWire cables, USB extenders, various screws for hard disks, two EyeTV boxes I didn’t know I owned, four remote controls, and so on. An old Mac mini resurfaced, a 1.25 GHz PowerPC powered mini with 512 MB RAM and 40 GB HD. Not very impressing these days. Instead of throwing it away, the good friends at 99mac talked me into turning the mini into a server. Good idea. But since Apple has let down the Java community and doesn’t provide Java 1.6 for anything but 64-bit Intels, a Mac OS X based server was out of the question. After all, Java 1.7 is around the corner so why settle for old stuff like 1.5. (more…)

Read full story »
post icon

Wicket in Action is here!

Finally, the Web Framework of web framework, Apache Wicket, now has a bible of its own.

Apache Wicket is an open source, component oriented, stateful web application framework written in Java, created by very smart guys and actively developed by a large, enthusiastic and rapidly growing global community. Out of the box, Wicket comes with full support for creating large, highly scalable, internationalized web applications. Support for AJAX is top of the line, as is support for authentication and authorization, and integration with persistence frameworks. Wicket keeps dependencies between presentation and logic as small as possible, leading to a efficient development process where web designers and application developers can work in parallell to a higher degree than many other web application frameworks. Presentation is plain HTML, and logic plain and pure Java. Goodbye, Tag Soup!

Apache Wicket has been developed since two thousand something and a lively and helpful community is established. The API docs are excellent, but Wicket is based on some core concepts that every beginner must understand, and until now a thorough all-in-one guide helping beginners understand these concepts and navigate from “Hello, world” to a full feathered web application has largely been lacking. This book comes to the rescue and does it with fanfare! I have bought and read the downloadable early access edition and am very satisfied. Martijn Dashorst and Eelco Hillenius are core committers and have been with Wicket for a long time, so they know their baby in every respect, from bits and pieces to grander things like clustering, scaling and deploying of enterprise sized web application. They are also good teachers and present their case step by step, introducing new things when it comes natural.

The book describes all aspects of Wicket application development by building a dynamic web application that makes use of persistence, internationalization and AJAX. The reader learns how to build a high quality web applcation, reuse already made components and how to create and package new components for later reuse. Best practices when developing are described, as is aspects about integration with the Spring framework and Hibernate, activities like testing, catching errors, deploying for production, and so on.

With this book, the Wicket API and the great community, nothing can go wrong! Buy it.

Read full story »
post icon

Half delegate?

The US election system is a mystery to me. Who is the half delegate?

Half delegate

Read full story »
post icon

Upgrade Maven

Mac OS X 10.5 comes with version 2.0.6 of Maven 2 installed. That’s a somewhat buggy version, so upgrade it to the latest version (which is 2.0.8 when I write this). With Mac Ports installed, that’s easy:

sudo port install maven2

Done!

Read full story »
post icon

Föredrar hårdkokt?

DN skriver om buse med brist för proportioner:

Personen har även stulit flera ägg och eldat upp dessa, med hjälp av 25-30 träd som fällts för ändamålet.

Read full story »
post icon

Taste this, my dear

Wikipedia explains why falling satellites containing hydrazine are a threat to mankind:

In some severe cases, humans exposed to hydrazine find themselves in a state in which they incapacitated to form rational thoughts are neither alive nor dead, combined with an uncontrollable urge to feast on the brains of the living.

Update: some boring academic has now removed this from the article.

Read full story »
post icon

Buildr on your Mac

Why not try something new and fresh! Buildr, a maven-compatible software building system based on Ruby, with better performance and ease of use. It’s based on Ruby and is currently under incubation at Apache. Here is how you install it on Mac OS 10.5 with help from MacPorts.

And what is MacPorts about?

“The MacPorts Project is an open-source community initiative to design an easy-to-use system for compiling, installing, and upgrading either command-line, X11 or Aqua based open-source software on the Mac OS X operating system.”

MacPorts will make installation and maintenance of your building toolbox easy, so everyone should have it on their mac. It does require that you have Apple’s XCode tools installed, so find your Leopard DVD and install XCode if you haven’t done so already. Now download the MacPorts package and install it. It takes some minutes as it browses its online repository to auto-update itself after installation.

Most likely you must set your PATH after installation:

export PATH=/opt/local/bin:/opt/local/sbin:$PATH

Restart Terminal or do source .profile and you should be set. Now and then you might want to let MacPorts update its local information about the latest available stuff:

sudo port -v selfupdate

Update: with latest Mac OS X you can skip the Ruby and RubyGems installation. Go straight to the buildr part.

Next step is to make sure that you have Ruby and RubyGems on your mac, because Buildr requires it. Ruby does come preinstalled on Mac OS X but it’s a slightly older version. So get the latest and greatest by typing

sudo port install ruby

and wait for lot’s of stuff to happen. Continue with RubyGems:

sudo port install rb-rubygems

which will give you the nice package handler RubyGems. RubyGems make installing other things really easy. Well, it should be easy but something deep down in the dependency chain makes installation a bit obscure.

And finally, to install buildr:

sudo su -
export JAVA_HOME=’/System/Library/Frameworks/JavaVM.framework/Home’
gem install buildr
exit

Done! Next step is to write your buildfile. Have fun!

Read full story »