Archive for the ‘Life’ Category

March 2012 Wendy House

Wednesday, March 28th, 2012 | Friends, Life

This month’s Wendy House saw Will lose his Wendy House virginity and Hugh make a return after what he claimed was an eight-year absence. That would mean that we was 16 last time he went, though if he settled into looking adult as easily as he has the bumbling old professor role in equal speed, it is in fact a perfectly plausible story.

A far bolder claim, but one I can assure you is true, is that Elettra given took to the dance floor and strutted her stuff! Add that to other things that happened and you actually have quite a strange, but very much enjoyable, night.

Persistent sudo

Tuesday, March 27th, 2012 | Life, Tech

Sometimes, you have a number of tasks to complete as an administrator and having to put sudo in front of every command just becomes annoying. Luckily, you can change into persistent sudo mode.

sudo -i

This will then prompt you for your password and once successfully entered, you will be transfered to the root user.

It is much like doing su, except that you are prompted for your own password, rather than the root account’s password.

View disk space usage by directory in Linux

Wednesday, March 21st, 2012 | Life, Tech

If you need to get a break down of how much space each directory is using, you can do that using the du command. Using a few choice options it will produce a list of all directories in the current folders and how big they are.

du -sch

Faster grepping with fgrep

Thursday, March 15th, 2012 | Life, Tech

If you use the Unix terminal, you’re probably familiar with grep. It’s a great search tool. But sometimes it is a little slow. Luckily, there is a faster version, with the original name of fgrep, though you might be surprised to learn it doesn’t actually stand for fast grep. But don’t be confused – it is faster.

You use it in avery similar way to the way you would use grep. So for most occasions, simply replace grep with fgrep for faster results.

House warming

Tuesday, March 13th, 2012 | Friends, Life

Last weekend we held our house warming party for our new place. Despite the continued and so far unstoppable process of ageing which continues to haunt us, we managed to keep going until gone 5am and managed to polish off around twenty bottles of various spirits – not to mention George getting through two vase-size snakebites.

Notice to require possession

Friday, March 9th, 2012 | Life

On Thursday, 1 December I received a letter from my letting agent, Walker Singleton, stating they would be terminating my tenancy because they had to sell the apartment on behalf of the mortgage company. I was shocked and alarmed at the idea of having to leave me home, so I phoned their office. Multiple times. They never answered.

I eventually managed to speak to them the next day, and said that if they had to sell the apartment, I would just buy it (at the asking price!), it would be cheaper for them, it would be cheaper for me, no one would have to move, everyone is a winner.

They said no, claiming they had to sell it with vacant possession, and if I wanted it I would have to move out, wait for it go on the market, then buy it and move back in.

I went away and discussed this with a few people, and it didn’t make sense to any of us. So on the Monday I rang them back and explained to them the situation in more detail, and that HSBC had said they would give me a mortgage, so this really was an easy win for the both of us.

They said no. I asked why repeatedly but they wouldn’t give me a straight answer, just saying they couldn’t do it. I then asked if I could speak to the owner of the property, or the mortgage provider. They said that wasn’t possible, but wouldn’t explain why.

So I went to the Land Registry and got the title register for the property and found that the lender was Mortgage Express. So I phoned Mortgage Express and they put me through to Possessions. Possessions said they hadn’t taken possession yet, so I would have to speak to Late Arrears. So I phoned their help desk back again and asked to be put through to Late Arrears.

They said they couldn’t discuss anything to do with the property other than to confirm that someone had a mortgage on it, but because I wasn’t the account holder I wasn’t allowed any further information.

I also tracked the guy down on LinkedIn

Hi Richard,

I’m a tenant of yours, currently living at an apartment you own – Crown Street Buildings in Leeds. I’m just looking for some more information about what is going on, as I’ve been served an eviction notice.

Best wishes,
Chris Worfolk

He never got back to me.

So now I’ve moved out and everyone seems to have come away with a loss. Bad times.

How to truncate an ARCHIVE table

Friday, March 9th, 2012 | Life, Tech

Archive is a cool MySQL storage engine designed for fast inserts. In fact, it’s so optimised for this that it actually only supports INSERT and SELECT – you can’t run UPDATE or DELETE commands against it at all.

This is a problem when developing though, as you’ll often want to empty out the table and start again. But because it doesn’t support delete operations, it won’t actually let you truncate the table! So to answer the question posed in the article title – you can’t.

Therefore, you have two options.

Firstly, you can drop the table and re-create it. This is the recommended way from MySQL, so make sure you have a copy of the table creation command handy.

The second option, the lazy hacky way if you will, is to change the table storage engine over to InnoDB or MyISAM, truncate the table, and then turn it back to ARCHIVE ;).

Following files using tail

Saturday, March 3rd, 2012 | Life, Tech

Tail is a useful command which allows you to see the end of a file. This is probably most commonly used when you want to look at log files as the entries of most interest are usually at the bottom. For example, if you wanted to view the last 50 lines of a log file you could use the following command.

tail -n 50 filename.log

A cool feature of tail is that you can also follow a file – that means continually monitoring it as changes come in. So if you are looking at the Apache error log for example, you could begin tailing the log and then cause an error and you will see it instantly come through on the log.

tail -f error_log

February 2012 Wendy House

Monday, February 27th, 2012 | Life

This month’s Wendy House represented the last Wendylicious that would be taking place at Apartment 31, given we were moving out a mere three days afterwards. Sad times indeed, but enough time at least to squeeze one more night of partying in.

View all PHP scripts currently running

Friday, February 24th, 2012 | Life, Tech

Need to get a list of all the PHP scripts currently running? Actually, this technique works for everything, you just need to change the argument you pass to grep, but for the purpose of this example, I’m going to say we’re looking for PHP scripts.

ps aux | grep php

This will then produce a list of all the scripts. The ps aux command gives us a list of every processing running on the system. We then pass this through to grep and search for what we want – in this case processing which contain “php”.