Cleanup old Gems, but not rails and friends

Posted by Frodo Larik Sat, 18 Jul 2009 16:32:00 GMT

If you’re like me and have several rails applications in different rails versions, it’s difficult to just run a gem cleanup, because it would mean all your old rails gems will also be deleted.

You don’t want that, but you also don’t want to clean them up one by one.

Here’s easy way to do it from your bash command line:

for g in $(sudo gem cleanup --dryrun \
   | awk '$1=="Dry" && $6!~/^(rails|action(mailer|webservice|pack)|active(resource|support|record))/ { print $6}' \
   | sed -E -e 's/-([0123456789].?)+$//g' \
   | sort --unique --ignore-case); do
      sudo gem cleanup $g
done

Just copy the code above in your terminal, make sure you’ve got sudo rights.

You might get warnings about dependencies, just say no and rerun the code if needed.

Ving Tsun - Training in Hilversum, the Netherlands

Posted by Frodo Larik Tue, 16 Jun 2009 16:37:00 GMT

People always ask me, what is Ving Tsun like? The following movie is recorded at our Ving Tsun School.

Enjoy!

More information about our Ving Tsun school can be found at www.vtkf.nl [English] [German]

Automatically remove PowerDNS records when removing domain

Posted by Frodo Larik Mon, 29 Dec 2008 20:39:00 GMT

When you want to remove a domain from PowerDNS and you’re using postgresql, you can save your self one query:

Normally you’ll do something like:

DELETE FROM rules where domain_id=666
DELETE FROM domains where id=666;

But when you create a rule in postgresql, you’ll only have to do this:

DELETE FROM domains where id=666;

Here’s how to create the rule.

CREATE OR REPLACE RULE remove_records AS 
   ON DELETE TO domains DO      
DELETE FROM records WHERE records.domain_id = old.id; 

For more information, see the PostgreSQL documentation about rules

Quickly cleanup your Thunderbird IMAP folder cache

Posted by Frodo Larik Tue, 16 Dec 2008 20:25:00 GMT

When you connect with multiple programs to your IMAP store, it is possible Thunderbird can be confused about what should be on the server and what it has on disk.

Result: Thunderbird just hangs with massive CPU usage.

A fix can be found at Mozillazine considering Phantom Folders.

A quick oneliner can solve the situation:

Quit Thunderbird, cd into your profile directory and:

find . \( -iname panacea.dat -or -iname *.msf -or -iname XUL.mfl \) -exec rm '{}' \; 

Open Thunderbird and everything should be fine again.

DSPAM double dot problem and HTML mail

Posted by Frodo Larik Sun, 14 Dec 2008 17:09:00 GMT

When sending HTML mail, you’ll probably have some CSS styles defined in you HTML source.

It seems that DSPAM 3.6.8 on Debian Etch has some issues that lines starting with a dot, get somehow screwed up in the process and end up with two dots

so:

.mystyle { color: black; }

becomes

..mystyle { color: black; }

I’m not sure if there is a fix for it Dspam 3.8.x, but a quick fix for you HTML newsletter may be to proceed everystyle with an bogus CSS item like ‘#dspam’ e.g.

#dspam, .mystyle { color: black; }

This will keep your HTML mail single dotted ;-)

Mac OS X Applications

Posted by Frodo Larik Sun, 07 Dec 2008 19:02:00 GMT

I assembled a list of Mac OS X Applications I use regularly.

If you’re new to a mac, this list will be very useful. If you’re a long time Mac user, well there is probably something in it for you.

You can find the list on the Mac OS X Applications page.

The industry behind the volkswagen.co.uk site

Posted by Frodo Larik Sat, 22 Mar 2008 10:34:00 GMT

Really nice commercial, although the website feels a bit sluggish and is overwhelmed with "Loading..." windows.

PostgreSQL wins Developer.com Top Database

Posted by Frodo Larik Sat, 19 Jan 2008 15:11:00 GMT

About time! The finalists were:

  • Hibernate
  • Java DB
  • MySQL
  • Oracle Database 10g
  • PostgreSQL

See PostgreSQL news or the item on developer.com for more info.

A thought on Mail.app

Posted by Frodo Larik Sat, 19 Jan 2008 14:48:00 GMT

vodafone It would be nice if there would be something like mail profiles separated by tabs in Mail.app. Let me explain what I mean: At home I use Mail.app at home for personal mail and Thunderbird for business mail. At work I use one account with Mail.app and other work accounts with Thunderbird. All accounts are IMAP based. The reason for this setup is, that I like separate accounts in a separate viewing space. That means I don’t want all messages to appear in every viewing space. Some accounts require more attention than others, while others are messages generated from automated systems or shared among multiple users. The problem arises that Thunderbird is not as nicely integrated into Mac OS X (address book, ical, spotlight) as Mail.app. But when I configure Mail.app to handle all accounts it gets very crowded in terms of screen estate and messages. When it is possible to start mail.app and have several mail viewers available for a group of accounts possibly handled by tabs in the viewer window, this would increase productivity. For example:

  • tab1 [home]
    • personal@mydomain.domain
    • myother@my2nddomain.domain
  • tab2 [work-personal]
    • me@coorporation.domain
  • tab3 [work-shared]
    • support@coorporation.domain
  • tab4 [system-messages]
    • monitoring@ourcorp.domain
    • cron@ourcorp.domain

When switching tabs, you will get a new viewer (left-pane and right-pane). Of course the icon in the dock, should somehow be configurable to show which messages are unread. I don’t know if someone likes this idea, but I guess it will be useful for many (business) people, but not for average joe with one email account. I for sure hope to see this in the next Mail.app release :-).

Make VOIP calls with your iPod Touch

Posted by Frodo Larik Mon, 31 Dec 2007 18:09:00 GMT

While the world is getting crazy about the iPhones. The guys at Touchmods wrote a VOIP SIP client for the iPod touch. If this software works well, the iPod touch will be a interesting gadget tot buy.

They will be releasing the software at 01-01-2007 00:00 (German time). You need some kind of mic for your iPod touch. Info about them is also on their website. Original post is here.