John Herrell's Blog

Good Code

by John Herrell on 28. January 2011 09:33

So, our friends over at xkcd supply the content of the day

Tags:

Geek Speak | Humor | Programming

It is upgrade time again - BlogEngine.NET 2.0 Released

by John Herrell on 27. January 2011 12:54

Well, BlogEngine.NET 2.0 has finally been released.  Here is the official release.  One of the most notable updates in this release is that BlogEngine.NET has made the leap from .NET 2.0 to .NET 3.5.  For a list of new features in BlogEngine.NET 2.0, visit here.

So, as soon as I get off my butt, I will upgrade my current version from 1.6.1.0 to the new 2.0.0.44 release.

There are a few good articles over on RTUR.net that you may want to look into:


As I delve into the upgrade, I'll take some notes and screen shots and let you know how I overcome any issues.

Tags: ,

Geek Speak | Programming

Robots.txt fun

by John Herrell on 19. January 2011 14:50

Most sites contain a web server file called robots.txt, which is used to instruct spiders to ignore certain directories on the site.

If you’ve never heard of robots.txt files before, they’re simply a  text file placed on a web server containing a set of rules to control how web spiders crawl a site.  These files were developed in 1994 by Martijn Koster.  Even those these robots.txt files can now be found on most websites, they are rarely viewed by humans.

These little files have been known to hold small easter eggs from time to time.  This brief article points out a few of the most well known hijinks and shenanigans of the robots.txt file.

Last.fm

Unlike other websites, Last.fm’s robots.txt file includes additional instructions in the form of Isaac Asimov’s famous three laws of robotics:

  1. A robot may not injure a human being or, through inaction, allow a human being to come to harm.
  2. A robot must obey orders given it by human beings except where such orders would conflict with the First Law.
  3. A robot must protect its own existence as long as such protection does not conflict with the First or Second Law.


User-Agent: *
Disallow: /music?
Disallow: /widgets/radio?
Disallow: /show_ads.php

Disallow: /affiliate/
Disallow: /affiliate_redirect.php
Disallow: /affiliate_sendto.php
Disallow: /affiliatelink.php
Disallow: /campaignlink.php
Disallow: /delivery.php

Disallow: /music/+noredirect/

Disallow: /harming/humans
Disallow: /ignoring/human/orders
Disallow: /harm/to/self

Allow: /

Google

In October 2008, Google slipped a hidden message into the rules of their robots.txt file for Halloween:

User-agent : zombies

Disallow : /brains

The change was covered by Google’s Web Spam expert Matt Cutts in his personal blog

Reddit.com

Finally,we come to the robots.txt file for the site www.reddit.com.    Hidden in the text are instructions to two popular robots, Futurama’s own Bender, and Gort from the 1951 film, The Day the Earth Stood Still.


# 80legs
User-Agent: 008
Disallow: /

# MSNBot
User-Agent: msnbot
Crawl-Delay: 20

User-Agent: bender
Disallow: /my_shiny_metal_ass

User-Agent: Gort
Dissalow: /earth

 

So, how much fun have you had with these files?

Tags:

Geek Speak | Humor | Programming

Installing the Sharepoint 2007 Extensions on my Workstation

by John Herrell on 13. August 2010 08:39

SharePoint 2007 can only be installed on the Windows Server family platform. As a developer, I need to be able to develop on this platform.  However, my development platform is currently either XP/Vista/7 based running VS 2008.  What doesn’t make any sense to me is that all the tools require WSS to be installed locally, on a 2003/2008 Server platform.

The recommendation for MOSS development was always to get a VM to run W2k3 with MOSS and Visual Studio.  Ok, so what do you do if you do not have the time to build such a platform, or what if you do not have access to a server OS.

If you try to install the Visual Studio 2008 Extensions for Windows SharePoint Services 3.0 Tools (VSeWSS) on a workstation you’d probably fail and get the following error: “This product can only be installed if Windows SharePoint Services 3.0 has been installed first”. So the only thing we can do is either conform to the VM path, or we can hack the installer into thinking MOSS is installed.  We are going to hack!

You might as well make sure to download the latest extensions installer. I installed the Visual Studio 2008 extensions for Windows SharePoint Services 3.0, v1.3 - Feb 2009 CTP on my work machine.

Before continuing into opening the Regedit tool, be aware that messing around with the Windows registry is not supported, and not recommended by Microsoft.  However, being a computer nerd, I don't give a poop.  I can always fix it Cool

Now open the regedit.  My work environment is running Windows 7, so I have to make sure to open regedit and run as an administrator.

Make a quick backup of the registry, just in case. If you do not know how to do this,  Do not pass GO, do not collect $100.  Honestly, if you cannot make a registry backup or do not feel comfortable hacking the registry, you probably should not continue.  That was my only warning.

Create the following keys and the string value:

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\12.0]

"Sharepoint"="Installed"

Tada!  Now when we run the installer, the installer has been tricked into believing that we have Sharepoint Services installed locally. 

I also recommend adding the SharePoint and MOSS assemblies into the GAC. The assemblies can be found in any SharePoint server under the C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\ISAPI folder.

Tags:

Geek Speak | Programming

How to Avoid Being the Asshole Architect

by John Herrell on 10. August 2010 12:44

Here is an interesting, but true, article on how NOT TO BE the asshole architect at your organization.  Too often more than not, architects do a piss poor job at following the 7 principles this author has pointed out.  I have been known to architect solutions in that role and always try to act accordingly and take the developer's perspective into mind. I personally recall one or two instances where an architect broke several of these rules when dealing with my development team. Believe it or not, it took several years for those wounds to heal enough for my team to feel comfortable working with this individual.

Check out this article, it is quite good. CLICK HERE FOR THE ASSHOLE ARCHITECT ARTICLE

Tags:

Geek Speak | Programming

Adding Meta Tags in DotNetNuke

by John Herrell on 9. July 2010 13:55

Ok, so I am doing some development with Open Source products such as DotNetNuke or DNN.  As I figure out some tricks, I may occassionally post them here in my blog for everyone to use as a reference.

If you wish to add a meta tag in DotNetNuke, here the step to do it.

Go to Admin tab –> Page –> Click the page (home tab, for instance) –> the Page Settings –> Advanced Settings –> Page Header Tags

Enter the content you need.  Here is an example:

<meta name="example" content="example" />

Tags: ,

Programming | DotNetNuke

BlogEngine.NET SPAM filters update

by John Herrell on 2. July 2010 08:32

Well, as you probably know, I utilize BlogEngine.Net, for my mediocre blogging needs.  My needs are somewhat mediocre, but I feel that this tool can sufficiently provide the functionality that some business owners may desire.  Of course, there is always some customization.

Four days ago, I upgraded the blog to the latest stable release.  I was pleased to see that the latest stable release 1.6.1.0 has some included features for ReCaptcha and AkismetFilter, along with a better interface for managing comments.  As a software engineer, I found the upgrade process simple, however, somewhat dissapointing due to a couple of small bugs I encountered.  Not a biggie though.

!!!Results so far!!!

So far, the combination of filters I am utilizing are stopping 100% of the SPAM.

Filters:

  • StopForumSpam - a filter that is built into the blog engine and does not allow any configuration
  • ReCaptcha - that annoying little thing that makes you put in words that are a bit fuzzy and hard to read
  • AskimetFilter - this filter is the same one used on countless numbers of WordPress blogs.

 

I have my moderation settings set to automatically moderate comments based on the filters.

Now, I will be the first to admit that I do not have a lot of people leaving comments on my posts.  I get roughly four to five thousand hits a month on this blog, most of those are probably from me.  However, I was averaging around 10 spam comments per day.  So far, so good.  I can honestly say that the settings and filters I am using are currently catching 100% of the SPAM attempts, and that no SPAM comments have been posted live.

Well, I will keep an eye on it and report my findings later in the month.

Hope this helps someone.

Tags:

Geek Speak | Programming

BlogEngine.NET upgrade from 1.5.07 to version 1.6.1

by John Herrell on 29. June 2010 05:20

Well, it came time this morning to upgrade this Blog engine.  I am continuing to use BlogEngine.Net, as it has all the features I was require. 

Here is what I went through, and some tips and techniques to get around the issues I saw.

First, download the 1.6 source from here. In addition, download the 1.6.1 web version. Unzip both of these and place into folders where you can find them.

I started out by finding the install information for MySQL in the 1.6 source code and ran the appropriate script to upgrade the MySQL database for this new version.  All the proper casing was used in this upgrade script, so there were no issues there.  Then, you need to take the MySQLWeb.config file and replace the projects default web.config for that.  Replace the connection string information with that belonging to your database information.

I also took this time to upgrade the MySQL Connector to the latest one.  I downloaded this connector (version 6.2.3) and installed it onto my machine.  Update the web.config to reflect the new connector.

Now it was time to fire up an ftp program and get to work.

Delete the entire "ExtensionManager" sub-folder in the App_Code folder on the server.

I manually uploaded and overwrite all root folders individually.  I do not want any chance of having to figure out the permissions on my hosting server once again.

Once you are done, test it out.

Now, follow the advise on this page to upgrade to 1.6.1.

OK, now what?

Time to add ReCaptcha and AkismetFilter.  I was using a custom installation of ReCaptcha with the previous version of BlogEngine, so I already had my keys. 

Information for using ReCaptcha is here.  I encountered an error after using 1.6.1 with the ReCaptcha.  It was giving me a callback error through a javascript prompt.  I resolved this by setting the logging setting of the ReCaptcha settings to 0.  I have contacted BE regarding this.

I setup my comments for manual moderation and enabled AkismetFilter.  Time will only tell how well this will block the SPAM.

Hope this helps someone.

Tags:

Geek Speak | Programming

About John

What can I say? I am a geek and more. I write software for a living, can't get too much geekier I guess.  I love to be a geek but I am also somewhat of a greaser. I love cars, trucks, and motorcycles, chassis fabrication, bodywork, and painting.

Some folks don't think the combination of geek, mechanically inclined, and artistically inclined blend well together, but that is who I am. If I was wired any differently, I wouldn't think the way I do, and be able to perform the type of work I do day-to-day. If I am not at work, I am either working out or working on something automotive or motorcycle related.

This blog does not focus any any particular aspect of my life.  You never know what I'll post, but I will try to keep it interesting.more to come later...

@@@John

Month List

RecentPosts

Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.