Matt Williams
Tech, Gaming and Food Enthusiast
Tech, Gaming and Food Enthusiast
Oct 26th
Recently I decided to have a go at setting up my own Mail Server on my Ubuntu dedicated box. I assumed this would be a simple task as there are so many tutorials out there. But the most challenging task turned out to be filtering through the articles that will more than likely leave your system open wide to attacks and those that just simply don’t work.
The technologies that I wanted to mess about with were:
1) Postfix
2) Courier
3) MySQL (To hold domain /mailbox information)
Finally I found this. The documentation / instruction is extremely meticulous and yet easy to understand. I would thoroughly advise using this if you want to set up a mail server on a linux machine. It includes aspects from just basic mail servers including security with firewalls (Shorewall), right up to spam filtering, secure auth and much more.
I haven’t posted in almost a year but I will be posting more about my journey through setting up my webserver.
Feb 1st
Recently I have been tasked with automatically compiling, tagging and indexing images added to an application via FTP. The images had been tagged using Adobe Bridge or Photoshop, anyone with knowledge of Adobe products will be familiar with tagging images. For those who aren’t, you can add descriptions, titles, ratings, keywords and copyrights (to name a few) to the core of an image using Bridge or Photoshop. My challenge was extracting this information at the other end. As the user would be uploading 1000s of images, there was absolutely no way they would want to tag each image after waiting for it to upload via a web form. After a few cron scripts dumping errors and FTP permission issues I managed to configure a system that would listen in a drop folder on one of the servers and then chmod and move the file to a web friendly directory for processing. This is where the interesting stuff begins.
Aug 27th
The art to having a website with decent imagery is to allow the user/administrator to crop the images. Despite advancing web technologies, I still cannot trust a computer to scale, resize or crop an image without the resulting image being of someones foot.
There are certain ‘off-the-shelf’ products, mainly for ASP.net, with very little introduced into PHP, so I had to build my own using helpful libraries and plugins.
The Cropping
Writing a JavaScript cropping tool from scratch is no small challenge, getting a bug-free environment where all of the calculations are perfect can take weeks of hairless programming sessions and various mental breakdowns! And with my hair still in tact and mental capacity intact I implemented jCrop (I let someone else do the hard work). I am continuously reminding people that reinventing the wheel is both a waste of time, energy and sanity but the odds are against you. If a plugin is popular then the chances are that their solution will be 10 times better than yours as theirs have probably evolved over several months if not years!
Aug 25th
On August 31st Twitter will be axing basic auth GET requests, which is being overtaken by the more secure oAuth, there are a few tutorials out there on how to use oAuth and how to get started creating an app with CodeIgniter, but not many with actually helpful advice so here is my 2 penneth.
How to get started with oAuth
Aug 23rd
The Wireless Universal Resource File (WURFL) is an open source device library which describes itself as follows:
The WURFL is an “ambitious” configuration file that contains info about all known Wireless devices on earth. Of course, new devices are created and released at all times. While this configuration file is bound to be out of date one day after each update, chances are that the WURFL lists all of the WAP devices you can purchase in the nearest shops.
This configuration can be combined with their shiny new PHP and Java API’s to interrogate the user’s UAProf or USERAGENT strings to pin point the type of device the user is browsing on.
So how do we use it. The first step is to set the WURFL config file (wurfl-config.xml) which may look something like this.
Then to use the API, for this example I will be using the PHP API.
<?php
require_once 'WURFL_installation_root/WURFL/WURFLManagerProvider.php';
$wConf = 'Relative path to wurfl-config.xml';
$wManager = WURFL_WURFL_ManagerProvider::getWURFLManager($wConf);
$info = $wManager->getDeviceForHttpRequest($_SERVER);
?>
This code will load a large object of UAProf information which can be interrogated using the WURFL API functions (See Documentation).
It is so simple but very powerful and accurate, I would highly suggest giving it a try: