Fri Jun 17 22:37:59 BST 2011

Fonts on Linux

Well, I was most surprised today... I wanted to use a TrueType font I had downloaded from the internet, it was *this* easy:
mkdir ~/.fonts
cp downloaded_font.ttf ~/.fonts
and it was available straight away!

in the olden days on windows that would have required a reboot, think windows caught up since then though... -----

Posted by Phill | Permalink

Thu Jun 9 19:52:54 BST 2011

nanoblogger limitation :/

I was a little dismayed when I recently noticed that nanoblogger requires you to add html tags for reasonable formatting.

also the tags need to be closed for elements like IMG or BR.

<br /> or <img src="pic.jpg" alt="picture of a booby" />
I was very happy with the way the PRE tag is handled though, very useful for code snippets (as above) :) -----

Posted by Phill | Permalink

Thu Jun 9 19:35:12 BST 2011

shell scripts

a shell script made to automagically start X when logging in locally :)
# /etc/skel/.bash_profile

# Test for tty
if ps -p $$ | grep tty >/dev/null; 
 then if pgrep X >/dev/null;
# testing for existing X sessions, shouldn't be necessary, but good for completeness
#could be expanded to start a new X server
        then echo "Xsession in progress";
        else exec startxfce4;

Posted by Phill | Permalink

Thu Jun 9 19:28:32 BST 2011

piping "|"

it's a real wonder I've never needed to look this up before, but I needed to compare two files on my computer, one was a M$ Word doc and the other an rtf...

so, using a nice utility catdoc I could output the text without formatting to STDOUT, then you redirect the output into diff, like so:
diff -B <(catdoc file1.doc) <(catdoc file2.rtf)
as it turned out the two files were quite different, but I liked the learning anyway :D -----

Posted by phill | Permalink

Thu Jun 2 02:26:21 BST 2011

501 errors in SMTP

been narked off with a mail server rejecting my mail because my IP wouldn't resolve, I examined my DNS settings, all seemed in order.

I changed the hostname and send domain that Exim reported, that was the same...

I changed CNAME entries to A records, I added every form of my domain I could think of to my MX record, but it was still the same, emails were coming back with a 501 error; IP doesn't resolve.

So a bit of research turned up a cheeky and not really 'proper' spam prevention technique called rDNS lookups, so a trip to my ISP home page allowed me to update the PTR record for my IP address and then everything worked.

For completeness, I will point out that the PTR record is not held with your DNS record unless your DNS is provided by your ISP, the PTR is held with the 'owners' of your IP address. Not sure how this would work with DynDNS services, hopefully I'll never need to know :) -----

Posted by Phill | Permalink