Nicholas Head

Filter by APML

Hacking DasBlog

by Nicholas Head 27. June 2007 03:44

I noticed this morning that some of my older posts were getting crazy out of hand with their referrer lists. Some of them, even compressed with GZIP, were spitting out over 300k of content. That’s stupid!

So, in order to speed things up for regular browsers of my blog, I hacked a bit of the just-released version of DasBlog, specifically in the newtelligence.DasBlog.Web.Core project, the Macros.cs file… adding this code around line 3130:

   1:  if (requestPage.Request.UserAgent != null)
   2:  {
   3:      if ((trk.PermaLink.IndexOf("q=") > -1 | trk.PermaLink.IndexOf("p=") > -1) &
   4:          (requestPage.Request.UserAgent.Contains("Googlebot") |
   5:          requestPage.Request.UserAgent.Contains("Yahoo! Slurp") |
   6:          requestPage.Request.UserAgent.Contains("Yahoo-Blogs") |
   7:          requestPage.Request.UserAgent.Contains("Ask Jeeves") |
   8:          requestPage.Request.UserAgent.Contains("BecomeBot") |
   9:          requestPage.Request.UserAgent.Contains("msnbot")))
  10:      {
  11:          // Let it happen.
  12:      }
  13:      else
  14:      {
  15:          continue;
  16:      }
  17:  }

This will see if the user-agent matches a common bot’s, and if it does, allows the code to continue building up the referrals list. Otherwise, it skips through them all and is completely empty.

But at the end of the loop, you need to check for the item count to be 0. If it’s zero, we know that we have no referrers to show, so we need to clear out the placeholder’s content (since it will contain an empty “Referred By:“ literal control:

   1:  if (count == 0)
   2:  {
   3:      placeHolder.Controls.Clear();
   4:  }

And there you have it, you’ve hacked DasBlog.

Update: Don’t listen to me. This is what Google calls “cloaking” and it’s a sure fire way to kill your pages (and get them thrown into Google’s “supplemental index”.) This is really lame. Yet Google themselves does “cloaking”. Seems a bit hipocritical.

As it stands right now, a majority of my blog’s search results are in the supplemental index now, probably because of my hack. And there’s no way I’m turning referrers back on (the pirates of the caribbean 3 blog entry I wrote is almost 600K gzip’d to the client because of all the referrers) — so I’ve turned referrers off completely. My loss, I guess.

Technorati Tags:
Bookmark and Share

Tags:

tweak

How To Reset Windows Explorer's View Settings Under Vista

by Nicholas Head 5. June 2007 07:11

Reset-windows-explorer-view-settings

Windows-Now.com has an excellent write-up on how to reset the view settings under Vista. It is not exactly the same as it was in XP! In XP, the “Reset All Folders” button worked literally for every folder. Under Vista, it only resets the current “type” of folder you’re looking at. For example, you could be in a “picture” type folder, and will only be resetting all folders that Vista determines contains pictures.

Also, if you want to get rid of the auto-type-sensing functionality altogether, they have another article on how to do just that.

Bookmark and Share

Tags:

Microsoft | tweak | windows vista

2007 Nissan Altima Navigation System, Hacks, etc.

by Nicholas Head 16. May 2007 04:08

2007 Nissan Altima Navigation SystemSome of you may know that I recently purchased a 2007 Nissan Altima 3.5SL, fully loaded, including a navigation system. In general I like the navigation system, but there is definitely some spots that are lacking. Here’s my likes/dislikes so far:

  • Con, I’ll start with the biggest con of all, and the one thing that has frustrated me the most with this unit. You can’t use most of the buttons on the screen while the vehicle is moving! Forget the fact that a passenger may be sitting next to you, perfectly capable of programming the unit while you drive. No way. Can’t do it. You must stop the car to enter a new address, etc. 98% of the functionality is just disabled when your car starts moving. My previous navigation system, a Magellan Roadmate 700, did not have this behavior, nor does my mother’s TomTom navigation unit. I asked the dealership if this “feature” could be disabled, but they firmly said no, it’s for my own safety. Gee, thanks. Luckily there are people (such as a fellow named gtcompscientist) who have figured out what wire leading to the back of the unit provides this functionality, and have shown simple switch-workarounds for it. I’m tempted to do it on my own car..
  • Pro, The screen is large, and bright enough during the daytime to easily see. The car has an “auto” light setting, for my headlamps, and it ties into the navigation system to dim my display when it’s night time.
  • Pro, I really dig the “3D” view that the system offers. It also can switch to the traditional 2D view if necessary, but I hardly find myself doing that.
  • Con, The screen updates “slowly”. I’d say once every second or so. In 3D mode, this feels like an eternity, where I’m spoiled by redraw rates on other devices, such as my computer. There also is considerable jaggie-ness going on. Some antialiasing wouldn’t have hurt…
  • Pro, The system comes with quite a few points of interest pre-loaded. I don’t know the exact number, but it’s found nearly 90% of the random places I’ve thrown at it. There are some newer developments (built in the past 2 years) that it doesn’t know about yet, but I’m sure a newer DVD will come out.
  • Con, The system doesn’t do text-to-speech at all. Just provides the turn signals.
  • Pro, The turn signals are excellent, and the screen even shows a preview of what the upcoming off-ramp, intersection, turn, etc. will look like. Pretty darn accurate, too. Helpful for those times where you need to get off the freeway, but stay in the left lane on the off-ramp, etc.
  • Pro, XM traffic integration. If you drive through traffic every day, you owe it to yourself to get a system that has traffic integration. I’ve routed around slow traffic at least four times so far, and avoided an accident scene because of it. Whew.

And that’s just what I thought of right now. More to come as time progresses…

Bookmark and Share

Tags:

personal | rant | technology | tweak

Missing Thumbnails For Videos in Windows Explorer (Vista)

by Nicholas Head 11. May 2007 01:53

Scott Hanselman wrote another article about thumbnails disappearing from Windows Explorer under Vista. I had this same problem happen to me a short while ago, and ended up giving up on the solution, since I was going to reformat my system in a few days anyhow. Kinda lame that Windows doesn’t automatically repair itself when this happens, but anyways…

He’s offering a registry patch to try and fix the problem. It appears to boil down to a ShellEx registry key value, as well as potentially a PerceivedTypes registry key, found under each file type’s extension.

He recommends downloading the CCCP (Combined Community Codec Pack) to handle almost all video/audio codecs you’d ever stumble across. I’m usually apprehensive about codec packs, since they tend to be overzealous and do more harm than good, but the CCCP seems well-rounded and thought through.

Bookmark and Share

Tags:

bugs | Microsoft | tweak | windows vista

Catching Up

by Nicholas Head 18. January 2007 07:41

So much to go over… hrm. Let’s see.

Well, I bought a new car, a 2007 Nissan Altima 3.5SL, fully loaded. It’s dark blue. Yep yep yep.

2007NissanAltima

I love it so far, no complaints. And it gets great gas mileage.

Life is busy, but good. My review is any day now, so cross your fingers, pray, or do whatever it is you do to impart good wishes upon someone else, please!

I returned my Zune, but not for the reason(s) you think. I did so in order to help pay my down payment on my car. I’m also selling some other things.. debated selling my XBox360, but decided to keep it for now. I plan on buying the HD-DVD drive later on to enjoy movies on… and I’m sure by the time I get around to it, it will be cheaper than the current $200 price tag.

And now, for some completely random stuff that I think is way cool.

  • Chris Pirillo’s wedding reception music. I like the list, and it’s sometimes hard to find a well-thought out selection. I’m keeping it for ideas on my own wedding..
  • Vanishing Point, an online challenge/game by Microsoft, for a buttload of prizes. Microsoft started it off in Las Vegas, taking over the Bellagio’s fountains to give away clues to solving the first “box” of puzzles. Check out the video from that event! Crazy. I love how they synchronized everything.. the lights, the water, the projections.. heh.
  • BauerCount.com, a website that aims to list every person that Jack Bauer kills while saving our country’s butt. The details are amazing, listing the weapon and method used, as well as including video and pictures. Almost a bit too fanatic, hrm? But awesome.
  • Disneyland now has a special “night-time” mode for the Space Mountain and California Screamin’ coasters. Who doesn’t want to rock out to the Red Hot Chili Peppers while riding a coaster? “Higher Ground” is supposedly on Space Mountain, and California Screamin’ plays “Around The World”, kind of like the Disneyland commercials are now…
  • Speaking of Disneyland, I found a site detailing Club 33 in its entirety. It’s that door next to the Blue Bayou, with the “33” plaque next to it. Maybe you never noticed it?
  • Bruce Campbell smells good, thanks to Old Spice. If you have it, you don’t need it. If you need it, you don’t have it. If you have it, you need more of it. If you have more of it, you don’t need less of it. You need it, to get it. And you certaintly need it to get more of it. Just watch. Bruce is awesome.
  • Season 3 Battlestar Galactica bloopers! (PG-13 rated) I don’t get the random Bush stuff thrown in there, but whatever. Pretty funny if you’re a fan of the show.
  • If you’re making minimum payments on your loans/credit cards, you’re dumb. Use this online calculator to see just how much money you’re throwing away. Really opened my eyes a bit. Even paying just $10 more a month will help lots in the long run.
  • JkDefrag — one of the best freeware defragmentation programs for Windows 2000/2003/XP/Vista that I’ve ever come across. It’s now replaced Microsoft’s defragmenter on all of my machines. Why buy a product like Diskeeper (which helps fund Scientology, by the way) when you can get something better for free?
Bookmark and Share

Tags:

disney | humor | Microsoft | personal | technology | tweak | windows vista | Zune

iTunes and Windows Vista; not so good.

by Nicholas Head 26. November 2006 05:20

Update: Please check out my other entry involving poor speed in general with iTunes 7 and Vista.

Running with the default Vista installation, you get a feature called User Account Control, which basically lets you be an Administrator on the machine (like you were by default in XP), but every program you run will run in the context of a normal user, in order to prevent programs from having too much access to parts of the operating system, say, a virus or spyware.

It seemed to work okay, only running into a problem with a few programs. There's an option for programs that won't behave that can force the program to run as an administrator, and that usually takes care of the problem. iTunes, though, complains that it's in "compatability mode". Also, every now and then inside of iTunes, it will pop up an error saying that it could not write to the iTunes library. This causes you to lose any new files you just added, etc.-- major bummer.

Searching Google for iTunes and Vista doesn't really yield any valuable results, and I have to run iTunes.. just no way around it for my iPod.. so I had to disable UAC. I probably was going to disable it anyway, being a "advanced user", but for typical PC users, I can see UAC being a great tool in preventing bad software from affecting your operating system.

Anyway, hopefully this blog entry is helpful to anyone else who stumbles on this problem, and hopefully Apple's next version of iTunes takes care of the problems..

Bookmark and Share

Tags:

technology | tweak | windows vista

Windows Vista; Start menu slow to navigate?

by Nicholas Head 24. November 2006 20:31

This past weekend, I wiped my laptop and main machine clean at home and installed the final version of Vista, available from MSDN if you have a subscription.

I'm loving it so far, but I ran into some hard drive problems along the way.. namely one of my hard drives dying in the middle of installing iTunes. Joy! Not Vista's fault, though.

Anyway, Vista's start menu is completely different from XP, and by default always shows the top used applications. You have to click "All Programs" to see your full start menu. And the view then switches to a single scrolling list, with folders that expand inside this list. What's been driving me crazy is that clicking/hovering to open the start menu folders takes seconds. CPU usage goes to 100%, and the start menu becomes sluggish while this happens. Then the folder opens. Unacceptable.

I did a search on Google, and funny enough, people have been having this problem since early betas of Vista. It's crazy that it hasn't been fixed in the final, but here's hoping Microsoft releases some quick fix later on, and preferably before the January public release, hrm?

In the meantime, like that forum post suggests, if you go into your start menu options and turn off the highlighting of new programs, it solves the problem. I'm guessing that Vista is trying to look up the "last modified date" of every start menu item on the fly, and that's causing the delay?

Bookmark and Share

Tags:

technology | windows vista | tweak

Are you moving or looking to move soon? Don't hurt your back shifting boxes around-- use HireAHelper to Book Movers Online!

Log in

Powered by BlogEngine.NET 1.6.1.0