best letter ever

showing up Nicky Hilton:

Nicky Hilton asked, “I’m 21 years old, I run two multi-million-dollar companies, I work my ass off. Like, what were you doing that was so fucking important at that age?” I would like to repond to that. When I was 21, I was busy working toward my Ph.D. in organic chemistry at the University of Minnesota. I was the first to synthesize the compound okadaic acid — shown to be the leading cause of breast cancer.
– Steven F. Sabes
Wayzata, Minnesota

optimism tax

Tantek points to John’s post on Optimism Tax:

I’ll consider the loss to be part of my optimism tax. I sporadically pay this fee (when people take advantage of my trust in goodness) in exchange for optimistic freedom.

I would be less at-risk if I concentrated more on the negatives. “What if _____ happens?” But it’s not worth it. The cost to my quality of life (by worrying more) is far more expensive than the cost of losing some stuff.

I pay that, too.

Apple Store bookmarklet

Remix: this movie + WordPress’ PressIt bookmarklet = Apple Store bookmarklet

javascript:if(navigator.userAgent.indexOf('Safari') >=0){
Q=getSelection();
}else{
Q=document.selection?document.selection.createRange().text:document.getSelection();}
void(window.open('http://store.apple.com/1-800-MY-APPLE/WebObjects/AppleStore' +
'?productLearnMore='+encodeURIComponent(Q)));

(I’d make it draggable, but WordPress auto-curly-quoting is being too clever.)

Update: the movie is from Jon Rentzsch.

bill silva management contact info

bill silva management unhelpfully does not list their phone number or address on their web site, instead offering this lame excuse:

What are the Bill Silva Presents phone and fax numbers? What are the Bill Silva Presents mailing and physical addresses?
As far as the phone/fax numbers and our mailing or phisical addresses, we do not give out that information to the general public for privacy and security reasons. This policy is no different than a private citizen who chooses to have an “unlisted” phone number and address.

One of Bill’s clients, Raul Midon, is much more helpful, offering up the digits:

Bill Silva Management
8981 Sunset Blvd. #303
Los Angeles, CA 90069
phone 310/246-5292

The whois record for billsilvapresents.com turns up the same address with a slightly different phone number (310-246-5210). Likewise for billsilva.net (310-246-5220).

Update 2007-10: Aya from Bill Silva Presents writes that there new number is 310-651-3310.

simple gethostbyname example

Here’s a simple example using gethostbyname() that emulates the host command.

I wrote it to debug a DNS problem. On the network I’m on right now, gethostbyname() returns a different answer than host and dig. It is overaggressively caching other hostnames. i.e. nsloookup shrub.ca is returning 17.250.248.64, which is mail.mac.com (!).

#include <netdb.h>
#include <stdio.h>
#include <stdlib.h>

int main(int argc, char **argv) {
    if (
argc < 2) {
        
printf("Usage: %s hostname", argv[0]);
        exit(-
1);
    }

    struct hostent *hp = gethostbyname(argv[1]);

    if (hp == NULL) {
       
printf("gethostbyname() failed\n");
    } else {
       
printf("%s = ", hp->h_name);
       
unsigned int i=0;
       while (
hp -> h_addr_list[i] != NULL) {
          
printf( "%s ", inet_ntoa( *( struct in_addr*)( hp -> h_addr_list[i])));
          
i++;
       }
       
printf("\n");
    }
}