GT6 / Spitfire DIY alternator bracket improvement

Problem: Years back when I first did an alternator conversion on the GT6 the very rudimentary ‘pull it hard and tighten the nut’ fan belt tensioning method really annoyed me. It seemed there should be a way to achieve finite adjustment, and not risk noisy, slack or dangerously tight belt tension.

Solution: I don’t remember where now, but somewhere I saw a rigging screw (sometimes called a Turnbuckle). They are available in a load of sizes, lengths and materials from chandlers (sailing suppliers). So I used one of these to solve the problem. I then went on to sell them for a while on eBay under the name Mere Components. Continue reading “GT6 / Spitfire DIY alternator bracket improvement”

Flush the DNS Cache on Mac OS El Capitan (using a nice quick alias)

Updated June 2016: For OS X / 10.11 / El Capitan

Problem: I’ve updated some Name Server records on a domain and I want to check they’ve propagated using Dig. When I dig mydomain.com ns I keep getting the old results.

Solution: The local DNS cache on the machine needs to be cleared. As far as the OS is concerned, it’s already looked up that domain name and doesn’t need to do a fresh lookup until the domain record’s TTL (time to live) has expired.

On OS X 10.11 El Capitan there are two things needed. Firstly clearing the Directory Service cache and secondly forcing mDNSResponder to restart. This can be done using two commands in Terminal¹:

$ dscacheutil -flushcache
$ sudo killall -HUP mDNSResponder

Continue reading “Flush the DNS Cache on Mac OS El Capitan (using a nice quick alias)”

DIY Torque Wrench recalibration (with another one)

Problem: My old cheap Draper torque wrench was last used 7 years ago, and in that time I left it set to 40NM. Stoopid! Now I have no idea if it’s reading correctly and don’t want to risk snapping the studs on my head.

Solution: I borrowed a good (Digital Snap-On… oh my…) Torque Wrench from a mechanic mate to test mine against. Here’s the method that worked for me: Continue reading “DIY Torque Wrench recalibration (with another one)”

Get terminal / bash prompt to show useful info

Problem: Well it’s more of an irritation. My new hosting provider does allow SSH access, but when logged in the bash prompt looks like this, regardless of which account  I’m logged-in as, or where I am:

-bash-4.2$

What I want is for it to show something like:

username@server:/current/path$

Solution: The bash prompt can be customised via a profile script, ideally anything that loads when you log in like ‘.bash_profile’, ‘.bashrc’ or ‘.profile’. If one of these files doesn’t already exist in your home directory (check with ls -la ~ to list the contents) then create one. Here is an example of creating, editing and loading a login script to show a better prompt.

Continue reading “Get terminal / bash prompt to show useful info”

Homemade Triumph GT6 seat base diaphragm

Problem: Both rubber diaphragms under my Triumph GT6 (mk1) seats were shot, no longer able to support the seat base cushion squab thing.

Ripped and perished rubber seat diaphragm

 

Solution: Whilst these diaphragms are available (well, Mini ones are and they look pretty similar) I don’t want to spend £70 on a pair of new ones. Wife had an old summer wetsuit she didn’t want which looked perfect!

Continue reading “Homemade Triumph GT6 seat base diaphragm”

Updated for 1.2 & 1.3: Adding category depth tag to Shopp

Problem: I needed to display sub categories of a category in category.php but only one level deep. Using:

<?php if(shopp('category','hascategories')): ?>
  <?php while(shopp('category','subcategories')): ?>
    //display stuff
  <?php endwhile; ?>
<?php endif; ?>

…displays all subcast AND their subcats. Continue reading “Updated for 1.2 & 1.3: Adding category depth tag to Shopp”

Flush the DNS Cache on Yosemite (using a nice quick alias)

Problem: I’ve updated some Name Server records on a domain and I want to check they’ve propagated using Dig. When I dig mydomain.com ns I keep getting the old results.

Solution: The local DNS cache on the machine needs to be cleared. As far as the OS is concerned, it’s already looked up that domain name and doesn’t need to do a fresh lookup until the domain record’s TTL (time to live) has expired.

On OS X Yosemite there are two name resolution caches that need emptying, Multicast DNS and Unicast DNS. They can be cleared / emptied / flushed using two commands in Terminal:

sudo discoveryutil mdnsflushcache
sudo discoveryutil udnsflushcaches

Continue reading “Flush the DNS Cache on Yosemite (using a nice quick alias)”

Homemade 6v Conlog type alarm fob battery.

Problem: A few old 90’s alarm key fobs use 6 volt batteries made up of 4 separate 1.5v button cells. Last year I needed one quick-like – same day – for the Golf Mk3 I’d just bought. There are plenty online, eBay etc, for about £5 to £10 but I couldn’t wait 2 days for one.

Solution: Nipped down to the Pound Shop and bought an assorted selection of hearing-aid button cell batteries for a quid! Taping four AG3’s together with Sellotape or Electrical Tape didn’t make a good enough electrical connection between the cells. Turns out a piece of Heat Shrink tubing, placed over all 4, then gently shrank (shrunk?) with a lighter forces the cells together nicely! After this is done, trim the top and bottom of the tubing to make sure the battery contacts are able to make connection. Continue reading “Homemade 6v Conlog type alarm fob battery.”

Replacing Golf VR6 Mk3 rear light seals, fixing a leaking boot.

Problem: The boot of my 1996 Golk mk3 VR6 has been leaky since I got it last year, and this autumn and winter it’s beginning to get out of hand and make the car all stinky and damp!

Solution: After removing every piece of trim and carpet in the boot area, it was clear that water was getting in around the tail light cluster / unit seals. The part number for these seals or gaskets is 1H6 945 191, and they can be ordered from a VW dealer parts desk for about £20 a pair. I wanted mine a but quicker than the dealer could do it so went to a Trade Parts Specialist who ordered them in for me next morning by 8:30am.

Here’s how to fit them… Continue reading “Replacing Golf VR6 Mk3 rear light seals, fixing a leaking boot.”

Remove ‘ul’ and ‘li’ tags from WordPress menus while retaining all the classes

Problem:
I need to output a WordPress nav menu as a series of anchors surrounded by spans, within one nav element. Manipulating the args passed to wp_nav_menu() function will allow the <ul> element to be removed, and passing the output through ‘striptags’ can remove the <li> elements, but I end up losing all the link ancestry classes.

Solution:
If a ‘Walker’ class is used, the output from wp_nav_menu() can be controlled totally. Here’s an example that removes the list elements, adds a span around each item link, and adds the possibility of a separator string between each menu item.

Add to your theme / header / etc: Continue reading “Remove ‘ul’ and ‘li’ tags from WordPress menus while retaining all the classes”