July 16th, 2011
I recently had to specify some custom JVM parameters (like -Dmyapp.home=/home/foo) to Gradles jettyRun task. Thanks to Gradles task API this is easily accomplished. So if anyone is looking for a solution:
jettyRun.doFirst {
System.setProperty(“my.system.property”,”value”)
}
Thats it! I am really liking Gradle so far. I may finally step away from Ant.
Tags: Build-Systems, Code, Gradle, Java
Posted in Technology | No Comments »
July 8th, 2010
If you are in software development a little bit longer or you’re just a geek, chances are high that you’re doing your development on multiple machines and also on the road. There are two (well known) problems that come with this:
- Synchronization of the files on the different machines
- Securing your work so in case your laptop is stolen nothing is compromised (There are lot’s of high profile horror stories of stolen customer data)
The usual answer to problem 1. is a centra file server or NAS (Network Attached Storage) which you deploy in your intranet. If you want to work on the road you most likely have to throw some VPN or SSH-Tunnel at the problem.Problem 2 is usually solved by encryption of the hard drive or at least one partition.
My issues with solution 1 were twofold: I wasn’t always-on and even if I was: Access through my wireless plan was pretty slow especially for many small files. I ended up copying files on my hard disk for faster access but this defeated the purpose of the central storage completely since I sometimes forgot to copy the file back. Atfer some back and forth I came up with the following two tools:
- Unison for file synchronization
- TrueCrypt for encryption
Unison allows synchronization of a set of files in two directions. I basically have a central server at home where all the clients synchronize with. You can think of Unison as a VCS (Version Control System) without the versioning. It does not store old copies of the resources. The synchronization is done using the Rsync algorithm which basically works like that:
- The two parties exchange a list of files. This list can include timestamps, filesizes or even hash sums.
- If two files differ and the filesize is over a certain thereshold both parties chunk the file and submit a list of hash sums of the chunks using a rolling checksum (You can find the details on the Rsync website)
- The missing chunks are then transferred over the wire
This allows me to sync even changes in large files quite quickly. Thanks to SSH the transfer is secure and doesn’t need special VPN software.
TrueCrypt allows me to create an encrypted partition. This partition holds all my work data and this is the data I regularly sync with my central server.
This way I always have all the important stuff with me without compromising security or access speed. So if you ever consider setting up a VPN I would strongly suggest to give my solution a try instead. It’s much easier to maintain and doesn’t suffer from the always-on syndrome.
Posted in Technology | No Comments »
February 13th, 2010
I constantly forget the resource type IDs of the OpenCms resource types and then have to dig into the configuration to find them. So here is a list of all resource type IDs of the OpenCms core. Maybe it is useful to someone else.
Tags: Development, OpenCms
Posted in Technology | No Comments »
November 8th, 2009
I’ve often seen Ubuntu being chosen instead of Debian because the LTS version offers support and security-fixes for five years. This kind of SLA is often a critical argument. But while Ubuntu is happily claiming to be enterprise-ready they yet enable the universe and multiverse software repositories per default even in the LTS server edition. Since these two repositories are not included in the SLA you might end up with software that is not provided with patches and therefore the whole security guarantee get’s thrown out of the window. While I’m not saying community backed security is bad it basically sets Ubuntu into the same mode of operation as Debian and this even without a specific warning or even notice. To be on the safe side you should disable the universe and multiverse repositories after installation or at least be aware of this fact.
Tags: Debian, Opinionated, Sysadmin, Ubuntu
Posted in Technology | No Comments »
November 6th, 2009
This feature was presented by Michael Emmerich during the OpenCms Days 2009 and caused a lot of people to grab their pen.
A short background on categories
Categories are a built-in content relation in OpenCms and allow files in the VFS to be assigned one or more topics/keywords/whatever. They can often be used as a replacement feature for siblings which are mostly misunderstood by users without a technical background. For example consider the typical example of a news site. You have a folder structure for your articles which could be the following way:
/articles/2008/12-24-merry-christmas.html
/articles/2009/09-01-new-site.html
/articles/2009/10-02-a-great-article.html
You now want to categorize the articles into topics so you would create another folder structure:
/topic/must-read
/topic/technical
The sibling-way would be to create a sibling (put simply: an automatically updating copy) of the articles in the desired topic folder. While this is a working solution it’s counterintuitive to most users. OpenCms 7 introduced the long awaited Content Relation Engine (CRE) including a default relation called categories. Similar to the sibling solution a category is effectively a folder but instead of creating it anywhere in the filesystem it’s created in the root site (“/”) under /system/categories/. Users can now assign categories to VFS files using the context-menu entry Relations -> Assign Categories. This is a much easier approach although it has one caveat: Categories are globally defined in the /system/ folder and can therefore only be created by users with access to the root site and can not be specified on a per site or even per folder basis. This can cause problems in multisite environments.
Decentralization to the rescue
With OpenCms 7.5 this limitation is finally gone. You can now define categories on a per-site and even per-folder basis. Simply create a folder named _categories in the folder where you want the categories to be available. Then create new folders inside this folder to define categories. The categories are available in the parent folder of the _categories-folder and all subfolders. They also cascade down. Example:
/de/_categories/
/de/_categories/hot-topic
/de/_categories/support
/de/news/_categories/
/de/news/_categories/marketing
/de/news/_categories/development
Inside the /de/ folder the categories hot-topic and support are available. Inside /de/news/ the categories hot-topic, support, marketing and development are available.
This feature should easily help you to get your content structured more nicely. Speaking from experience it is crucial to create an evolveable content structure upfront so your editors as well as visitors and search engines get the most out of your site.
See also:
Tags: Content, CRE, OpenCms, Tutorial
Posted in Technology | 6 Comments »
October 23rd, 2009
The SME Server is a great Linux distribution for small to medium sized businesses. I’ve been doing some emergency sysadmin stuff quite a while ago and encountered the upgrade-hell from 7.1 to version 7.4. Since updating the operating system from 7.1 to 7.4 wasn’t easy I decided to write a quick blog post to save you from tinkering.
Read the rest of this entry »
Tags: Linux, SME, Sysadmin, Tutorial
Posted in Technology | No Comments »
October 16th, 2009
Last week I attended the Yahoo! OpenHack 2009. I had never heard of this event before so I wasn’t sure what to expect. I have to say: I was very impressed with the event and had a lot of fun.
The event took place at the Millenium Hotel at Times Square and started with some sessions about the Yahoo! technologies. I was most impressed with the Yahoo Query Language (YQL) which enabled a SQL like way to talk to a wide variety of web services. Of course the recently released YUI toolkit looks also very promising. After lunch the hacking space in the 8th floor was opened. The whole space was decorated in Steam Punk fashion which is of courses appealing to us geeks. There was a gaming space (RockBand and Fussball), lots of sofas and a never ending amount of nice food and drinks (I’m talking real food, not just pizza
). They even had some german beer which made me almost feel at home.
The hacking started early and went on the whole night. I won’t go into detail about our project and all the other great hacks (You can look this up on the Yahoo! NYC Open Hack website) but I can assure you it is a lot of fun and you meet great people. There were Yahoo! engineers around to help you with almost every problem. I sure learned a lot during these two days. I wasn’t familiar with any of the Yahoo! technologies and think it’s a shame that people only seem to look at Google and forget that other companies have great stuff too.
On Saturday afternoon the hacks were presented and some prizes were given away. Although I think most of the people were in it for the fun. The ceremony although was great.
If you ever have the opportunity to attend such an event you should definately do it.
Tags: Conference, NYC, OpenHack, Personal, Rails, Yahoo
Posted in Conferences | 4 Comments »
October 12th, 2009
I recently had to login a user of a specified OU (Organizational Unit) through a JSP. This is done by simply prepending the username with the path to the OU.
Example: I want to login the user “foo” of the OU “/germany/marketing“. Simple specify the String “/germany/marketing/foo” as a username and you’re all set.
Tags: JSP, OpenCms, OU
Posted in Technology | No Comments »
September 26th, 2009
I once had to install a custom PHP extension on a 1&1 managed server. In this case the company had already purchased a managed server which was running the corporate website. They wanted to install an extranet-like webapplication which needed the ImageMagick PHP extension. In the following post I will outlike how I compiled and installed this extension on the managed server without having administrative access.
Read the rest of this entry »
Tags: 1und1, Administration, ImageMagick, Linux, PECL, PHP, Tutorial
Posted in Technology | 2 Comments »
September 25th, 2009
I’ll bet at the Yahoo! Open Hack NYC on October the 9th. If anyone has some cool suggestions or want to meet up there just shoot me an email. Seems like a fun thing to do. I’ll report back on this blog what comes out of it.
I’m also working on some projects so stay tuned.
Tags: Conference, Personal, Yahoo Open Hack
Posted in Technology | No Comments »