Colourful Tabs in Screen
Wednesday, December 24. 2008
A while ago I posted about screen, and included my .screenrc file. I got some teasing for this, since the tabs show up pink. In fact this .screenrc file is one I stole from somewhere a few years ago and didn't really think much about the colours. Since then I've fiddled with the colours and now use different colours on different servers, which is a nice little addition.
Its really easy to do - using the .screenrc from my previous post - just replace all the M and m characters in the last line with the colour you'd like. I started off with something like this:

replacing m with y and M with Y I get:

I've also used g/G and c/C codes for other servers, which looks something like this:

I seem to be keen on subtitles in blog posts, but I've not labelled many of my screen tabs in these examples (I have no idea why, I usually do). The yellow example has one where one of the tabs is named and this is really helpful once you get past about three tabs and start losing which one was tailing the apache logs! To label a tab in screen, go to that tab and then ctrl+a, shift+a and you are typing in the box. Enjoy :)
Its really easy to do - using the .screenrc from my previous post - just replace all the M and m characters in the last line with the colour you'd like. I started off with something like this:

Y is for Yellow
replacing m with y and M with Y I get:

Green and Cyan
I've also used g/G and c/C codes for other servers, which looks something like this:

Titles
I seem to be keen on subtitles in blog posts, but I've not labelled many of my screen tabs in these examples (I have no idea why, I usually do). The yellow example has one where one of the tabs is named and this is really helpful once you get past about three tabs and start losing which one was tailing the apache logs! To label a tab in screen, go to that tab and then ctrl+a, shift+a and you are typing in the box. Enjoy :)
Stale NFS File Handle
Thursday, December 18. 2008
We had some fun and games with our house server recently, when one of its disks died horribly*. I've only just got around to sorting out the backups again now, which use an external USB hard drive and rsnapshot. I started by reading my earlier rsnapshot post and also the one about the gotcha with mounting external drives. And yes, I do use this blog instead of a working human memory, much easier to find things.
When I mounted the drive, I saw I had one of the older daily.* directories with question marks for its name, date, permissions and so on when I ran ls. When I tried to do anything with the directory, I got the error stale NFS file handle, which was interesting since we don't use NFS. After some looking around, I got the recommendation to run fsck.
Before running fsck, the drive must be unmounted.
Then, since mine was sdb1 I ran:
fsck -y /dev/sdb1
The -y switch asks fsck to try to fix every problem it encounters (this was quite a life saver, there were thousands of them before I stopped holding my finger down on the "y" key!) - it comes with warnings that experts may do better to fix manually, but really that's not me.
The disk is now fine and the backups run fine, I guess it was just the old disk on its way out copying nonsense onto the external drive during backups.
* The stupid thing then blew up its power supply and took the UPS with it a week later, but that's the way the cookie crumbles.
When I mounted the drive, I saw I had one of the older daily.* directories with question marks for its name, date, permissions and so on when I ran ls. When I tried to do anything with the directory, I got the error stale NFS file handle, which was interesting since we don't use NFS. After some looking around, I got the recommendation to run fsck.
Before running fsck, the drive must be unmounted.
Then, since mine was sdb1 I ran:
fsck -y /dev/sdb1
The -y switch asks fsck to try to fix every problem it encounters (this was quite a life saver, there were thousands of them before I stopped holding my finger down on the "y" key!) - it comes with warnings that experts may do better to fix manually, but really that's not me.
The disk is now fine and the backups run fine, I guess it was just the old disk on its way out copying nonsense onto the external drive during backups.
* The stupid thing then blew up its power supply and took the UPS with it a week later, but that's the way the cookie crumbles.
Relocating a Wordpress Installation
Friday, December 12. 2008
Wordpress is a fine basic website tool, and I've used it for a few different odds and ends. One thing it does have that suprises me every time is that it uses a setting for its web address. So as part of the install, it sets this setting and then everything works. Or rather it does, so long as the web address of the application doesn't change.
Well I'm working on something that I'm developnig locally, checking in to a subversion repository, and then deploying to another server (and other people will be doing the same when they collaborate with me). Wordpress isn't really designed for that, or for the situation where you have a copy of the database, and the code and need to restore it to a different place for any reason. The admin login form is accessible - but then submits to the old location before you can get in to change the settings.
Anyway it turns out to be really straight forward. The URL is in the database and a one-line query mends the problem. I'm putting it here for the next time I need it :)
UPDATE wp_options SET option_value = 'http://new.path.to/blog" where option_name = 'siteurl';
I found some complicated instructions for moving a blog too - but this will also work for that scenario. This was wordpress 2.7 (their new and shiny version!), I'm not certain which other versions this would apply to but add a comment if you can expand on this please!
Well I'm working on something that I'm developnig locally, checking in to a subversion repository, and then deploying to another server (and other people will be doing the same when they collaborate with me). Wordpress isn't really designed for that, or for the situation where you have a copy of the database, and the code and need to restore it to a different place for any reason. The admin login form is accessible - but then submits to the old location before you can get in to change the settings.
Anyway it turns out to be really straight forward. The URL is in the database and a one-line query mends the problem. I'm putting it here for the next time I need it :)
UPDATE wp_options SET option_value = 'http://new.path.to/blog" where option_name = 'siteurl';
I found some complicated instructions for moving a blog too - but this will also work for that scenario. This was wordpress 2.7 (their new and shiny version!), I'm not certain which other versions this would apply to but add a comment if you can expand on this please!
Girl Geek Dinner Next Week
Wednesday, November 26. 2008
I'm getting quite excited now about the next Leeds Girl Geek Dinner which is next Wednesday (3rd December 2008). Got some cool speakers by the look of it - I know Monica (and she is fab) and from Katie's bio we are in for a treat. Also I have been promised there is more food this time (hot and christmassy food .... yum) so count me in.
I often get asked why we don't allow men at these events - well of course we do. Men can attend but only when they are invited by one of the attending girl geeks (maximum one man each please, ladies!) - meaning we can have men who are likely to contribute to the event but not be invaded if we don't want to be. If you're a guy and looking to go, find a girl geek and ask nicely :)
I'll definitely be at this event - I look forward to seeing some others. I had a great time last time - so go and buy a ticket (cheap night out at £15!) and I'll see you there!
I often get asked why we don't allow men at these events - well of course we do. Men can attend but only when they are invited by one of the attending girl geeks (maximum one man each please, ladies!) - meaning we can have men who are likely to contribute to the event but not be invaded if we don't want to be. If you're a guy and looking to go, find a girl geek and ask nicely :)
I'll definitely be at this event - I look forward to seeing some others. I had a great time last time - so go and buy a ticket (cheap night out at £15!) and I'll see you there!
Posted by LornaJane
in tech
at
12:50
| Comments (0)
| Trackbacks (0)
Defined tags for this entry: leedsgirlgeek, tech
Leeds Girl Geek Dinner - December 3rd
Friday, November 7. 2008
Announcing the second girlgeek dinner in Leeds! The event will be Wednesday 3rd December, at The Loft Leeds and tickets are available now, priced at £15. Monica Tailor from Kilo75 will be speaking at the event, and it will have quite a Christmassy feel.
The rules of the girl geek dinners is that any geeky girls can go - and not just tapping-into-a-black-screen-in-a-darkened-room geek girls, there is no minimum requirement! Guys are also welcome but they must be there as the invited guest of one of the geeks. I'm open to persuasion if anyone would like to attend as my guest - and for the girls, I'll see you there :)
The rules of the girl geek dinners is that any geeky girls can go - and not just tapping-into-a-black-screen-in-a-darkened-room geek girls, there is no minimum requirement! Guys are also welcome but they must be there as the invited guest of one of the geeks. I'm open to persuasion if anyone would like to attend as my guest - and for the girls, I'll see you there :)
Posted by LornaJane
in tech
at
09:11
| Comments (3)
| Trackbacks (0)
Defined tags for this entry: leedsgirlgeek, tech
Opera's Address Bar AutoCompletion
Thursday, October 30. 2008
I recently upgraded the copy of Opera on one of my machines, only to find a few things about it which had changed from previous versions were driving me mad!! Immediately noticeable was that the address bar autocompletion seemed to have gone completely nuts. It was autocompleting all sorts of addresses that bore no resemblance to what I was typing, and it was giving me deep-link choices first, so I couldn't autocomplete to just the domain I wanted, for example.
It turns out that this new behaviour is, in fact, a feature - Opera remembers the content of all the pages you've been to as well as just their URLs, and then it tries to give you the most relevant matches in your address bar. Well that doesn't work for me. Address bars are for typing addresses and search engines are for searching content in my world, maybe I'll find this useful one day but that day isn't right now. The good news is, its easy to turn off.
Just go to Preferences -> Advanced -> History and then uncheck the box "Remember Content on Visited Pages". Now when I start typing, I just get the URLs that look like my actual words, and with the shortest matches first. I'm safe to upgrade the other machines now!
It turns out that this new behaviour is, in fact, a feature - Opera remembers the content of all the pages you've been to as well as just their URLs, and then it tries to give you the most relevant matches in your address bar. Well that doesn't work for me. Address bars are for typing addresses and search engines are for searching content in my world, maybe I'll find this useful one day but that day isn't right now. The good news is, its easy to turn off.
Just go to Preferences -> Advanced -> History and then uncheck the box "Remember Content on Visited Pages". Now when I start typing, I just get the URLs that look like my actual words, and with the shortest matches first. I'm safe to upgrade the other machines now!
Posted by LornaJane
in tech
at
13:17
| Comments (6)
| Trackbacks (0)
Defined tags for this entry: tech
(Page 1 of 6, totaling 36 entries)
» next page


Comments
Wed, 07.01.2009 11:14
Fantastic! Well done Lorna! Now you need to get an ivory tower!
Mon, 05.01.2009 13:06
Doh! Interesting that you play piano, didn’t know that pi ece!
Mon, 05.01.2009 10:46
Daniel: I completely agree. I do like and use Zend Framewor k, but I already have books about it. When I buy a book on a subject, I don’t really want lots of ZF content. I can on ly assume that because its seen as a “buzz word”, people fee l the need to include it in any books current being wr [...]
Mon, 05.01.2009 10:41
Ubuntu User, Prasad, Joe – I’m pleased this was helpful, tha nks so much for dropping by and letting me know it worked ou t for you :)
Sun, 04.01.2009 23:25
Thanks for the tagging :) I responded (first time ever): htt p://www.urbanwide.com/2009/01/05/7-things/
Sun, 04.01.2009 06:42
You are my freakin’ hero! Thank you soooo much! mainMem.useN amedFile=FALSE fixed all my problems, my wife came back, I w on the lottery….. :) Thanks! Joe
Fri, 02.01.2009 23:33
I agree with your issues about some of the book turning into a mini ZF tutorial book. I feel that lately a lot of spa ce has been wasted on PHP books re-explaining MVC concepts, THEN introducing ZF (or another framework). Chalk it up to p ublishers not wanting to assume everyone reading the b [...]
Fri, 02.01.2009 00:44
All the best for Peru, and the rest of 2009!
Thu, 01.01.2009 23:33
Berry__: For normal people that is probably true but I add all sorts of clues which are different per-server, and still find myself regularly confused about which machine I’m logg ed in to …