Shawn

This user hasn't shared any biographical information

Homepage: http://www.shawnhogan.com/


Posts by Shawn

Firefox 2.0 Released

Firefox 2After all the beta and release candidate versions, Firefox 2.0 is finally finished and released.

Go get it.

If you don’t know what Firefox is, then you especially need to go get it (really).

strace

Yay, more server admin fun! :) Here’s a useful *nix command that will let you determine what system calls a program uses… For example, I wanted to double check that libevent calls within memcached were using epoll() and select() or poll() calls (epoll scales better) on my SuSE Linux machines…

server:~ # strace memcached -u root

...clipped...
epoll_ctl(5, EPOLL_CTL_ADD, 3, {EPOLLIN, {u32=5313904, u64=5313904}}) = 0
epoll_ctl(5, EPOLL_CTL_ADD, 4, {EPOLLIN, {u32=5313920, u64=5313920}}) = 0
epoll_ctl(5, EPOLL_CTL_ADD, 7, {EPOLLIN, {u32=5313968, u64=5313968}}) = 0
epoll_wait(5, {}, 1024, 1000) = 0

Sure enough! :)

Use Server-Side Caching When Possible (memcached)

Purely out of necessity, I’ve become a system administrator/architect for digitalpoint.com servers… and a few people have been asking me for general admin tips to make things stable and scalable, so here’s a good one for you…

Use memcached… no really, use it.

memcached is a distributed memory caching system that allows multiple servers to access the same shared memory (you can use it just for single local server too of course). You can cache pretty much anything… SQL query results (especially ones that can’t hit indexes), dynamically generated web pages, dynamic RSS feeds, etc.

If you compile the memcache() functions/class directly into PHP, you have a an easy (yet powerful) way to incorporate it.

For example, let’s say I have some existing code that makes a call to some sort of API (I use memcached for the keyword suggestion tool in this way)… you can add a couple lines of code to cache the results.

[code=php]$data = @file_get_contents ("http://some_api_call_url?keywords=$keywords");[/code]

could become this:

[code=php]$memcache = new Memcache;
$memcache->addServer('192.168.1.1');
$memcache->addServer('192.168.1.2');
if (!$data = $memcache->get($keywords)) {
$data = @file_get_contents ("http://some_api_call_url?keywords=$keywords");
$memcache->set($keywords, $data, false, 86400); // 24 hour cache
}
$memcache->close();[/code]

Now we are only hitting the API for the same keywords once every 24 hours… that setup utilizes 2 memcached servers working as a single entity for pooling and failover.

I use memcache for all sorts of things (this blog’s pages are cached for 60 seconds as another example because WordPress sucks, and protects against a massive influx of traffic [front-page digg for example]).

Here’s some things I personally use it for…

  • Caching this blog’s pages (for 60 seconds)
  • Caching Keyword Suggestion Tool queries (for 7 days)
  • Caching AdSense Sandbox queries (for 24 hours)
  • Temporary counters in Keyword Tracker (using decrement() for displaying remaining keywords on a “Check All”)
  • Recent forum topics that show on all the webmaster tools
  • vBulletin forum datastore

Any high-traffic site that is dynamically generated (especially if it includes SQL queries) could benefit from it… you could manage which memcache items need to be updated when you insert/update to the database, or an easy way to do it is just check the cache for the pages that potentially have high traffic… if they aren’t in the cache, put them in the cache with a certain expiration date. Then the page is dynamically generated no more often than the cache expiration time (in the case of this blog, the pages are generated no more than once every 60 seconds).

P.S. - Make sure you block outside access to your memcached port since there’s no authentication used!

White And Nerdy

I have to thank my old roommate Tracy for this… she apparently thinks of me whenever she hears this song. haha Great.

The RIAA/MPAA should take a note here… I never heard of this song until Tracy told me to go find it on YouTube… and I just purchased the whole album via iTunes Music Store because of it. I would have never gone to the store to buy it, but one-click purchasing of the album makes it easy. Now if you could just do this with DVDs, I would buy/watch more. And I guarantee I don’t have a unique viewpoint.

Update

Hahahaha… speaking of which, I’ve been listening to the album and just heard “Don’t Download This Song”, which you can download for free over here.

Lyrics

Once in a while
Maybe you will feel the urge.
To break into national copyright law
By downloading mp3s
From file sharing sites
Like morphous or grogster or limewire or kazza.
But deep in your Heart.
You know the guilt would drive you mad
And the shame would leave a permanent scar
Cause you start out stealing songs
Then you’re robbing liquor stores
And selling Crack
And running over school kids with your car

[Chorus]
So Don’t Download This Song
The record store is where you belong
Go and buy the CD like you know that you should
Oh Don’t Download This Song

Oh you don’t want to mess
With the R I Double A
They’ll sue you if you burn that Cdr.
It doesn’t matter if you’re a grandma
Or a seven year old girl
They’ll treat you like the evil Hard-bitten criminal scum you are

[Chorus]
So Don’t Download This Song (don’t go)
Pirating music all day long
Go and buy the CD like you know that you should
Oh Don’t Download This Song

Don’t take away money
From artists just like me
How else can I afford another solid gold Hum V
And diamond studded swimming pools
These things don’t grow on trees
So all I ask is everybody Pleaseeeeee

[Chorus]
Don’t Download This Song (Don’t do it No No)
Even Lars Urlich Know it’s wrong (You could just ask him)
Go and buy the CD like you know that you should (You Really Should)
Oh Don’t Download This Song

Don’t Download This Song (Oh please don’t you do it or you)
Might Wind up in Jail like Tommy Chong (Remember Tommy)
Go and buy the CD (Right Now) like you know that you should (Go out and Buy it)
Oh Don’t Download This Song.

Don’t Download This Song (No no no no no no)
Or you’ll burn in hell before to long (And you deserve it)
Go and buy the CD (Just buy it) like you know that you should (You should get it)

Alien In My Dome

There appears to be an alien in the camera dome at the construction site. Great… now I need to go there, climb up there, clean it out and hopefully not get some alien egg implanted in my chest.

Using Textbooks As Shields

What a good idea… maybe we should send old textbooks to soldiers in Iraq to give them some added bullet protection…

A candidate for state superintendent of schools said Thursday he wants thick used textbooks placed under every student’s desk so they can use them for self-defense during school shootings.

“People might think it’s kind of weird, crazy,” said Republican Bill Crozier of Union City, Oklahoma, a teacher and former Air Force security officer.

Yeah, people think it’s weird because it *is* weird.

http://www.cnn.com/2006/EDUCATION/10/20/school.shootings.textbooks.ap/

Google Crawl Rate

Here’s something cool that Google has added to Google Sitemaps for site owners…

Let’s you see how much Google’s spider crawls your site in the last 90 days, and even gives you the option to instruct Googlebot to increase or decrease their crawl activity on your site.

Here’s the stats for the Digital Point forum… Google crawling an average of 52,000+ pages per day (without putting it on “increase activity”)… Getting close to a page per second 24/7. :)

Stingrays Are Terrorists

Is it me, or do you think there might be a worldwide stingray terrorist campaign going on?

A leaping stingray stabbed an 81-year-old Florida boater in the chest, authorities said Wednesday, leaving its poisonous stinger lodged close to his heart in an incident recalling the one that killed Australian TV naturalist Steve Irwin last month.

Fire Department officials in Lighthouse Point, about 30 miles north of Miami, said James Bertakis was in a small recreational boat with two grandchildren Tuesday when the spotted eagle ray leaped aboard and struck him.

“It’s just a real freak thing,” Lt. Mike Sullivan told Reuters, saying the incident occurred on Florida’s Intracoastal Waterway, where stingrays are rarely seen leaping in the air.

“For an 81-year-old man he’s in really good shape,” Sullivan added, saying Bertakis was expected to make a full recovery after surgery at a local hospital to have the stinger removed from his chest.

“Crocodile Hunter” Irwin, 44, died when a stingray’s stinger punctured his heart off Australia’s north coast last month. It was one of only a handful of stingray fatalities on record.

http://www.cnn.com/2006/US/10/19/stingray.reut/

Random Email #30

Another random email I got…

i am a sculpturer working with hardwood.I am looking for fob.

That’s cool you are a sculptor… unfortunately you haven’t found fob, just fab. :)

Chargers A Top 3 Team

After breaking the top 5 last week on ESPN’s power rankings, they broke the top 3 this week. :)

http://sports.espn.go.com/nfl/powerranking?season=2006&week=7

Joe Theismann Doesn’t Know Jack

Since the Chargers are pretty much bad ass this year, I’ll continue posting stuff I run across

Seems all the experts are pretty smart… except for that Joe Theismann guy. He must be drinking again…

5. Who’s the favorite now in the AFC?

Allen: The San Diego Chargers are the best team in the AFC. They would be undefeated if it weren’t for some poor coaching decisions in their loss to the Ravens. There aren’t many weaknesses on this team. The one weakness teams thought they could exploit at the beginning of the season was quarterback Philip Rivers, but he has turned into a strength. This team is playing excellent, aggressive football and can play any style. If a team wants to try to get into an offensive shootout, the Chargers can oblige, and if an opposing team wants to play a smashmouth game with a lot of running, the Chargers can do that, too. But what separates them from the other teams in the AFC is their defense led by “Lights Out” Shawne Merriman. This defense has played great this season and is one of the best in the league.

Hoge: I’ve been saying it for weeks and my answer is the same — the San Diego Chargers. With their abilities they are as good as any team in football. They have the best young quarterback (Rivers), best tight end (Antonio Gates) and best running back (LaDainian Tomlinson). Rivers is making throws that no quarterback would even think of making. I’d put them as the best team in football even ahead of the Bears.

Salisbury: The Chargers are the best team in the AFC right now, and I’ll tell you why. They are being led by a young quarterback (Rivers) who is not playing as though he’s getting his first starts this season but instead is playing as though he’s a 10-year veteran. When he drops back to throw the ball, he drops with confidence, and he’s backing it up with the correct throws and check downs. There were some who thought it was a mistake for the Chargers to jettison Drew Brees in the offseason in favor of an unproven commodity, but Rivers has proved the Chargers correct. He’s utilizing every piece of talent on the field and looks great. He’s the reason the Chargers are the No. 1 team in the AFC.

Schlereth: It’s hard to argue with the San Diego Chargers. They are stout defensively and while they haven’t played great teams, they’ve handled their business. There is no other team in the AFC that can handle them. They are better offensively than the Broncos and I’m not thoroughly impressed with the Colts.

Theismann: The Indianapolis Colts are still the favorite in the AFC. They are undefeated and are winning games in different ways. Gone is the team that was soft and could win only in blowouts and in domes, and it has been replaced by a team that can win a smashmouth game late. The credit for that goes to Peyton Manning and offensive coordinator Tom Moore, who have responded extremely well to the departure of former running back Edgerrin James. Instead of trying to do the exact same thing they did in the past, Moore and Manning have changed up their game plans and made the team more deliberate, and we’re seeing the results in the record.

http://sports.espn.go.com/nfl/news/story?id=2627326

Mike Tyson To Fight Women

Hmmm… what the hell? :)

At a news conference at an Italian restaurant, Tyson said he would likely go just four rounds and that future stops on the tour might include bouts with women, possibly professional boxer Ann Wolfe.

Wolfe, from Waco, Texas, is 21-1 with 15 knockouts.

“She’s such a prominent, dominant woman in the boxing field,” Tyson said.

When asked if he was joking about fighting women, Tyson said, “I’m very serious.”

http://sports.espn.go.com/sports/boxing/news/story?id=2628718

San Diego Chargers vs. San Francisco 49ers

Did anyone happen to catch the San Diego Chargers’ offense take apart the 49ers? San Diego ended up winning 48 to 19… 4 rushing touchdowns by LT and 2 passing touchdowns by Philip Rivers.

UFC 64

I went to Vegas this weekend for UFC 64 at Mandalay Bay. I’ve never been to a UFC fight before, but man they are bloody. This is a picture of the second to last match tonight. Uhm, can I have some blood please? Thanks.

(The guy being picked up actually started with white shorts… no joke)

Google Code Search

Did I miss this somehow, or is this new?

Google’s Code Search is *really* handy for programmers. For example, say I wanted to see sample code that uses the preg_match() function in PHP, I could do this query:

preg_match lang:php

Neat!

The Beating

This guy can dance *and* hand out beatings… :)

Snort Wasabi

How in the hell did this guy not know what was going to happen if you do a line of powdered wasabi??? hah

New Business Model For Catching Movie Pirates

Well first of all, I was just checking this site out because this is probably the most amazing homemade halloween costume ever made, but it gave me a really good marketing idea for the MPAA…

They should just setup an affiliate program and pay affiliate marketers 25% of the fees they collect from the lawsuits/threats. Dude, I would be the biggest affiliate marketer for the MPAA in the world (seriously, I can guarantee that). Anyway, here’s a freebie for the MPAA (if they want to do an “under the table” affiliate program, they have my address for the check)… ;)

Nate used Photoshop to enlarge an image of Wolverine’s claws from the X-Men movie that he had downloaded.

Oh also, I would like to turn in Mark Cuban for movie piracy. :)

http://www.muc.muohio.edu/~natedogg/main.htm

I Have A Basement

This is a live webcam shot (well live as of this posting) of my basement. The only reason I think it’s cool is because the three important sides are backfilled now, so we can finally start digging the footings for the main house (the front side isn’t backfilled yet because the dirt from the footings will be put in there, and there’s nothing above it, so there’s no slab there).

Chargers A Top 5 Team

Looks like they broke the top 5 for the first time in a long time (well I dunno… maybe sometime last year) on ESPN’s NFL power rankings…

http://sports.espn.go.com/nfl/powerranking?week=6&season=2006

Lego Ice Cubes

How cool would it be to live somewhere that was below freezing? Then you could make 10 billion lego ice cubes and build a house out of them.

Dude, I think I might move to the Antarctic just so I could try it.

http://shop.lego.com/product.asp?p=EL502

Chargers vs. Steelers

To make up for the Padres’ loss today, the Chargers beat the Steelers today. The first half looked terrible for the Chargers, but after they let Philip Rivers do his thing in the 2nd half, they actually looked pretty good). The Chargers won this one with their defense and passing game and not their running game.

Padres Out

Well at least the Padres won *one* game this year (the Cardinals swept the Padres last year in the playoffs). Maybe next year we can win two games, and then the year after we could win three games finally. :)

Piracy For Sale

I know this is just one of those stupid examples where a company (eBay in this case) buys every keyword in Google Adwords that they can come up with, but it’s still kind of funny… :)

http://www.digitalpoint.com/tools/adsense-sandbox/?url=piracy

How The MPAA Launched My Blog

Someone pointed out something kind of funny/ironic… Since the MPAA decided to sue me, they have actually made my blog a few times more popular than their own site (mpaa.org). If you look look at the Alexa graph below, the green line is the old URL for this blog, the blue line is the new URL (when I switched over to my own domain) and the red line is the MPAA’s website.

The orange arrow coincides with the day I first heard about the lawsuit (and posted about it).

The odd thing is it actually looks like their site is getting less traffic over time (not a good direction to go). Maybe they would like to buy some advertising space on my blog for their anti-piracy propaganda? :) Hey, you never know… it could happen!

Marketing Lesson #1

Figure out how to get the MPAA to sue you.

100,000 Mile Warranty

I got a letter in the mail today that Hummer has put a 100,000 mile warranty on all 2007 vehicles. That’s cool… especially considering it was 36,000 miles before. I just got a free 64,000 mile extension on my warranty. :)

http://www.hummer.com/100kwarranty

I’ll Show You Tough…

Some guys from my gang of ninjas getting ready for a high profile mission we are about to embark on…

Teleportation Coming Closer To Reality

“It is one step further because for the first time it involves teleportation between light and matter, two different objects. One is the carrier of information and the other one is the storage medium,” Polzik explained in an interview on Wednesday.

The experiment involved for the first time a macroscopic atomic object containing thousands of billions of atoms. They also teleported the information a distance of half a meter but believe it can be extended further.

“Teleportation between two single atoms had been done two years ago by two teams but this was done at a distance of a fraction of a millimeter,” Polzik, of the Danish National Research Foundation Center for Quantum Optics, explained.

“Our method allows teleportation to be taken over longer distances because it involves light as the carrier of entanglement,” he added.

Quantum entanglement involves entwining two or more particles without physical contact.

http://www.cnn.com/2006/TECH/science/10/04/teleportation.reut/

Hard Gay Infiltrates Yahoo Japan

Japanese people can be kind of funny when they want to be… :)

Padres Lose

WTF is going on here? The Chargers lost on Sunday, and now the Padres lost today to the Cardinals in the first post season game of the year for them.

Oh well, whatever… it was an awesome day in San Diego, and we had awesome seats for the game (4th row, next to 3rd base). :)

Steve McNair

I don’t think you can appreciate my hatred of Steve McNair right now. I’ll just leave it at that.

Padres In The Postseason

Padres clinched a postseason berth today with their win over the Arizona Diamondbacks.

Now if I can just get some postseason dugout seats somehow, we’ll be all set.. :)

Suspicious Looking Device

Someone has a little too much time on their hands I think. :)

The only function of the Suspicious Looking device is to appear as suspicious as possible, whether carried in hand or placed indiscrimately in public places.

The SLD contains LEDs, a LED array, a character display, an optical distance sensor, capacitive touch sensor, buzzer, and motors.

http://junkfunnel.com/sld/

San Diego Chargers – Strength In Numbers

You know I have to repost great things I see about the Chargers, so… :)

THE FAVORITE

1. San Diego, 2-0
The funny thing about the Chargers: Every team has at least one serious flaw, but everyone wrote off the Bolts because of the “downgrade” at QB to Philip Rivers. You would have thought they were replacing Brees with Bruce Gradkowski’s illegitimate brother, Cliff. Rivers was the No. 4 pick in the 2004 draft, remember? The next seven picks were Sean Taylor, Kellen Winslow Jr., Roy Williams, D’Angelo Hall, Reggie Williams, Dunta Robinson, Ben Roethlisberger and Jonathan Vilma. He’s no stiff. I’d say it’s more probable that Rivers becomes a good QB right away over Indy suddenly figuring out how to stop the run, or the Bengals not getting killed by off-the-field stuff, or the Eagles making it to Miami without anyone who can run for a first down when they need one.

Of course, all of this is mitigated by two words: “Marty” and “Schottenheimer.” But you know what? We don’t have to worry about that for another four months. I think they’re the best team right now, and I think they throttle the Ravens in Baltimore on Sunday. And that’s why you rank the teams.

http://sports.espn.go.com/espn/page2/story?page=simmons/060929

Linksys WRT54G Flashed With DD-WRT

I found some bugs in the web interface for a Linksys WRT54G router I bought to fix some 2Wire “issues”. One of the bugs just would give me a false error when trying to do something and keep the form from being submitted.

Anyway, the short version of this entry is that I found out that you can flash your Linksys with an entirely new firmware. Ultimately, I just wanted to fix the bug so I could do what the Linksys is supposed to do to begin with. But after installing it, it looks like you can do all sorts of other interesting things… like run crontab processes (since it’s Linux).

Anyway, if you have a Linksys WRT54G (they are pretty popular), and you are a dork, you may want to give it a go… but don’t blame me if you screw yours up (mine was fine).

http://www.dd-wrt.com/dd-wrtv2/ddwrt.php