Unix and The Baha Men

I was at a children’s birthday party, over the weekend, and they played a kiddified version of the song, “Who Let The Dogs Out?”. I was reminded that I occasionally hear unix commands in music. This song had a significant instance.

The lyric that triggers this peculiar effect in me is:

When the party was nice, the party was jumpin’ (Hey, Yippie, Yi, Yo)

I hear that final “Yippie, Yi, Yo” as:

cpio

It weirds me out every time and I am probably alone in this psychoacoustic phenomenon.

Related Posts:

  • No Related Posts
Posted in Musicality, Programming | Tagged , , , | 1 Comment

Linus on Git

Linus Torvalds talking about Git. Why he created it and what it does. I, as readers know, am shamelessly in love with Git. For everything.

Related Posts:

Posted in Programming | Tagged , , , | Comments Off

Making Oracle find the span of a year

Here’s a handy Oracle date tip. If you have a string for a year ’2010′ or whatever as &tyear and feed it to this SQL. It will give back the first second and the last second of the year.

-- first/last day of year
select TRUNC(chart_date,'YEAR') first_day,
       last_day(add_months(chart_date,12 - to_number(to_char(chart_date,'mm')))) + interval '23:59:59' hour to second last_day
from (select to_date(&tyear,'YYYY') chart_date from dual);

Related Posts:

Posted in Programming | Tagged , , | Comments Off

Whitney the Wrathful

Whitney Houston

Whitney Houston is only a decade older than me, but that really seems like a lifetime in some ways. We have a different philosophy in life. I’m not particularly suspicious of people’s motives. Perhaps I’m naïve, but I tend to give most folks a pass on what they do. She doesn’t, and makes her feelings about what Bobby Brown was up to abundantly clear in her 1999 song, “It’s Not Right, But It’s Okay“.

Everything that Whitney complains about, has a perfectly reasonable explanation.

  • “Cause only two of you had dinner; I found your credit card receipt”
  • So, she’s snooping through the credit cards, and just because he only paid for one other of his buddies, she’s assuming he’s running around on her. Maybe they got separate checks?

  • “So why did 213 show up on the caller ID?!”
  • Well, Whitney, maybe one of his friends who is now of 54th street lived in that area code at some point and transferred his phone number as permitted by law. Maybe it’s a cellular phone? Maybe he’s using a VOIP service, or Google Voice, or something.

    (Of course, Whitney left him because he was abusive and had drug troubles… but still… she’s not very trusting. The fact that she turned out to be right does undermine my complaint somewhat, I will agree.)

    I never actually watched the series done with Bobby Brown and his family. I knew before I saw it that it would be an unpleasant train wreck.

    That said, he did do a song for Ghostbusters II. “…they were throwin’ a party for a bunch of children, when all the while the sign was under the buildin’” Genius! As brilliant as the meta-irony of Alanis.

    Related Posts:

Posted in Musicality | Tagged , , | Comments Off

Bash Hints: Redirecting StdErr to StdOut

One of the more annoying things about shell programming is when one has a program that spits the data to stderr.

program > file

You run that and you end up with spew in your terminal and nothing in your file. Annoying. If you want to make sure that everything makes it into the file, do your redirect like this.

program &> file

Related Posts:

Posted in Programming | Tagged , , , | Comments Off

codeigniter: trivial memcached library

Here’s a little library I’ve used a few times to access memcached from codeigniter.

<?php
if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Cacher {

    protected $mc;
    protected $CI;

    function __construct()
    {
        $this->CI =& get_instance();

        $this->mc = new Memcached();
        if (!count($this->mc->getServerList())) {
            $slist = $this->CI->config->item('memcache_servers');
            if ($slist) {
                $this->mc->addServers( $slist );
            } else {
                $this->mc->addServer('localhost',11211);
            }
        }
    }    

    function was_found() {
        return !$this->was_not_found();
    }

    function was_not_found() {
        return ($this->mc->getResultCode() == Memcached::RES_NOTFOUND);
    }

    function was_not_stored() {
        return ($this->mc->getResultCode() == Memcached::RES_NOTSTORED);
    }

    function get_raw_result() {
        return $this->mc->getResultCode();
    }

    function make_key($key) {
        $nkey = $this->CI->config->item('memcache_prefix');
        return "$nkey.$key";
    }

    function get($key)
    {
        return $this->mc->get($this->make_key($key));
    }

    function set($key,$value,$expiration=600)
    {
        return $this->mc->set($this->make_key($key),$value,$expiration);
    }
}

?>

Related Posts:

Posted in Programming | Tagged , , | Comments Off

Amazing Musical Video Hackery

This requires little in the way of explanation other than to say that what people are doing with video editing and youtube clips is positively amazing.

Related Posts:

Posted in Musicality | Tagged , , | 5 Comments

TIL: Linux kernel hackers should check linux-next

If you are new to linux kernel hacking and following along with one of the tutorials, something that is not mentioned as far as I can tell is that you should check the linux-next branch of the git tree to see if something you are going to fix is already fixed. The commands to add this tree to a checked out copy of Linus’ are:

git remote add linux-next git://git.kernel.org/pub/scm/linux/kernel/git/sfr/linux-next.git
git fetch linux-next
git fetch --tags linux-next
git remote update

Related Posts:

  • No Related Posts
Posted in Programming, TIL | Tagged , , | Comments Off

Ciara needs to hang around with different boys

Ciara 2009

So, I was listening to Ciara’s hateful misandristic epic, “Like A Boy”, and I realized that if that is her idea of how boys behave, she needs to hang around with different boys. What’s the deal… she calls them and they don’t call her back? They lie about how much money they have? They are philanderers.

Like Hollywood, she should have called me.

Too bad, Ciara, I’m already taken. But, there are plenty of good guys like me out there. You may be making bank on your song, but you’re basting all boys with the same hateful brush.

Related Posts:

  • No Related Posts
Posted in Incoherent Ramblings, Musicality | Tagged , , | Comments Off

A Capella Molto Bella

The human voice can totally blow one’s mind. Back in the day, beatboxing was a common way of adding a sound using one’s voice. Here’s my homie, The Human Beat Box, with The Fat Boys in the early 80s.


Continue reading

Related Posts:

Posted in Musicality | Tagged , , , , , , , | 2 Comments