Monthly Archive for October, 2004

Page 3 of 5

Podcasting with Blogger


I’m thinking about installing an iPod (or Zen) in my car. I would replace my current car stereo with a radio with AUX input (Kenwood has some nice ones) and get a docking station for the POD.
Why? I would like an MP3 source that I can update more easily than burning CD’s every now and then. I’d like to get up in the morning, take my MP3 player along and discover what has been put on it. In short, I wanna be a Podcast receiver.

I would of course like to get my favourite music on it. A bit like the Smooth-o-Matic Random Groove, but in my car. So I want to publish my own Podcast. Now I’m a take-it-easy blogger. I do not handcarve my Atom or RSS feeds, I just use Blogger. So can I create Podcasts with Blogger?

I started a new blog: SmoothPod to try this out. I can include a URL to an MP3 file in the (optional) Link field. When I take a look at the resulting Atom feed, it is included as
<link href="http://(path)/file.mp3" mce_href="http://(path)/file.mp3" rel="related" title="(Link Title)" type="text/html"/>. However, what we need for a correct Podcast is an RSS enclosure:
<enclosure url="http://(path)/file.mp3" length="12216320" type="audio/mpeg" />

After RSS conversion by Feedburner, the Link is gone. Now I could do the Atom-2-RSS conversion myself with FeedParser. But I decided to outsource the problem: I mentioned it to the guys from FeedBurner, and Eric Lunt seemed quite enthusiastic about it. So with some quality developer’s time on it, the FeedBurner SmartFeed might include a Podcast option that converts Blogger’s Link field, when filled with an MP3 file, to an RSS file with MP3 enclosures.

In the meantime, I’ll just go with the Smoothouse Oct 2004 Playlist @ Webjay.
UPDATE: Webjay actually has Podcasting capability right now! The RRS feed of the above playlist works like a charm in iPodder!

Squid: list top X referers

If your Squid server logs the referers of its request (i.e.
1. you’ve configured squid-cache with --enable-referer-log before compiling and
2. you’ve included a referer_log /var/log/squid/referer.log in your squid.conf file),
you can easily show top 50 of most popular referers with a simple Bourne shell:
#!/bin/bash

  1. this script is ‘top_referers.sh’
  2. (c) 2004 Peter Forret – Open Source
    REFERERS=/var/log/squid/referer.log
    OUTPUT=/var/www/html/stats/referer.txt
    MAXLINES=50(
    echo REPORT MADE AT `date`
    echo =============================
    $OUTPUT

Then add it to your crontab:
10 * * * * /(path)/top_referers.sh
and you have an hourly updated stat!
Add a little HTML formatting if you’re aesthetically demanding!

Redhat versions: what am I running?

If you manage multiple RedHat servers, or if you just stumble on a Linux server, and you have no idea what kind of machine it is, nor what the version of the OS is, try the following commands:

# more /proc/version
Linux version 2.4.20-24.9 (bhcompile@porky.devel.redhat.com)
(gcc version 3.2.2 20030222 (Red Hat Linux 3.2.2-5)) #1
Mon Dec 1 11:35:51 EST 2003
# more /proc/cpuinfo
vendor_id : GenuineIntel
model name : Intel(R) Pentium(R) 4 CPU 2.00GHz
cpu MHz : 1992.653
cache size : 512 KB
(…)
bogomips : 3971.48
# more /proc/meminfo
MemTotal: 1030872 kB
(…)
# cat /etc/redhat-release (only for RedHat distributions)
Red Hat Linux release 9 (Shrike)

So now you know: a 2GHz Pentium 4 with 1GB of memory, running RedHat 9 ‘Shrike’.
For more info on RedHat versions: Taroon, Shrike, Enigma, …

Poor-man’s sepia conversion


Working for Pixagogo makes digital imagery my daily bread, and I fool around with images every now and then. I am, however, not a user of PhotoShop. I’ve never worked with it, I don’t own the software, nada. Keep that in mind while you continue reading this.

Recently, for my cousin’s filmfilostoverij blog, I converted some film snapshots into small thumbnails like the one on the right (from “Lucia y el sexo”). The program I use for conversion is IrfanView. Not the best program, not the most complete, but easy, stable and free. For the stuff I need to do, I find Gimp too complex.

What I did to the images was:

  1. crop a square part of it
  2. convert to grayscale
  3. resize to 400×400 px
  4. perform a median filter (value: 9)
  5. resize to 100×100 px
  6. Save as JPG

But then I wanted to have a ‘sepia‘ effect. Irfanview does not have it. I wanted it. So I began my quest.


I started with the ‘Enhance Colors’ function and added 64 ‘R’ and 16 ‘G’ to the B/W image, but that didn’t look real enough. What does sepia look like, anyway? I found two definitions, expressed in CMYK coordinates, that I converted to RGB with my CMYK-to-RGB converter hizmo (thanks to Wikipedia):

The color
1. \definecolor{Sepia}{cmyk}{0,0.83,1,0.70} (from TexCeh)
#4D0D00 (77,13,0)
2. sepia cmyk(0%, 60%, 81%, 63%) (from december.com)
#5E2612 (94,38,18)
In ‘websafe‘ colors, this would be:
#551100 (84,17,0)

So let me show you how I proceeded, using an image of my tango teachers, Marisa y Oliver:

original image
Original
  1. Convert to greyscale
  2. Enhance colors: 94-38-18 (#5E2612)

=> way too red!

  1. Convert to greyscale
  2. Enhance colors: 77-13-0 (#4D0D00)

=> color OK, but too light

  1. Convert to greyscale
  2. Enhance colors: 77-13-0 (#4D0D00)
  3. Add 50% contrast

=> looks great

    Compare this with the optional QuickSepia plugin

=> I like mine better

Voila, there it is, a simple poor-mans sepia, that can even be used in ‘batch convert’ (Irfanview).

Short CMYK/RGB explanation and Detailed CMYK/RGB explanation

[Listening to: "The Prettiest Thing" - Norah Jones - Feels Like Home]