Slow Windows Load Time

Posted in Technical Issues, Tricks on October 14th, 2008 by Ryan

I’m trying to solve a problem where my computer at work takes forever to become usable after logging onto windows.

Edit: For lazy people, the end result was mapped drives were slowing boot time significantly. The following tweaks helped only with the delay between logging in and seeing the taskbar.

First thing I tried was various performance tweaks from TweakXP.

Read more »

Useful hMailServer Tips & Tricks

Posted in Technical Issues, Tricks on October 8th, 2008 by Ryan

Tricks

Spam

Dealing with Problems

Work on sites before the DNS has rolled over (by editing the hosts file)

Posted in Programming, Tricks on September 29th, 2008 by Ryan

Important: This does not work if you are behind a proxy, which includes antivirus firewalls and such.

  • Right click on the hosts file in C:\Windows\System32\drivers\etc
  • Go to properties, turn off “read-only
  • Open the file using Notepad or any text editor
  • Add a line to the bottom of the file with the IP and domain
  • When you are done, don’t forget to turn read-only back on again

Ex.

200.200.200.200  thedomain.com

Use the IP of the new server and then the domain you want that IP to resolve to.

Now you can browse to that domain and it will resolve to the new IP even though the DNS hasn’t been updated yet.

Speed up Magento by ~235%

Posted in Tips, Tricks on September 10th, 2008 by Ryan

What:
There’s a feature called “gzip” that’s installed by default on most web servers. Modifying your site to make use of it can really speed up the performance.

How much faster?
Try the quick and easy mod_gzip tester by WhatsMyIP.org. Just enter the URL and it will tell you how much faster it would be.

How to enable it for Magento

One of the drawbacks of Magento is currently its speed if default configuration is used. There are certain ways of making it run faster. The best one is to enable GZip compression by changing .htaccess file a little. You just need to uncomment part of the code. In my case, the speed increase was exactly 235%. Read more »

Replacing your main hard drive is actually really easy

Posted in Tips, Tricks on February 8th, 2008 by Ryan

I recently had to swap out a hard drive on a perfectly good computer here at work. I needed to do this quickly, so I found out about Acronis True Image. This program lets you make a bootable disc that lets you clone one hard drive to another (so you can then remove the old and leave the new in), or you can backup in windows and then restore via boot cd.

The boot cd restore process is quite nice. You can even browse your network to find the backup files on another computer! So if you were thinking of upgrading your Windows (or whatever) drive with a Raptor or something, this would make it extremely painless.

Easy Windows Explorer Tweak

Posted in Tricks on February 1st, 2008 by Ryan

You can make Windows Explorer start in whatever folder or drive you want! I always found it really annoying how it would start in “My Documents”, which after a while has so many subfolders in it that you have to scroll and find My Computer, and the drive you want to get to, etc.

This is EASY.

  1. Right click on the shortcut you use for Windows Explorer and go to properties.
  2. In the “Target path:” field on the “Shortcut” tab, add the following to the end of whatever is there: /e,c:\

Your end result should look something like this:

%SystemRoot%\explorer.exe /e,c:\

Note: Change the c:\ to whatever path you want Windows Explorer to start at.

Backup solution with WinRAR and a batch file

Posted in Tricks on January 13th, 2008 by Ryan

I wanted to make the perfect manual backup solution in a batch file, so here’s the code. Just make a file called backup.bat and paste this text into it. You might have to change a few of the file paths and stuff though.

What it does:
- Offers to make an exact copy of what files exist now, or lets you continue and add new files that aren’t in the backup archive yet (assuming it’s you’ve ran it before)
- Lets you pick a file name once at the top rather than having to type it in multiple places.
- Uses a password protected archive.
- Will make another copy the backup file to another location by default for added safety.

Note: I think I had to make a %path% variable (or whatever those are called) to the WinRAR folder, and I don’t exactly remember what I did. It was really easy though.

@ECHO off
SET varFileName=EnterFilenameHere

cls
:start
ECHO *********************************************************
ECHO *         Start a fresh backup? Press Y or N.           *
ECHO *                                                       *
ECHO *      You should do this every once and a while,       *
ECHO *                but not all the time.                  *
ECHO *********************************************************
ECHO.
set choice=
set /p choice=Choice:
if not ‘%choice%’==” set choice=%choice:~0,1%
if ‘%choice%’==’y’ goto yes
if ‘%choice%’==’n’ goto no
ECHO “%choice%” is not valid please try again
ECHO.
goto start

:yes
ECHO ******************** Fresh Backup ***********************
ECHO.
DEL D:\Backup\”%varFileName%”.rar
goto end

:no
ECHO *********************** Update **************************
goto end

:end
ECHO.
ECHO                Cougar Design Backup Wizard
ECHO.
ECHO *********************************************************
ECHO *                                                       *
ECHO *        Choose your password for the archive.          *
ECHO *                                                       *
ECHO *********************************************************
ECHO.
rar a -u -r -rr10 -rv20 -s -hp -m1 D:\Backup\”%varFileName%”.rar @C:\Backup\”%varFileName%”.lst
ECHO.
ECHO *********************************************************
ECHO *              Time to make a 2nd backup!               *
ECHO *********************************************************
ECHO.
xcopy D:\Backup\”%varFileName%”.rar E:\Backup\”%varFileName%”.rar /y /i
ECHO.
ECHO *********************************************************
ECHO *                       Complete!                       *
ECHO *        This will close when you press any key.        *
ECHO *********************************************************
ECHO.
PAUSE

Shorter nested IF statements in Excel

Posted in Programming, Tricks on November 27th, 2007 by Ryan

This code checks to see if A1 equals the letters K, H or L.

Instead of using:

=IF(A1="K",TRUE,IF(A1="H",TRUE,IF(A1="L",TRUE,FALSE)))

You can use:

=IF(OR(A1="K",A1="H",A1="L"),TRUE,FALSE)

As you can see, it’s a lot shorter and makes a lot more sense. Especially if you need to add more to it in the future.

Easy stylesheets with basic PHP

Posted in Programming, Tricks on November 14th, 2007 by Ryan

Create a file called stylesheet.php and link to it in you’re page. Then play with this code:

<?php
header(‘Content-type: text/css’);

// Colour scheme
$primary    = "#44749d";
$secondary  = "#c6d4e1";
$tertiary   = "#ffffff";
$quaternary = "#ebe7e0";
$quinary    = "#bdb8ad";
?>

BODY {
background: <?php echo $tertiary ?>;
color: #000000;
margin: 0px;
}