Aug 10
I’ve set up SMS Server Tools on my Mac Mini so that I can send text messages from my PC and I thought someone might be able to use the Applescript I’ve created or even suggest a better way of doing things.
If you’re not familiar with SMS Server Tools it’s a really great utility for sending text messages from your PC (I use the term generically) it works on (almost?) all UNIXs and Windows too. It works by having folders which it monitors for text message files and then sending them via the phone. It was very easy to set up just download the source, make, make install, edit the config file and away you go.
Read the rest of this entry »
Aug 10
A while ago I had an old Nokia N-95 plugged into a Gentoo box and I was using SMS Server Tools to send myself text message alerts. I got rid of that sim and so stopped using it. The phone has been sat in a drawer since then along with a couple of others.
I recently decided I wanted to set it all up again, this time on my Mac Mini. I was trying out different phones and settings but I couldn’t get the N95 or an old Motorola V series phone to do anything even after plugging them both in! Read the rest of this entry »
Aug 05
One of the ways I like love to combat spam is by using email aliases. Basically I have one real email address that I do not give out to people but that I use to check my email with my provider. Then what I do is create any number of virtual or alias email addresses in my provider’s admin interface. So the scenario is that everytime I need to provide an email address for membership or to interact with a company I create a new email address (alias) for them and then give them that address. The beauty is that I only have to check one address and all my mail from all of those alias addresses gets sent to it automatically.
So if I ever get spam then I know exactly where it’s come from because each company / person has their own email address alias. It’s easy to stop them too, just delete the alias and no more spam! Not only that but the company or person who either spammed or allowed you to be spammed has just lost some credibility with you. Read the rest of this entry »
Jul 10
Last night I was working on determining how long a user had been logged into a PHP application but was having a problem with subtracting timestamps and this is how I solved it.
I was storing two timestamps (as a UNIX timestamp) in the database. One designating the date-time the user logged into the application and the other the date-time of the last activity the user performed. Because I was using UNIX timestamps, which are just the number of seconds sine the UNIX epoch, I subtracted one from the other and used that difference as the input to the PHP function date().
I couldn’t for the life of me work out why the date function was saying that I was logged in for an hour longer than I should have been and it was driving me crazy. It turns out that the reason was that my timezone locale setting in PHP is ‘Europe/London’ and that this causes the date function to adjust for British Summer Time (GMT + 1) thus when I used my timestamp difference in the date() function it translated the difference into a readable format but also added an extra hour.
The solution is to use gmdate() which is identical to the date() function except that the time returned is in Grenwich Mean Time format.
Jul 04
If you’ve ever used opera or other browsers like konqueror then I’m sure you like the way you can search from the address bar by typing a custom shortcut and your search query. to search for ‘Premium Bonds Checker’ on google using Opera I’d just hit F8 (to get to the address bar) and then type ‘g Premium Bonds Checker’ and hit return because g is my shortcut for searching google.
This morning after I finally found it I checked my Premium Bonds holder’s number to see if I’d won (better luck next month). I thought to myself wouldn’t it be nice if I could tell Opera to check my holder’s number for me without having to go find it once a month.
The way I did it was to edit one of Opera’s custom search records. Read the rest of this entry »
Jun 18
You may or may not know that Windows and Unix end lines in text files differently. Windows uses both a line feed and carriage return characters whereas Unix uses only the line feed character. This can be annoying if you’re working with documents on both systems interchangeably and you need to preserve a lot of indentation . One example for me is xml files I like writing them in a plain text editor because I cannot find an xml editor I get on with.
The solution is to use PERL:
- To convert Unix style line endings to Windows style
- perl -p -e ’s/\n/\r\n/’ < unixfile.txt > winfile.txt
- To Convert Windows style line endings to Unix style
- perl -p -e ’s/\r$//’ < winfile.txt > unixfile.txt
The use of single quotation marks in both command lines is important because it prevents the shell from trying to evaluate anything inside.
That’s it. A simple way to quicky convert line endings letting you get on with the job.
Jun 17

The other week I found the NASA site for the Solar and Heliospheric Observatory through someone else’s blog (cannot remember who though). Anyway I think it makes a good bookmark especially the real time images and movies.
I thought they were neat and so might you.
Jun 10
I’ve been doing a bit of web design in my spare time lately and before long I came across the issue of using margin: auto; in my stylesheet not working in internet explorer. Meeehhhh! I couldn’t be doing with that and given that the best way to attack an unknown problem is to search for knowledge I hit google (not literally of course).
Turns out, that you can force Internet Explorer (and other browsers) to parse your cascading style sheets strictly by using a strict doctype definition. I used the one below for my project;
Read the rest of this entry »
May 30
I dual boot a couple of my machines and whilst I was looking for a way to reapportion the size between two partitions I came across Gparted. It’s a Gnome based GUI for the GNU Parted program for creating, destroying, resizing, checking, and copying partitions, and the file systems on them.
What I really liked is there’s a linux livecd available so all you have to do is burn the disk image stick it in and aside from a few simple commands to boot the cd correctly it loads and starts Gparted.
Read the rest of this entry »
May 29
So after last night’s terrible loss of data I decided something had to be done. My host has already arranged for binary backups to be made but I thought there must be some wordpress plugins that keep a copy of your wordpress tables so I began my search. There were a couple that caught my attention so I installed them and had a play and now I’ve made my choice, DBC Backup.
Read the rest of this entry »
Recent Comments