Mac Firewall: Do you want the application to accept incoming network connections

Uncategorized No Comments »

Recently I’ve had a bother with the Mac firewall asking me if I want it to accept incomming network connections every time I open a particular application.

The appropriate setting can be found under:

System Preferences : Personal > Security > Firewall

I have mine configured to “Set access for specific services and applications” which normally asks me if I want to allow an application to accept incoming connections the first time I run it and that’s normally the end of it. The trouble comes when you try and update certain applications using¬†Software Update. I’m not exactly sure what causes the problem but for some reason with specific applications the firewall then proceeds to ask you, each time, if you would like it to accept incoming network connections. This you can imagine is superlatively tedious.

The answer though is to just delete the application from you applications folder and reinstall it. The first time you open the freshly installed application it will ask the question and then bug you no more. Then all you have to worry about is not updating it via software update again.

Basic POP3 & IMAP Connection Testing via Telnet

Uncategorized No Comments »

To Test POP3

telnet 110 (xxx = mailserver)
+OK Hello there.
+OK Password required.
+OK logged in.
+OK (Information about your mail)
+OK Bye-bye.

Read the rest of this entry »


Uncategorized No Comments »

Remember now as you pass by,

that as you are so once was I.

And as I am you too shall be,

prepare ye then to follow me.

Trespassers will NOT be prosecuted

Uncategorized No Comments »


Only a breach of criminal law may lead to prosecution. Breach of civil law, however, could well lead to the defendant being sued.

As trespass is a civil offence and not a criminal one then trespassers will most certainly not be prosecuted.

This post is attributed to my brother whom provided the information in the same conversation he tricked me into mis-answering a QI like question. More on that story later.

GIMP on Mac OS Focus Double Click Fix

Uncategorized No Comments »

GIMP Mascot

If you’ve ever used the great GNU Image Manipulation Program, GIMP, on a Mac then you’ll no doubt have been frustrated with the way X11 seems to handle window focus. Fortunately there is a solution and its just a couple of simple terminal commands away…

When selecting tools from their dialog in GIMP on your Mac then you are required to click once to give that window focus and again to actually select the tool you require. The same two clicks are required again to actually use your tool.  You can either imagine or know first hand how annoying this becomes and its a shame for such a great piece of software to be blighted by this issue so lets fix it.

Firstly you’ll want to open your terminal (who could live without it… mine’s almost always open!). Then you want to enter either of the following commands depending on whether you’ve got XQuartz updates (and if you’re not sure just do both sets).

Read the rest of this entry »

HowTo: Fill Down in Excel Mac

Uncategorized No Comments »

Ctrl + D

Excel Mac Equivalent to F2 in Windows

Uncategorized No Comments »

Ctrl + U

PHP Equivalent to the SQL IN (…) Statement

Uncategorized No Comments »

Recently I’ve been looking at using the NHS Business Service Authority’s Dictionary of Medicines and Devices for my own nefarious purposes. The Information (data that has meaning) is distributed as XML files.

I haven’t come across a database design for the data so I’ve come up with my own and to import the data into it I’ve been using PHP’s XML DOM functionality (a different technique than I described in my earlier post …). Because the files are published according to specified standards I decided to save myself some programming time by adopting their terminology for my database design so that I could write very little code to prepare the data and insert it into the database.

However, I wanted to test that the nodes I was expecting were what was being prepared for insertion into the database. One reason it may not is if the XML file has been reformatted with indents (mentioned in this post) What I needed was an equivalent to SQLs IN statement. The solution is to use PHP’s in_array() function like so…

$desirable_values = array(‘CD’, ‘CDDT’, ‘CDPREV’, ‘DESC’);
if ( in_array( $variable_to_test, $desirable_values) ) {
//Do Your Stuff

It saves you having to test if your variable is equal to each of the variables you want to test thus making your code cleaner and shorter.

Removing the Tilde (~) Character from the Address of Locally Hosted Sites on Mac OS X

Uncategorized No Comments »

I’ve been working on some sites locally on my Mac but by default the files are stored in a directory in the individuals user account called Sites and the address you’ve got to type into your browser is http://localhost/~username/etc… this annoyed me because I didn’t want to have to type the tilde character in the address and also that I had to have the files showing in a subdirectories of my user. I couldn’t be doing with it, I wanted to have addresses like ‘http://localhost/subdomain/’ and the solution of course is to use symbolic links.

Read the rest of this entry »

How To: Indent XML Quickly

Uncategorized No Comments »

I’ve recently registered for accesss to the NHS’s dictionary of medicines and devices (dm+d). This was primarily to see what format the data was stored in and then to see if there was a way of utilising it in a cool webapp.

I downloaded the current release (its updated weekly) and unpacked the 5MB archive to reveal some XML and related files. Some of the files are huge (up to 32MB each and ~70MB in total) and there was no way a traditional program was going to mannage. I tried a few in fact and they all devastated my 2GB RAM and were generally unusable.

Time for a command line solution… VIM the open source text editor. Its extremely powerful and customisable but using it takes a little getting used to. VIM was able to open with only a slight delay and navigate these huge files. The next problem for me was being able to read them.

In theory it shouldn’t matter what indenting there is in an XML file as it doesn’t contain any data but I find its a lot easier to read the files if they’re ‘cleanly’ indented. I began wondering how I was going to solve the problem and thought of a few ideas… a script (PERL, PHP, shell, other…) but none of those came to fruition. After some searching I came across libxml.

You can download and compile from source if you wish but I decided to download a pre-built version from it was pretty good and another page I came across on explained how to use it within Vim to indent my files super quick.

Here’s what you do…

  • To format type this sequence
    • :%!xmllint –format –
  • Or mark the area visually and then type
    • !xmllint –format –
WP Theme & Icons by N.Design Studio | Akismet has gobbled 348,921 spam comments...Mmmm Tasty :-)
Entries RSS Comments RSS Log in