[lang]

Present Perfect

Personal
Projects
Packages
Patches
Presents
Linux

Picture Gallery
Present Perfect

zoning

Filed under: Hacking — Thomas @ 17:47

2007-06-21
17:47

The number one irritation I had when editing zone files was having to update the serial number.

After googling for a while, I found some ideas on how to make vim help there. And then I tweaked it a little for my Fedora Core setup, and made it automatic so that it does it when I open the file. That's fine, since only if you save the file (which means, you made a change you want) does it actually update the serial on disk.

Now it's edit - save - reload.

.vimrc snippet:


" define command to increment the SOA in zone files
function! UPDSERIAL(date, num)
if (strftime("%Y%m%d") == a:date)
return a:date . a:num+1
endif
return strftime("%Y%m%d") . '01'
endfunction

command Soa :%s/(2[0-9]{7})([0-9]{2})(s*; serial)/=UPDSERIAL(submatch(1), submatch(2)) . submatch(3)/g

" executed the command when you edit the zone file
autocmd BufRead /var/named/*zone Soa

one button life change

Filed under: Hacking — Thomas @ 22:18

2007-06-17
22:18

This weekend.  Lots of plans, getting organized, cleaning out my inboxes, lots of things working against me.

Like, say, my ADSL connection being reset every 30 minutes.  Goddamnit that is awful and I have still after three years not been able to figure out why.  It starts happening at some point, then goes on for a few days, then goes away.   Really shitty to have in Evolution ,because it means you have a small window in which you can trust theconnection to work, and Evolution typically can't complete most of the operations it's trying to perform in that window.  And then it just hangs on whatever task it's doing (either showing (...) or Working (0xp01nter) at the bottom).

It was so bad that I decided to go to the office today just to get shit done, knowing there would be a perfectly fine internet connection over there.

During my mail cleanup I also Google'd a little to figure out if at all, and if so how, offline folders in Evolution actually work with IMAP (I'm still not sure after the googling).

And there was this one post that said that there is a Cancel button.  And that you can actually <b>click it and it cancels</b> the running tasks.

What ? Where ?

I've been using Evo since like forever and I've never seen a Cancel button ! Where the hell is ... Oh, hey, what's that red round button at the top to the right with the white cross through it.

OMG.  It works.

This is definitely going to beat the crap out of --force-shutdown if this thing keeps working as well as it is right now.

On unrelated news: my private Inbox is currently EMPTY and my work Inbox has no mails in Inbox for June.

Of course, I always cheat a little bit and move reasonably old mails to a THROUGHBOX folder which I promise myself to get through someday (needless to say it has mails from as far back as 2000), but I did process over four months of mail and am back on top of my INBOXes.

Let's see how long I last this time...

N800 wizards

Filed under: Hacking — Thomas @ 17:35

2007-06-15
17:35

Please enlighten me - what is this process called "enprocess" that runs on my N800 as soon as it boots, takes pretty much all of my CPU most of the time, and seems to not mind to be killed completely as far as I can tell ?

What is it, what is it doing taking so much CPU and wearing my poor battery out, and where are the docs on this ? No man pages makes it hard to figure out...

UPDATE: it was indeed a process related to email.  I fixed it permanently by moving my mail directory ouf of the way, and restarting the mail application and reconfiguring my email account.  Now it seems to be a lot less CPU hungry.  Thanks everyone who commented.

First new trunk feature in moap

Filed under: Hacking,moap — Thomas @ 14:20

2007-05-21
14:20

Just added this bit to moap

[moap-trunk] [thomas@otto trunk]$ moap bug -U http://bugzilla.gnome.org/ query "product=GStreamer&component=gst-plugins-base&target_milestone=0.10.2"

324216: [cdparanoia] missing patches from 0.8

324696: [videotestsrc] does not start counting the time from zero when restarted324900: Problem compiling gst-plugins-base with Forte

325984: [playbin] cannot handle sources that produce raw audio/video

325990: patch videotestsrc for using glib types

326601: GstRingBuffer crashes with alaw/mulaw caps

327114: [theoradec] should post tags on the bus

327216: vorbisdec segfaults on certain queries

328423: [gnomevfs] doesn't handle case when gnomevfs can't init

326881: [playbin] stream selector connects to 'state-changed'

Compared to this screenscraping horror, a lot less code and a lot more robust.

I decided to use queries with CSV since both Redhat's and GNOME's bugzilla seem to support it.

AFAICT, GNOME's supports ATOM but not RSS, and Redhat's supports RSS but not ATOM. Yay for the magic that is Bugzilla !

moap 0.2.4

Filed under: moap,Releases — Thomas @ 15:23

2007-05-20
15:23

moap

I put out a new moap release. Here's a short list of changes:

  • moap doap freshmeat -b allows forcing a branch name (e.g. 'Default')
  • distro checking code to give hints on how to install dependencies
  • RSS2 feed generation from .doap release entries using Genshi or Cheetah templates
  • ability to operate on multiple .doap files
  • make moap changelog prepare also check the CHANGE_LOG_EMAIL_ADDRESS variable
  • implement searching for your project's home page using Yahoo or Google
  • parse wiki attribute of a DOAP Project

Jan wants to do some GStreamer releases, so I think I'll be working to add some features for that to moap this week.

As you may have noticed, moap now has a logo, and I like it a lot. I asked Christophe, Fluendo's visual wizard, to create me a logo based on the hammer and sickle, in orange, Tango-style, and with Russian-looking letters. He gave me three choices, I picked one, he gave me another three refining my choice, I picked one, and then he gave me another three, and I picked one. I can't believe how easy this process was compared to me trying to come up with something on my own. I should make T-shirts with this logo.

Happy hacking !

« Previous PageNext Page »
picture