Skip to content

Blog

Terminal / Cron Environment differences

I have been going through some logs for my Flexget instance and saw that I was getting a number of these messages coming up:

Your cron environment has different filesystem encoding (ANSI_X3.4-1968) 
compared to your terminal environment (UTF-8).

Oh dear, well sure enough, it is different but there is a really easy way to sort it:

TVMover 0.1 – (Alpha)

Over the next few days (or probably weeks) I am going to make a HOW-TO on a super set-up that I have configured on my Ubuntu headless home media server. If you would like to read a little bit more about what the core parts to this are and get a copy of the code then…

Time to tee off

This is as much for my benefit as anyone elses but someone else may find it useful as well. It has come in hand for me many times at work and at play. The reason for using it is if you are running a command or a script that dumps a load of stuff to the terminal. You may wish to keep this output for debugging purposed later or you may be using PuTTy and there is so much output that it gets pushed out the measly buffer. Well no longer, the “tee” command is a really good way of piping everything to a file.

How open are you? – Take 2

A long time ago I did a small post called “How open are you?” – you can find it here. This was for an old server which has long since died and been recycled. I thought that it was about time that I revisited this therefore and post an update.

Recover a MySQL database from an old Ubuntu 10.04 box

One of my boxes died the other day (the one which hosts this actually) and I needed to recover the mysql database from it and move it from the old one to the new one. I didn't know whether or not it was possible and if it was, how easy it would be to do. As it turns out, it is pretty easy and I'll share with you know how I did it.

Something neat

I haven't posted anything for a long, long time so I thought that I would just post something very quickly. A link to something very cool: puddletag. puddletag is an audio tag editor (primarily created) for GNU/Linux similar to the Windows program, Mp3tag. Unlike most taggers for GNU/Linux, it uses a spreadsheet-like layout so that all the tags you want to edit by hand are visible and easily editable.

Daemonised Transmission! on Ubuntu Server 10.04

So, this evening I have been trying to configure my new Ubuntu server with a daemon-ised install of transmission for my torrent downloads. I read a number of blogs and articles from various places but struggled quite a bit with it. I could get it to install and to start no worries, but seeing as this server is headless I needed access to the web interface (hence the daemonised version) and I couldn't get this working! I kept changing the settings.json file but every time I closed it and fired up transmission it appeared to be overwriting my file and using the default! Anyway, I am there now, but I found that I had to piece bits of blogs, forums and tutorials together in order to get it working.

The solution that I have is no way near perfect. The permission settings that seem to have to be set in order to get it to work are strange and not particularly safe. Needless to say, it works and if it works for someone else and nothing breaks then I shall consider it a success. So what did I do?

Explode and Implode strings with PHP

So I came across a problem at work the other day: Take a string (in this case Job number) with a “/” in it and manipulate it. The strings looked something like 126/6. I needed to be able to perform a couple of condition based actions on the string. Doing this meant that I had to take the string apart, perform what I needed to do, then sew it all back together again. In order to do this I knew that I would need to explode the string using PHP's built in explode() function but didn't know how I would then be able to stitch the string back together once I had done the necessary manipulations.

How open are you?

So, I was browsing about the net today and stumbled upon this blog post. A neat little trick I thought, I wonder how well I will score? It appears that I am 99.6% open! In my opinion, I think that makes me pretty open!