Google Shares Up $14 Today

Google’s stock closed at $372.14 today (up $13.97 for the day), which I thankfully I own some shares. I wonder how much higher it’s going to go before they announce a stock split. Even as it is now, it seems like a 10:1 stock split would be “reasonable”. It’s not the first day that their market cap was over $100B, but they are a pretty solid $100B company right now (with $4B to spare). Coincidentally, Google’s market cap is exactly twice what Yahoo is worth. :)

The only stock that has done better in the last year is Apple. Considering I own that too (for longer than a year), maybe I should stop being a programmer and be a stock broker. haha

Cell Phone As A Flashlight

Have you ever used your cell phone as a flashlight? It’s not terribly bright, but just bright enough you can see stuff if it’s pitch dark (for example moving around your house in the middle of the night without tripping over stuff).

It gives off a faint/eery glow that lets you see about 2 feet in front of you. Someone should make a movie about a boogieman that you can see in the dark only with your cell phone light. It would be suspenseful for no other reason than you can only see 2 feet around you.

Oh, and whoever makes that movie, give me some money for the idea too… thanks.

Live Email Validation

Here’s a handy bit of PHP code that will take the email variable, lookup the mail server for the domain, log into the mail server and see if it will accept delivery for that address.[code=php] $split = preg_split('/^(.*)<(.*)>(.*)/', $_REQUEST['email'], -1, PREG_SPLIT_DELIM_CAPTURE|PREG_SPLIT_NO_EMPTY);
$email = array_pop ($split);
$split = explode ("@", $email);
$domain = $split[1];

getmxrr ($domain, $a, $b);
if ($a) {
foreach ($a as $key => $val) {
$c[$b[$key]] = $val;
}
ksort ($c);
} else {
$c[0] = $domain;
}

$fp = fsockopen (array_shift($c), 25, $errno, $errstr, 30);
$return = fgets ($fp, 1024);
fputs ($fp, "helo none.com\r\n");
$return = fgets ($fp, 1024);
fputs ($fp, "mail from: <[email protected]>\r\n");
$return = fgets ($fp, 1024);
fputs ($fp, "rcpt to:<" . $email . ">\r\n");
$return = fgets ($fp, 1024);
fputs ($fp, "quit");

fclose($fp);

if (substr($return, 0, 3) > 250) {
echo "Bad email";
} else {
echo "Good email";
}
?>[/code]Okay, okay… the truth is I just got done adapting the GeSHi syntax highlighter into a WordPress plug-in and wanted to make sure it worked, so I needed to post some code of some sort. :)

Update

Seems to work pretty well if I do say so myself…

Five Hole Golf Course

I also saw the first rough sketches of a 5 hole golf course for my house. It looks pretty damn cool if I do say so myself. It even has a pond in the middle (although I didn’t see a golf cart path). :)

The front of the house is going to have a “moat” too, with a waterfall feeding it So you will have to drive over the moat to get to the garage and walk over a bridge to get to the front door. I think this is going to be a pretty cool house when it’s all said and done. :)

Fire Department Doesn’t Like My Pool House

The fire department doesn’t like the fact that I want to put a pool house against the edge of the slope off the pad (even if it’s 100% non-combustable materials). Now we are going to see if maybe they will be happy if we extend the pad in that area 15′ out using a stepped retaining wall.

The fire department is the man, and they are out to get me! (hehe just kidding)

Apple Media Center

The best thing about Windows is Windows Media Center, and it’s not as good as it could be (it lacks the ability to record HDTV). Apple really needs to come out with the TV recording solution I think, and it could be huge if they were to beat Microsoft to market with a HDTV recorder.

Hopefully {crossing fingers} that is the direction Apple is moving. Apple just came out with Front Row, which lets you control music, movies, pictures, etc. on your TV from a remote. But it lacks TV recording still.

Hopefully that’s Front Row 2.0…

CSS – overflow: auto;

I finally solved a CSS problem that has been driving me crazy on the theme I created for this blog. The fact that if you use a border on a block item (a DIV or H1 for example), the border will overlap a floating DIV. The text will wrap properly, but the border still extends into the floating DIV.

Anyway, the key to it is the overflow: auto; CSS attribute.

Without overflow: auto;

floating this to the right
This is a header

This is the main content of the page… I want the text to wrap (which it always does), but I also want the header border to not overlap the floating DIV (the problem).

<div style=”background-color: #eee; border: 1px solid #ddd; margin: 5px; padding: 5px; width: 300px;”>
<div style=”border: 1px solid #f00; float:right; width:100px; margin: 10px;”>floating this to the right</div>
<div style=”font-size:16px; background-color: #ddd; border: 1px dashed #0f0; overflow: auto”>This is a header</div>
This is the main content of the page… I want the text to wrap (which it always does), but I also want the header border to not overlap the floating DIV (the problem).
</div>

With overflow: auto;

floating this to the right
This is a header

This is the main content of the page… I want the text to wrap (which it always does), but I also want the header border to not overlap the floating DIV (the problem).

<div style=”background-color: #eee; border: 1px solid #ddd; margin: 5px; padding: 5px; width: 300px;”>
<div style=”border: 1px solid #f00; float:right; width:100px; margin: 10px;”>floating this to the right</div>
<div style=”font-size:16px; background-color: #ddd; border: 1px dashed #0f0; overflow: auto;“>This is a header</div>
This is the main content of the page… I want the text to wrap (which it always does), but I also want the header border to not overlap the floating DIV (the problem).
</div>
Update

Looks like it doesn’t work in Internet Explorer 6. Oh well, I’m over IE, so I’m not going to bother to come up with a weird hack. IE users will just have to upgrade to IE7 when it comes out I guess (or better yet, just use Firefox). :)

I’m Going To Kill The Chargers

Dude, the San Diego Chargers should be 7-0, but instead they are 3-4. The 4 losses have all come with them leading in the last 2 minutes. Today they got beaten by the Philadelphia Eagles with such last minute stupidity I want to cry.

Still have to give some props to the Eagles for shutting down LaDainian Tomlinson like they did.

“A Law Firm I Like: Winn and Sims”?

I just found out today that it’s the professional opinion of Brian Winn (of Winn and Sims law firm) that my Winn and Sims blog is not only “infringing on their intellectual property rights”, but is a flat out “illegal site”. Not only that, I’m somehow “spreading misinformation” about them. It all seems like a very strange choice of words considering it’s nothing more than a factual timeline of events that transpired.

I would think that if it was the true belief of a lawyer that I’m trying to “malign his company’s reputation”, they would be quick to file a libel suit against me. Then again, maybe I was already served another mystery summons and I’m due to appear in court. ;)

[Quoted from the source...]

Corpse Abuse

I read on CNN today that some US troops are being accused of “corpse abuse” because they burned some dead bodies. This is just a FYI to anyone that had to deal with my dead body someday…

Feel free to burn my body, mutilate it or whatever else you feel necessary. Hell, if you are starving, feel free to eat me for all I care.

MSN Requiring Cookies For RSS Readers

It seems as of last night MSN is now requiring end users to pass a cookie (specifically MC1) with all search and RSS feed requests. The cookie has 2 parts (V and GUID). V is always 3 for now (probably stands for VERSION), the second part is GUID which looks like an MD5 hash to me (32 character hexadecimal value). It also appears as if you can just make up the GUID to make it work (doesn’t validate against anything to make sure it’s valid).

Anyway, this seems really stupid, because now all the RSS feeds that were using MSN are going to break. The worst part is it doesn’t reject it, the web server simply holds the HTTP connection open (never returning anything and never closing it)… Nice! Wonder who’s idea that was. heh

Anyway, here’s a snippet of PHP code to form the cookie, which you can use with whatever you need (cookie name should be MC1):

[code=php]$cookie_mc1 = urlencode (‘V=3&GUID=’ . md5($_SERVER[‘SERVER_NAME’])); "test"[/code]

You can test this in your browser by going to any MSN search result page (for example this one) after you delete the MC1 cookie from .msn.com (if you have it).

Update

Of course right after I write this and make some backend changes to some of my stuff to take it into account, Microsoft fixes it. Oh well… they must read my blog (heh j/k).

Concept Design Submittal

I had a 9:30 am meeting today with the homeowners association where I’m building my house for the first stage of a three stage process of getting your house approved to be built.

Of course, I’ve never been to something like that before, so I’m thinking it’s going to be 3 or 4 hours or something. Nope… I was there a total of 5 minutes (I guess thats a good thing). :)

The good news is the first step (Concept Design Submittal) was approved, so now we can move on to the next phase of the review process (Design Development Submittal). I think that’s things like landscape plans, artist renderings of the home, samples of the materials you are going to use, etc.

Dude, I’m Awesome!

Well… I decided to write my own PHP script to rip out the old comments (from when this was a Blogger blog), parse them, format them and insert them into the database for WordPress.

The cool part is it all worked on the first try. That’s pretty amazing if you ask me (and that’s why I’m awesome.. hehe). :)

So anyway, the 400+ comments that were made when this was a Blogger blog now show… And we can once again enjoy people telling me I have a small penis. :)

10Ghz PowerMac G5

Okay, so Apple *did* announce quad processor PowerMacs today. The top-end being a 2.5Ghz x 4 G5 machine. I know what I’m getting myself for an early Christmas present (they aren’t shipping them until next month though). :)

http://www.apple.com/powermac/

Update

The video card that comes with it (PCI Express GeForce 6600) supports one dual link DVI port and one single link DVI port. That’s dumb, considering the old machines support 2 dual link DVI ports. That means you can’t drive 2 30″ monitors with a single card. Stupid if you ask me…

Also, does anyone know of a hardware SATA RAID card that support PowerMac G5 machines??

Two Stealth Fighters Outside My Window

So I’m sitting here working, minding my own business, when I happened to hear the roar of a jet engine somewhere close. So make the huge trouble (hehe) of turning my head to look out my window, and two Stealth Fighters were cruising by (maybe 500 feet off the ground). Obviously they just took off from the Miramar airbase (which is a few miles away). Probably going “home” after the airshow over the weekend.

One thing I noticed about them… they aren’t all that stealthy. I could hear it and see it perfectly fine. Aren’t they supposed to be invisible? :)

Nazi Buildings

After seeing the “Jesus In The Sand” image from the Google satellites, it reminded me of a Nazi building a saw here in my hometown (San Diego).

I don’t know what is actually in it or anything, but it sure seems like a strange to design a building in the shape of a Nazi swastika (even pointing in the right direction if you look at it with the North at the top).

Anyway, click here to see it in Google Maps for yourself.

Google Finds Jesus With Satellites

Who would have thought that Jesus was trapped in a sand dune in Peru, but apparently it’s true. This is undeniable evidence that Jesus is alive and well. I think someone should go visit him and see what’s up (maybe they could answer the real question here… Has Jesus Christ taken up Spanish?)

Truthfully, I’m not sure why this has to be Jesus (it looks more like Gandalf to me). It could be anyone really…

Check it out in Google Maps

[originally from Google Sightseeing]

Quad Processor G5 PowerMacs?

Rumor has it that Apple is announcing dual processor PowerMac G5 towers with each CPU having two cores to give it four logical processors. If rumors are right, they should be announced on Wednesday (October 19th).

I have a 30″ Apple Cinema Display on the way, and it requires a dual link DVI video card (which I don’t currently have). So I’m thinking I’ll just get a new computer (with the necessary video card to drive the 30″ monitor) if they do indeed announce quad processor PowerMacs on Wednesday.

We’ll see…

LT Runs, Throws And Passes For TD

I don’t know how often it happens, but I can’t imagine it happens all the time that an NFL player rushes for a touchdown, catches a pass for a touchdown and also PASSES for a touchdown in a single game. But it happend today for the Chargers with LaDainian Tomlinson against the Raiders.

What would be funnier is if Drew Brees caught a touchdown pass from LaDainian Tomlinson. :)

Update

Okay, I looked it up… the last time someone did it was New England’s David Patton on Oct. 21, 2001

Google Maps On Cell Phone

Mologogo is a free GPS friend-tracking service that works on Nextel phones with Java and GPS. Over at the MAKE: Blog, Phil Torronne took Mologogo for a walk. It’s a really cool use of the Google Maps API. This one lets two (or more) people you use GPS enabled phone to show on a map where they are in relationship to each other.

Cool little friend finder application there. But now they just need to make a GPS enabled Motorola RAZR so I can use it.

Cat With Two Tongues

I don’t know about you, but I’m pretty sure that if my cat had two tongues, it would kind of freak me out. I think maybe this cat got some lizard DNA in him or something.

Just looking that that picture almost makes me want to cry. :)

Thankfully, my cats are not a spawn of satan and only have one tongue. Although Yashi (my white cat) who has an oral fixation and will lick anything for hours might actually be jealous.

Switched To WordPress

Not that anyone would really notice, but I’ve switched this blog from Blogger to WordPress (finally). It’s been something I wanted to do for a long time, but I hated all the templates for WordPress. So I finally got off my butt and made my own.

Comments were lost… not that you guys had anything important to say anyway, so no biggie there. ;)

Since it’s PHP and MySQL driven, it lets me have control over the underlying code. For example you can see what I’m listening to in iTunes and I made it show a random picture from my photo gallery on the sidebar.

Another blog you have to see to believe!

This is my annual “Blog You Have To See To Believe” entry. I spend an entire year going through over a million blogs. Then I pick one blog per year that is just so unbelievable and cool, everyone has to see it for themselves.

Words cannot describe it, so just check it out.

You can also find last year’s winner over here.

Update

It looks like last years winner is no longer online, probably because they were overwhelmed with the amount of traffic I sent them.

Video iPod

After rumors have been swirling the last few weeks about Apple releasing an iPod that can do video, it’s official now. They have a 30GB and 60GB iPod with a slightly larger screen that is capable of doing video (realtime decoding of MPEG4 and H.264 with 260,000 colors). Pricing doesn’t change ($299 and $399). It’s also 31% thinner than the previous model it’s replacing.

It also comes in black like the Nano. I’m tempted to throw away my existing 60GB iPod Photo and get one of the black 60GB Video iPods…

MySQL Problems On Mac OS X Server

For the last two months or so, I’ve been having a strange problem with my primary MySQL Server that required that the mysqld process (not the server itself) be restarted. The first image shows the CPU usage of the server, with the red arrows being the points I restarted the mysqld process (queries per second and types of queries do not change over time).

The server itself is a dual processor Xserve G5 with 5GB RAM, 1.2TB drive space, etc. so resources really are not an issue. Also, I should point out that no other services (like a web server) are running on the machine (it’s strictly MySQL only). Basically the longer the database server ran, the slower it would become (there are no “bad” queries anywhere either). After 24 hours it was slow enough that it needed to be restarted. I tried tweaking MySQL config options, throwing more memory at various aspects of MySQL.

While watching the processlist, I noticed something strange a few times. Something that should be blazingly fast (like an insert into a tiny HEAP table) was taking a VERY long time (sometimes 90 seconds), and not only that it was hanging all the query threads (even ones hitting unrelated databases). So then I had the idea to look at the query cache since that’s shared by all databases, and when you update a table, it needs to flush the queries from the cache for that table (which would explain why unrelated databases’ queries would hang while it was flushing the query cache for the HEAP table being updated). So to test this theory I rolled the query cache memory allocation from 256MB to 2MB. Low and behold… it worked! In my situation, the less memory you allocate to the query cache, the faster MySQL was. Then I remembered something that was added to Mac OS X 10.3 (I believe) and that’s the ulimit functionality. It’s actually a nice feature and can prevent a runaway process from taking down a machine. But in my case it was preventing MySQL (which really is the only process) from using very many resources. Still not sure why it would slowly get worse, but maybe it has to do with the more memory MySQL wanted to use over time, the more swap disk memory it was forced to use. Who knows… and to be honest, I don’t care, I’m just glad it works now.

Once I got that squared away, this is what my MySQL server CPU usage looks like:

Now, hopefully someone out there will find themselves in the same problem and this will be your solution, rather than spend months screwing with it (this ulimit stuff would apply to other BSD variants like FreeBSD, not just Mac OS X).

Run this from the shell (as root):

sysctl -w kern.maxfiles=122880
sysctl -w kern.maxfilesperproc=102400

This allows a single process (mysqld in my case) to have up to 102,400 files open at once at the kernel level (more than enough).

Add this to your /etc/sysstl.conf file (or create it if needed):

kern.maxfiles=122880
kern.maxfilesperproc=102400

This makes the settings work when you reboot the machine.

Edit the /Library/StartupItems/MySQLCOM/MySQLCOM script that MySQL installs (it’s part of the automatic startup package), and somewhere near the beginning, add this:

ulimit -n 7000
ulimit -c unlimited
ulimit -d unlimited
ulimit -s 65536

You could put it somewhere else, but I chose this file since it doesn’t get overwritten when you upgrade MySQL. This lets the mysqld process use more than the default per user resources that Mac OS X Server allows.

You may want to adjust your settings as you see fit for your situation, but that’s what I used.

I’m just happy it’s no longer a problem for me!!!!! Yaaaayyy!!!!

HDMI (High-Definition Multimedia Interface)

If you are buying an HDTV anytime soon, make sure it has at least one HDMI connector on it. It’s pretty much the new standard for connecting audio/video (and soon computers) together. It’s built upon the older DVI interface, but it adds digital content protection for the content owners (keep the studios happy) and also carries audio on the single cable (DVI does not). The lack of content protection on the current HDTV signals is the main reason there are no realistic options for HDTV DVRs yet (see previous entry).

Another nice thing is it’s backwardly compatible with DVI (also Type B HDMI is backwardly compatible with dual link DVI connections).

You can also get equipment to carry DVI/HDMI signals over fiber optic cable, so if your connected equipment is more than 25 feet or so apart, that is the way to go.

Now for my complaint (heh)… What would be really nice is if they just do away with the physical DVI/HDMI connector, and go straight to fiber optic and basically putting the DVI/HDMI <-> fiber optic equipment inside the TV, cable box (row whatever else you are connecting).

HDTV DVR

How come there isn’t any good options for a high definition digital video recorder? TiVo doesn’t have one, Windows Media Center can’t do it, etc. The only one I’ve run across (that didn’t end up being some home brew Linux setup) is the one built into some of Mitsubishi’s high-end TVs.

Weird.

Chargers Treat Patriots Like Bitches

The San Diego Chargers played a game in Foxborough against the New England Patriots at home. For those that don’t know, the Patriots are the defending Super Bowl champions (have also won 3 of the last 4 Super Bowls). And have not lost at home in 21 straight game (their last loss at home was against the Jets on December 22, 2002, so it’s been awhile).

Anyway, the San Diego Chargers ended that streak today and treated them like their red-headed stepchild (especially in the 2nd half where the Chargers outscored the Patriots 24-0). The final score was 41-17 Chargers. :)