Random Post: It's Alive...
RSS .92| RSS 2.0| ATOM 0.3
  • Home
  •  

    Prune old mythtv channels

    October 12th, 2008

    Looking for a way to bulk remove channels that I’ve delselected in my channel lineup at Schedules Direct, I happened upon this blog post. Seems to work great :)

    For the impatient, the important bit is this:

    DELETE channel,program FROM channel NATURAL LEFT JOIN program WHERE program.title IS NULL;

    Coraid Odyssey: Part 6 (sata_mv hotplug)

    April 29th, 2008

    The final installment of our coraid adventure and not really much to say other than this: it works! Hotplug support is working as of kernel 2.6.25-git11 and appears to function as it should.

    Thanks go to Mark Lord, Marvell Corporation, EMC Corporation and Red Hat, Inc. for the coding magic.


    flac2mp3: batch flac to mp3 converter

    November 4th, 2007

    Here is a quick script I whipped together to convert flac files to mp3. Its nothing fancy but it does the job. Doesnt require anything but flac and lame.

    I was going to include a bunch of fancy id3 tag stuff but to be honest most of the id3 perl libraries out there arent that great to use. I may do something like that in the future though. Since I use quod libet which has a fantastic tagger built in, it isnt really an issue for me.

    #!/usr/bin/perl

    $lame_opt = "–preset extreme";

    foreach (@ARGV) {
    if (!($_ =~ /\.flac$/)) {
    print "Skipping $_\n";
    next;
    }

    `flac -d "$_"`;
    $_ =~ s/\.flac$/.wav/;
    $target = $_;
    $target =~ s/\.wav$/.mp3/;
    `lame $lame_opt "$_" "$target"`;
    `rm "$_"`;
    }


    Fahrenheit to Celcius

    October 11th, 2007

    I am constantly forgetting this and having to look it up so here are the equations to convert each unit of measure to the other:

    C = (5/9)(F-32)

    F = (9/5)C+32


    Pretty Code with semGeSHiCodeFix

    August 2nd, 2007

    In the quest for nicer formatting of code, I installed the semGeSHiCodeFix wordpress plugin. Blocks of code should now look like this:

    while true; do { $SOMETHING }

    Neat, huh? You can get the plugin here


    show_colors.sh

    June 22nd, 2007

    A handy little script to output all possible foreground and background ANSI colors to a terminal, complete with their codes for building nice looking terminal prompts.

    Enjoy :-)
    Read the rest of this entry »


    wipe_tapes.pl

    June 21st, 2007

    Here’s a little script I whipped up in perl to sequentially load and erase all the tapes in an auto loader. Hopefully it is of some use to others.

    payday loans low interest unsecured personal loans apply online multiple lenders personal loans no fax no call payday loans no fax cash til payday loans cash advances online fast payday loans no credit check loans bad credit personal loans no credit check no turndown personal loans cash advance service payday loans free bad credit personal loans fast cash bad credit personal loans instant bad credit personal loans bad credit payday loans bad credit no fax payday loans instant no faxing payday loans apply online for personal loans hard money lenders for personal loans bad credit high risk unsecured personal loans no credit check same day personal loans bad credit debt personal loans

    Read the rest of this entry »


    Permanent Device Nodes with udev

    June 21st, 2007

    I recently converted from Arkeia (a horribly overpriced and buggy piece of software) to Bacula (a free, stable, higher performance alternative). At the same time I upgraded my backup server to Debian Etch and started having a problem where my tape library would alternatively show up as either /dev/sg0 or /dev/sg2 depending on what order things were powered up. Obviously that presents a problem if certain pieces of software expect your auto changer to located at a certain device node in /dev.

    This can be fixed by making a custom udev rule…

    Read the rest of this entry »