“the j stands for Jacksnipe”
about me | blog | facebook profile | linkedin profile | twitter profile | stuff i've done | stuff i like | wordpress plugins

3 September, 2010

Goodbye GoDaddy, hello VPS.NET

Filed under: Web Development,Web hosting — Tags: , , , — John @ 2:57 pm

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

Filed under: Useful — Tags: , , , , , , — John @ 5:24 pm

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

Filed under: LaTeX,Useful — Tags: , , , , , — John @ 12:05 pm

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:

Inline images, non-aligned

Zoomed (x600)

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:

Inline images, properly aligned

Zoomed (x600)

3 May, 2010

Mendeley, BibTeX and citing Website URLs

Filed under: Academic,LaTeX — Tags: , , , , , , , — John @ 12:57 pm

The Problem

  1. 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.
  2. 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}
    }
  3. That looks fair enough, but standard BibTeX/LaTeX simply ignores the url field 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

  1. 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.
  2. 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

  1. 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 call websites.bib)
  2. When writing your BibTeX website entries, be sure to use the howpublised field like so:
    @misc{myKey,
    author = {Surname, Name},
    title = {{Website Name}},
    howpublished = {\url{http://my.url.com/}},
    year = {2010}
    }
  3. This will get BibTeX to correctly show the URL in the bibliography entry.
  4. 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

Filed under: Academic,Useful — Tags: , , , , , , — John @ 12:38 pm

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.

CSAI Final Year Projects Guidelines (B.Sc.IT)

7 April, 2010

Fonts, Keyboards & Layouts – How to correctly type Maltese characters

Filed under: Useful — Tags: , , , , , , — John @ 12:10 am

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.

  1. Start → Control Panel
  2. "Change keyboards or other input methods"
  3. Click "Change Keyboards..."
  4. This shows all your installed keyboard layouts. Click Add.
  5. 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
  6. You can also preview the keyboard layout:
  7. 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

Filed under: Useful — Tags: , , , , — John @ 8:05 pm

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

2 March, 2010

An interesting way to avoid publishing your email address..

Filed under: Random Tech — Tags: — John @ 8:11 pm

Check out this page: http://blacksapphire.com/antispam/

Not only does this guy require you to answer a mini quiz to prove you are human, but he will also generate a new email address for every person who wishes to contact him (which I imagine are only valid for a limited amount of time) so that he never has to give a single, spammable, email address..

I thought it was quite inventive!

26 February, 2010

johnjcamilleri.com is now seriffed

Filed under: Other — Tags: , — John @ 11:19 pm

there’s just something I like about serifs, so I thought it was about time I seriffed the fonts on my own site.

other than that, it’s still the same old boring gray theme.. tbh i’m waiting for WordPress 3 before my next major site facelift (not that the 2 are really related, but anyway…)

Newer Posts »

Powered by WordPress