A project I’ve been working on the past few months is finally online, although there are plenty more features to come in the near future. It’s a niche social network for alumni of my old secondary school San Anton (in Malta) — or Old Antonians — hence the Old Antonians Network. It’s based loosely on LinkedIn, ie promoting professional networking rather than sharing photos and harvesing virtual crops, and it’s the first project of mine using the CakePHP framework. It’s a closed network so you won’t really be able to see any of it, but I wanted to link to it to perhaps bump it up on Google!
28 September, 2010
3 September, 2010
Goodbye GoDaddy, hello VPS.NET
So, I have finally made the move off GoDaddy shared hosting. While their stuff works and is admittedly cheap, I knew the perofmance was a bit crappy and in general just grew tired of the company. Their management panel is horrible, even though I’d gotten used to it after all these years. In addition I always found their advertising a bit offensive (I don’t need sexy women to convince me to buy their stuff) and in general too American. Using them just makes me feel cheap.
So I searched a while for a good-looking VPS solution, and found VPS.NET. Their focus on scalabilty is super, you can start out with minimal resources and then add as you go, without having to reprovision anything. I’d also read really good things about their customer service, and decided to take the plunge.
It’s still very early days, but so far I’m loving them. Everything was very fast to set up (minutes), support was very prompt and I have all the flexibiltiy I want and a really good price. As time goes by we’ll see if things remain this good.. well, just the fact that I’m already off GoDaddy is a huge relief!
25 July, 2010
Enabling compression with GoDaddy Shared Hosting
Compression of HTML, CSS and JavaScript is quite important for improving your site’s speed and should always be used.
Of you will find that all you need to do is add a line similar to the following to your .htaccess file:
AddOutputFilterByType DEFLATE text/html text/plain text/css text/xml application/x-javascript text/javascript application/javascript
Source: StackOverflow
However, if you’re on a GoDaddy shared hosting account you may have realised that this doesn’t work. GoDaddy’s help page recommends that you paste this code in all your PHP pages:
<?php if (substr_count($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip')) ob_start("ob_gzhandler"); else ob_start(); ?>
That’s fine, but from my understanding this will not cache your CSS or JavaScript. However, I found a solution here, which involves some .htaccess trickery to compress all your CSS and JavaScript files automatically. Enjoy!
6 July, 2010
j’s instead of smileys in Thunderbird 3
It seems the solution for the outlook smileys posted here only works for Thunderbird 2.
For Thunderbird 3, I found this very helpful discussion and add-on. Enjoy!
9 May, 2010
Vertical alignment of inline images in LaTeX
This is one of those things which isn’t so easy to find, so here’s my contribution.
The Problem
You’re using LaTeX, and have a small image which you want to display inline with the text (i.e. not a float). So, you use something like the following:
...indicate whether the phrase you've constructed is valid (\includegraphics{tick.png}) or not (\includegraphics{cross.png}}). To make things...
This works, but often the vertical alignment is not quite right, as shown in the images below:
The Solution
After some searching and experimenting, I found the best solution to be using the \raisebox command with a negative value, like so:
...indicate whether the phrase you've constructed is valid (\raisebox{-1mm}{\includegraphics{tick.png}}) or not (\raisebox{-1mm}{\includegraphics{cross.png}}). To make things...
The additional code is minimal and it works perfectly (as far as I can tell). Results as below:
3 May, 2010
Mendeley, BibTeX and citing Website URLs
The Problem
- Using Mendeley Desktop (<3) to manage all my dissertation references, which automatically writes a BibTeX (.bib) for me which I include in my LaTeX document. So far so good.
- When I manually create an entry in Mendeley for a website, it creates a BibTeX entry like the following:
@misc{myKey,
author = {Surname, Name},
title = {{Website Name}},
url = {http://my.url.com/},
year = {2010}
} - That looks fair enough, but standard BibTeX/LaTeX simply ignores the
urlfield in the entry… which makes the reference look rather stupid. So how can I handle websites properly?
What I hoped I would be able to find
- I wish Mendeley had some more advanced options which controlled how BibTeX files were created, this would have definitely been the most ideal option, but alas no such options exist. Editing the generated .bib yourself would be pointless since Mendeley will just overwrite the file each time.
- BibTeX itself could really do with an update in the website-citation department. I’ve seen lots of talk about new versions but can’t see where they are… Also I know there are alternative BibTeX packages which can be used, but this was something I wanted to avoid because sometimes you can’t tell what else it’s going to change in your references. For more information on the options, I recommend this link: URLs in BibTeX bibliographies
The Solution
- The best solution I could come up with so far, is to simply delete these references from Mendeley and put them in your own custom .bib file. Thus, you will have the Mendeley-generated bib file (which we’ll call
mendeley.bib) and your own custom bib file for website entries (which we’ll callwebsites.bib) - When writing your BibTeX website entries, be sure to use the
howpublisedfield like so:
@misc{myKey,
author = {Surname, Name},
title = {{Website Name}},
howpublished = {\url{http://my.url.com/}},
year = {2010}
} - This will get BibTeX to correctly show the URL in the bibliography entry.
- Finally in your LaTeX document be sure to include both bib files, like so:
\bibliography{mendeley,websites}
An Alternative
Actually, what I ended up doing in my dissertation is listing these “one-off” website references as footnotes rather than actual citations, since they’re not exactly publications. Obviously you will have to see whether this is applicable or not to you.
16 April, 2010
CSAI’s Guide To Dissertation Writing
I found this on my computer, not sure where it came from (can’t find it online now) but I figured it may be useful to other IT students writing their FYP/dissertation.
7 April, 2010
Fonts, Keyboards & Layouts – How to correctly type Maltese characters
UPDATE: Thomas Pace kindly pointed out this very helpful link which basically covers everything here, and includes steps for Apple’s OSX: http://www.kunsilltalmalti.gov.mt/filebank/documents/kompjuter.pdf
I’ve been asked many times how to enter Maltese characters on a computer – i.e. ċĊ, ġĠ, ħĦ and żŻ.
It turns out there’s a lot of misconceptions out there, and many people think that typing Maltese and other non-Latin characters requires a special keyboard and/or specially installed fonts. This is completely not true, and all users with a moderately modern computer are able to enter such characters by simply adding a selecting a different keyboard layout from their OS.
Below is a short explanation of the misconceptions, if you just want to see the steps for selecting a different keyboard layout, click here.
“Maltese Fonts” and why they’re such a bad idea
A few years ago, everyone thought these so-called “Maltese Fonts” were the solution to entering Maltese characters into your computer. These fonts are just copies of the usual fonts we all know (Arial, Times etc) but with certain characters redrawn, such that when you type a [ it is displayed as a ġ, } becomes Ħ and so on. Now if all you're doing is typing into a word processor and printing directly from the same computer, the solution seems to work.
But what happens if you want to send a Maltese document to someone who doesn't have these fonts installed? Well, they will still be able to open the document, but in place of the proper Maltese characters they would see different punctuation symbols. So the phrase Għażiż Ċali would become something like:
G]a\i\ `ali
People just accepted this, and would say to each other “you need to install the Maltese fonts in order to read the document”. But, it gets worse. What if you’re entering text somewhere which doesn’t allow you to change fonts? I you were filling in a form on a web page or even writing an email, you would just forget the use of Maltese characters altogether.
To summarise, “Maltese Fonts” are a very short-sighted and inelegant solution. Thankfully, due to a little something called Unicode, all modern computers today will allow you to enter (and read) Maltese and other non-Latin characters, simply by changing your keyboard layout settings (see below).
“Maltese Keyboards” and why you don’t need one (but might still want one)
Another misconception I’ve heard is that in order to enter Maltese characters, you require special hardware — i.e. a “Maltese Keyboard”. This is not true, because all a Maltese keyboard really is is a standard US/UK keyboard with different symbols printed on the keys. Circuitry-wise, everything else is identical. In fact any keyboard can be used to enter any type of character, simply by changing your computer settings.
However, that being said, users may find that having a Maltese keyboard is helpful since they don’t need to remember that they need to press the [ button to produce a ġ and so on.
How to select the Maltese keyboard layout on your computer
The screenshots below are taken in Windows 7. Steps for Windows Vista and Windows XP are very similar, almost identical. Steps vary for Linux because of all the different distributions, for Mac OSX refer to the linked article above.
- Start → Control Panel
- "Change keyboards or other input methods"
- Click "Change Keyboards..."

- This shows all your installed keyboard layouts. Click Add.

- Choose one of the Maltese keyboard layouts:
- If on your keyboard, the @ symbol is above the number 2, choose Maltese 47-key
- Otherwise, if the " symbol is above the 2 key, choose Maltese 48-key
- You can also preview the keyboard layout:

- After clicking OK to everything, you should now notice a new icon in your taskbar next to the time, called the Language bar with this icon:

Click on it to change the desired input language. After changing it to Maltese, try pressing these keys on your keyboard:
[ { ] } `¬ \ | # ~
You should now see our lovely Maltese characters on your screen
(The last 4 will vary depending on whether you chose the 47 or 48-key layout).
Note that this setting is per-application. So, if you’re in Microsoft word and change it to Maltese, then switch to your email client, you will need to set the language again for that application. If you always want the Maltese keyboard layout to be the default active layout for all your applications, you can set it from the screen in point 4 above (under default input language).
5 March, 2010
Google Buzz: Stop getting emails via POP
If you use Gmail /Google Buzz and a POP client for your email, chances are you’re receiving a bunch of emails telling you about new buzz’s – including your own updates!
This is very annoying and there’s no direct setting to turn it off. However this guy has come up with a great solution, by basically creating a Gmail filter for emails containing the words in:buzz



