Apr
22
2010
0
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
2

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 |
Jan
27
2010
0

Plugging in headphones doesn't mute speakers in Ubuntu

I upgraded to Ubuntu 9.10 in early December, but yesterday was the first time I tried to use headphones since then.

It turns out that plugging headphones into the headphones socket doesn’t automatically mute the speakers anymore.

Here’s a fix.

Open a terminal (Alt+F2 > gnome-terminal)
alsamixer (enter)
Use the arrow keys (left/right) to highlight Headphon
Press ‘m’

This should fix it. You can now hit Esc to exit and exit the terminal.

Written by John Burns in: Linux Tips |
Jan
18
2010
1

Ubuntu Software Centre – Not available in the current data

If you get the error “Not available in the current data” in the Ubuntu Software Centre, try opening a Terminal and running this:

sudo apt-get update

Update: This should also fix the error “Not available for your hardware architecture” as well

Written by John Burns in: Linux Tips |
Oct
21
2009
5

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 |
Aug
13
2009
0

C# equivalent to VB val() function

Although VB had it’s limitations, it was damn easy to filter an input string for a numerical value.

Here is how to do it in C#. You’ll need to use System.Text.RegularExpressions in the header

private static int VBVal(string sInput)
{
        string sOutput = string.Empty;
        MatchCollection oMatches = Regex.Matches(sInput, "\\d+");
        foreach (Match oMatch in oMatches)
        {
                sOutput += oMatch.ToString();
        }
        return (int)sOutput;
}

Written by John Burns in: C# Tips |