Tagged: Tech

Firefox Browser Cache

FYI – to set Firefox to check for a new version of a page at every visit:

  • Enter about:config in the address bar
  • Change the value of browser.cache.check_doc_frequency to 1

WordPress – Intro Page

I had a client that, despite my protestations, wanted a “Intro” page for his website – a landing page with a large clickable image and (gulp) embedded autoplay sound. His site was already set up and live in WordPress, and it already had a static homepage… and it was installed at the root of his site.

Aside: We’re using WordPress as a content management system rather than a blogger. I’ve discovered that, for the average small business/site, full blown CMS solutions such as Joomla, Drupal and MODx (the last being my preferred choice) tend to be overkill. The bells and whistles that these packages contain may get developers excited, but in my experience they simply overwhelm the average client. It’s akin to giving someone Photoshop because they need to re-size some images. WP is stable, mature, relatively slick, and probably the easiest to use. I wish I had the time to redo all of my CMS clients sites in WP.

So what I needed was an opening page that didn’t utilize the site theme.  That last bit’s the kicker.  You can’t just change the index page, or set up .htaccess to re-prioritize the directory index (if you were thinking you’d drop a static index.html page in there and leave WP’s index.php) – both actions turn WP’s navigation kludgy.   An option would be to export the theme and database, reinstall WP somewhere other than the root, put your index page in the root,  modify your theme and DB data to correct pointers  and URLs, and import it into your new install… but that sure sounds like a lot of work, doesn’t it?

Here’s what I did instead:

  1. Created a php page in the root of the activated theme (wp-content/themes/THEMENAME/).  Doesn’t matter what the name of this page is.  I named mine front.php because I’m not very creative.
  2. The first line of this page is this: <?php /* Template Name: New Template Name */ ?>. (Change New Template Name to whatever you like)
  3. Beneath that line is the code that comprises the landing page.
  4. Within WordPress, I created a static page named Landing.  Doesn’t matter what you put in this page – it isn’t going to show on the site.  I put a note to my client, explaining that he would have to contact me for changes to the landing page.  Set the Template for this page to New Template Name (meaning whatever you changed the template name to in step 2).
  5. I then changed the Front page by heading to Settings, Reading and changing Front page displays to Static, Front page=Landing.

That’s it.  Obviously, make sure to put a link from the landing page to whatever your WP homepage is (in this case ?page_id=6).

There – that beats the alternatives, no?

Perl 64bit on Windows 7 – ARGV problem

Friday I rebuilt my work machine to Windows 7 64bit in preparation for the 8 gig of RAM headed my way (thanks boss!).  I also installed the most recent release of Activestate Perl 64bit.  Upon getting back down to business I discovered that none of my scripts were successfully receiving command line arguments.  If I prefaced the running of the script with perl.exe (eg: c:\perl54\bin\perl.exe e:\scripts\myscript.pl argument1 argument2) it worked fine.  Turns out this is a simple registry fix.

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\pl_auto_file\shell\open\command]
@=”\”C:\\Perl64\\bin\\perl.exe\” \”%1\” %*”

Is all you need.  Dump that into a text doc and change it to a .reg file.  Double click it and let it insert into your registry and you’re good to go.  For some reason the Perl installer sets the variable acceptance (that’s this bit you see above: “%1” %*) correctly for the file extension .pl, but misses it on the required pl_auto_file.

Silly.

Written by Comments Off on Perl 64bit on Windows 7 – ARGV problem Posted in Tech, Work Tagged with

Successfully tethering my AT&T Blackberry Bold for modem use

Every time I’d rebuild my laptop I’d forget how to do this, and every time I’d finally figure it out again I’d promptly forget to save the instructions.  No longer!

  1. Firstly, download and install the Blackberry Desktop Software – it’s an unfortunate requirement.
  2. Plug in the Blackberry and let it communicate with the desktop software. Enter in password if necessary.
  3. Verify the modem is functioning:
    1. Go to Control Panel -> Phone & Modem Options.
    2. In the Modems tab, you should see a new Standard Modem on a new port. Click Properties -> Diagnostics -> Query Modem. It should spit back some affirmative verbiage.
  4. Click Properties -> Advanced and add the following Extra initialization commands: AT+CGDCONT=1,”IP”,”wap.cingular”
  5. Now you need to create a new internet connection thusly:
    • XP: Click Start -> Connect To -> Show all connections -> Create a new connection.
    • Windows 7 (and maybe Vista?): Click Start -> Internet Options -> Connections Tab -> Add -> Dial-Up.
  6. Enter *99# for the phone number.  Leave username and password blank.  This connection won’t work yet (Windows 7 will unavoidably try to test it in order to allow you to save it.  It’ll fail – save it anyway).
  7. Now the networking has to be configured:
    1. Click Start ->Network Connections ->”BlackBerry Modem” (or whatever it is named).  In 7, click Start -> Control Panel -> Network and Sharing Center -> Change Adapter Settings -> right-click the appropriate adapter.  Apparently one of the improvements in 7 (and Vista) is the further burying of settings.  Awesome.
    2. Click Properties.
    3. Click the Networking Tab.
    4. Select Internet Protocol (TCP/IP).
    5. Click Properties.
    6. Click Advanced.
    7. Disable Use IP Header Compression.
    8. Click OK.
    9. If you see Enable Hardware Flow Control, uncheck it.
  8. That should be it – give it a go!
Written by Comments Off on Successfully tethering my AT&T Blackberry Bold for modem use Posted in Tech Tagged with