Be cautious with numbers in awk

I like awk , and often use it for quick little log aggregation things(often on the command line, if what I am interested in is a one-off).But awk has a small problem: it likes printing large numbers inexponential notation.

The minor problem with this is that I find exponential notation fornumbers harder to read than straight decimal notation. '3.18254e+10'is just harder to understand casually than 318254405


The (probable) importance of accurate Content-Types

As a result of the MSN search spider going crazy , Iam actually paying some attention to our web server logs for achange. This led to me looking up which URLs are responsible for thelargest amounts of bandwidth used.

To my surprise, the six largest bandwidth sources were some CD-ROMimages in ISO format that we happen to have lying around, the oldestone dating back to 2002. In the last week alone , there were eightrequests totaling 3.5 gigabytes of transfers. Who


Excluding buggy RPMs from a yum repository

We mirror the Fedora Core 4 updates area, and we use yum to installthings from it, and Red Hat recently released an extremely unsuitable(for us) update to xorg-x11 (as recounted in MoreFC4Problems ). So weneeded to take those buggy RPMs out of circulation and keep them out.

Fortunately this turns out to be pretty easy, because not all RPMs ina directory have to be in the repository metadata that yum uses. This let us continue to pull a full mirror from


20050922網摘 – 搜尋與侵權

Google

評論


What vendor updates are pending on your Linux system?

One of those routine system management tasks these days ischecking to make sure that I'm up to date on vendor security releasesand other updates. And when I'm not up to date, I generally want toknow what's out of date; being out of date on diff is one thing,being out of date on a kernel or glibc is quite another. (For astart, I probably want to test the kernel a bit more before pushing itinto our local update queue.)

Since


More Fedora Core 4 problems with X

Important update : the buggy RPMs have been superseded. See the end.

You may remember back to FC4FirstIrritations , where I talked aboutseveral X problems. Well, Red Hat managed to outdo itself recently, aswe discovered the hard way: their latest update to the xorg-x11 packages, 6.8.2-37.FC4.48.1 (released September 16th or so) nowcauses almost all of our workstations to explode.

Not literally exploded, but


20050921網摘 – Opera免收費無廣告

軟件

網站


長路漫漫本地 Web 2.0

亞強部落格介紹 了一個叫 Jumbo32 的網站,裏面有很多不同的有趣 Video,閒時可以逛逛笑笑。只可惜,這個網站一來不支持 Firefox ,二來沒有 RSS,對於 已被 RSS 餵慣 的我,預計並不會常常找來看。

這個網站令我想起了中國的 PoseShow 糗事百科


Two Python import tricks

Here's an extreme example of import and namespace trickery, drawnfrom the standard Python ftplib module:

try:  import SOCKS  socket = SOCKS  del SOCKS  from socket import getfqdn  socket.getfqdn = getfqdn  del getfqdnexcept ImportError:  import socket

(linebreaks added for clarity)

Modules are objects in Python, so a module's name binding can bemanipulated like anything else. This leads to the two things that ftplib is doing here.

First, the ftplib module would like to use the SOCKS module if itexists and otherwise


Some words of wisdom for free webmail providers

Vernon Schryver, in news.admin.net-abuse.email:

The buck always stops or is at least duplicated at the SMTP client.It does not matter to rational spam targets whether the operators ofa spam relay are paid for their services or forward spam as acharity.

(From Message-ID ,and let's hope that link stays working.)