Jun
09
2010
0

Combining two images with ImageMagick

To combine two images of the same size with ImageMagick, you simply do the following:

The following will overlay overlay.png on top of output.png

mogrify -draw "image SrcOver 0,0 0,0 'overlay.png'" output.png

While this one will overlay overlay.png on top of input.png and save it as output.png

convert input.png -draw "image SrcOver 0,0 0,0 'overlay.png'" output.png

You can download imagemagick from http://www.imagemagick.org/

Written by John Burns in: General Randomness, PC Tips |
Jun
02
2010
0

Deleting folders recursively

I needed recursively delete folders named .svn within a directory structure.

The following will allow you dto do this from a command prompt:

FOR /F "tokens=*" %G IN ('DIR /B /AD /S .svn') DO RMDIR /S /Q %G

Remember, if you’re doing it from a batch file, you’ll need to double up the percent signs, thus:

FOR /F "tokens=*" %%G IN ('DIR /B /AD /S .svn') DO RMDIR /S /Q %%G
Written by John Burns in: PC Tips |
Apr
26
2010
0

IIS 6- Setting up a write only FTP directory

So, you want to set up a write only ftp directory on IIS? One where you can upload files, but not list them?

Easy…
(more…)

Written by John Burns in: PC Tips, Tips |
Apr
25
2010
0

WordPress Super Cache plugin – Performance Benchmarking

I’ve been doing some performance tests on WordPress to see how much of a difference the WordPress Super Cache plugin made.

It turns out that the plugin makes a huge difference. (more…)

Written by John Burns in: General Randomness, Linux Tips, PC Tips, Tips |
Apr
14
2010
0

DateTimeUTC – Version 1.1

I’ve been using DateTimeUTC for quite some time in batch files to get a nicely formatted date.

This is the first major revision of DateTimeUTC where you can now add or subtract from the current date. This is very useful if you want yesterday’s date.

Get the latest version from here: DateTimeUTC

The main usage of the application is:

datetimeutc [-options]

Options:
-fFORMAT Set output format
-z Set output time to Local Time (Not UTC)
-help View full online help

Example formats:
yyyyMMddTHHmmssZ 20081121T100227Z
“yyyy-MM-dd HH:mm:ss UTC” 2008-11-21 10:02:27 UTC
“dd MMMM yyyy” 21 November 2008
ddd Fri
dddd Friday
fff (Milliseconds)

Use double quotes when the format includes a space
Use backslashes to escape reserved character

Now, to add or subtract from the time, the format of the option is:
-[timeunit][value]
[timeunit] is one of YMdHms for Year, Month, Day, hour, Minute or Second
[value] is an integer and can be positive or negative

The following will print the UTC time one day ago:
datetimeutc -fyyyyMMddTHHmmssZ -d-1

Do get the output into a batch file, try this:
for /f “usebackq” %%a in (`datetimeUTC.exe -fyyyyMMddTHHmmssZ`) do (set UTCdts=%%a%)
echo %UTCdts%

Job done

Written by John Burns in: PC Tips, Tips |
Feb
02
2010
0

Enca binary compiled for 32 bit Windows

Enca is a (normally *nix) application which attempts to detect the text encoding of files.

It’s only supplied as source which isn’t too helpful for windows users.

Enca is particularly useful at guessing the encoding of text files where the language is known.

Here is version 1.12 compiled into a native windows binary: enca_1-12.zip
(I’ve compiled this from a downloaded source, so no responsibility is taken for it’s suitability for use, being free from viruses, etc. In other words, use it at your own risk)

Written by John Burns in: PC Tips |
Oct
21
2009
3

IIS 6 FTP – When PassivePortRange doesn't work

I’ve been trying to enable the passive port range on an IIS6 FTP server. I did everything. I enabled direct metabase edit, set the range using ADSUTIL and then added the ports to the firewall.

It turns out that if you set the firewall to allow “FTP”, the passive port range will be ignored and the default passive port range will be used. To solve it, you’ll need to manually add port 21 and the ports defined in the passive port range… Strange but true.
(more…)

Written by John Burns in: PC Tips |
Sep
10
2009
0

Problems while running the Nokia Software Updater?

If you get the following error while trying to update the firmware on a Nokia Phone…

Nokia Software Updater has attempted to connect to the internet but has failed three times. This could be because of a poor-quality, slow or intermitent internet connection, or restrictions due to a firewall.

If requested by your firewall, Nokia Software updater needs the following applications to gain access to the internet:
nsl_host_process.exe
nsu_ui_client.exe

(more…)

Written by John Burns in: General Randomness, PC Tips |
Sep
04
2009
0

Moving emails from Mac Mail back to Outlook on Windows

Although both Apple and Microsoft say it’s easy moving between their platforms, things aren’t as easy as they seem.

You can struggle for hours trying to move your data. I’ve tried conversion tools and some emails always fail. The best method is to take advantage of IMAP, which will let you store emails on a server, then download them again.

If your ISP doesn’t give you an IMAP account, there are Lots of webmail providers such as gmail can give you an IMAP account.

Once you’re set up, just drag the emails into the IMAP folder and they will upload to the server.

Now, just configure your new client and download the emails. Done!

If you are worried about privacy, you can download and install hmailserver, create an account on that and then just send the messages to your local server.

Written by John Burns in: Mac OS X Tips, PC Tips |
Aug
26
2009
0

No more Windows Live Messenger for Windows Server 2003

Microsoft just upgraded Live Messenger.

If you happen to use Windows Server 2003 as your operating system of choice – As a lot of web developers do, you are now out of luck using Windows Live Messenger.

As of yesterday, you are forced to upgrade Live Messenger to the latest and greatest version, which um, er, doesn’t support Windows Server 2003. You’ll either need to upgrade to Server 2008, or downgrade to an older version Windows Messenger instead of Live.

Yes, we understand, Server is meant to be used as a server, but a lot of people use it as their main OS.

Microsoft really overlooked this one…

Written by John Burns in: General Randomness, PC Tips |