Posted on: 18/01/2010 20:56:17 - No comments
Tagged in: fluxbox, fbpanel, battery, bash, send-nofity, libnofity-bin, debian.
I realised that fbpanel didn't have a default battery monitor and I got sick of opening a shell and typing "acpi -V" all the time, well actually I am lazy and forgot and had a few Homer moments and lost bits of work. So I knocked up this script for fbpanel.
On Debian it requires libnotify-bin for the send-notify to work correctly and here is the battery icon. You will need to place both in a directory called "bin" in your home directory and make sure both the directory bin and the script are executable (chmod +x battery etc) and in your $PATH.
The fbpanel bit is added to ~/.fbpanel/default
Make sure you back it up first eh?
Plugin {
type = genmon
config {
Command = ~/bin/battery
PollingTime = 60
TextSize = xx-small
TextColor = white
}
}
Command is obviously a call to the script
PollingTime is how often it is run (in secs)
TextSize is obvious along with TextColor
You'll need to restart the panel so open a shell and:
killall fbpanel && fbpanel &
This will gracefully stop and restart the panel to a background job.
If you're using this on something other than a notebook then you'll have to mess with the coordinates of the notifications. I've set the script to notify on anything below 11% (it's adequate for me and keeps the script simple) feel free to adjust to your needs. In fact you can safely remove it if you just want to sit in the bottom right (default). I think the script is easy to understand but ask away if you don't get anything or indeed have a better way of doing it.
Spicing it up, of course you can add sound notifications to it, or if you're a festival user you can add something like:
echo "Battery Low"| festival --tts
if like me you've constantly got headphones in to the end of the notification. Beware if you've got a busy CPU you may end up with race conditions.
Known Issues: Incorrect string when less than 10% - might fix it but since 10% = 20mins on my battery I am not that fussed as I will have plugged the power in. If you decide to fix this that's up to you.
Posted on: 06/01/2010 12:12:06 - No comments
Tagged in: whaling, sea shepherd, campaigners, japan.
Anti-whaling activists have accused a Japanese vessel of ramming their high-tech speed boat during a confrontation in the Southern Ocean.
The Sea Shepherd Conservation Society says its vessel was sliced in half, but all six crew were rescued.
Read the rest here.
Posted on: 13/12/2009 13:03:40 - No comments
Tagged in: mysql, save, oracle, help.
The below is very important:
I, Michael "Monty" Widenius, the creator of MySQL, is asking you urgently to help save MySQL from Oracle's clutches. Without your immediate help Oracle might get to own MySQL any day now. By writing to the European Commission (EC) you can support this cause and help secure the future development of the product MySQL as an Open Source project.
Please continue reading the article.
Posted on: 16/11/2009 13:08:39 - No comments
Tagged in: forums, custom, work.
I'm tasked with creating a custom message board system at work. This entails re-inventing the wheel but that's cool, I'm always doing that on a day-to-day basis anyway.
Requirements
A great deal of message boards out on the web for free download are way to over spec for what we need and also do not offer the level of customisation at the data level that we require either. Most are also not set up for multi-server instances where load balancing is taking place where sessions are handled by something other than the server itself. To this end the market place has a huge gap on this front. Cloud computing might be the new buzz word, but in reality we've had it for years. It used to be called clustering and load balancing. Load balancing shapes your traffic where clustering offers redundancy; should a server go down for some reason then another takes its place. Traditionally most shared hosts, which is what a great deal of professionally written forums are designed for, have the database on the same server and although they support an external database they hardly ever support multiple instances again. You know, we might require one cluster to do the writes and one to do the reads, maybe even one cluster to deal with nothing but blobs or profiles, user access... the list goes on. To this end nothing off the shelf that I know of supports our level of infrastructure in the way we need it to. Also can you imagine some of the more popular boards dealing with 32,000+ users, they'd all crawl to a halt, I know; I've seen it before.
Custom written
To this end I need to write one from scratch, of course this has it's downfalls and potential pitfalls. I'm not daunted by that. I guess the only thing that concerns me is the potential user base (32,000+ off the bat and only likely to get bigger) and the need to load balance things, this isn't a problem until you encounter sessions, if your load balancers aren't set up correctly and do a 1-1 split on requests we soon hit an issue on storing information in a session, this then falls back to a cookie, which can also have the same problems, especially when it's set against the domain; but your DNS has the domain pointing to a firewall... The other side is integration of other services both internal and external to us. I just can here everyone screaming Sharepoint, Twitter, Facebook, the CMS, my shared drive and the like. Which poses several problems and that's data management and privacy. Whilst one person on any number of threads might want to shout to the world, just as many won't. Do I tie logins in to our network or have a separate login for forums, LDAP or Active directory? Email notifications, RSS the list goes on and on...
This task isn't small; but it will be interesting. w00t.
Posted on: 28/10/2009 18:10:33 - No comments
Tagged in: twitter, phishing, scam.
If you get any DM's with links to http://blogger.djhxkcs.com it seems to be a phishing scam coming from China (or a server compromised in China) - Details are:
IP: 220.164.144.202
Just add it your host files and direct it to 12.0.0.1 - If you own networks with lots of users, consider banning it on IP tables.
Simply add:
iptables -A INPUT -p all -s 220.164.144.202 -j DROP
iptables -A OUTPUT -p all -s 220.164.144.202 -j DROP
To your chains at least till the attack is over.
Posted on: 27/10/2009 22:05:12 - 6 comments
Tagged in: craving, brain fart, hosting, development, freelance.
For the last few months I've been sounding out a few old contacts and doing various bits of freelance development again after a years hiatus from doing anything serious. Some of the folks that have known me some years know that I ran a successful email system and was a happy freelancer for a long time. I also run a hosting endeavour at the moment. The hosting works, makes money and because of my experience as a systems admin is semi-trivial and doesn't really take up a lot of time.
The fact of the matter is that I don't want to up-scale it and the reason is it doesn't financially up-scale all that well due to competition (that I can't and won't try to compete with), I've been there before and frankly I'd rather not loose sleep. Also there would come a time when I would need to make a choice, a choice I'm not in the mood to make right now because of the current financial markets.
That said... after a conversation I had earlier, I'm craving. So thanks Jake, thanks a lot... no really :-)
Also, I managed to catch up with a few people I've not spoken to in nearly six years this evening; as it's the first time I'd logged on to MSN for probably that long. WIN.
Posted on: 23/10/2009 11:17:00 - 1 comment
Tagged in: lady.
So today it's been a year since I had to put my dog to sleep. I think about her everyday and miss her terribly. I think it's easy for anyone to understand that if you spend the amount of time I did with your dog then it does leave a massive hole in your life when they're gone.
Simple things like being used to being greeted and knocked over when you come home, the interactivity, the level of trust and responsibility you feel, the loyalty, the knowing no matter how shit you feel they always seem to cheer you up. I can't really get it across in words very well to be honest. All I know is her being gone leaves a gap that won't be filled. I spent the entire of my adult life with her, the up and the downs. She wasn't an ordinary dog in any sense. Fiercely loyal to me, wasn't frightened of anything or anyone and had tenacity in buckets.
I still have her daughter, who hasn't been the same since, she still looks for her mum from time to time and strangly enough she's been quite quiet the last few days, maybe she's picking up vibes from me or she actually remembers; I don't know.
You're not forgotten Lady and sorely missed by not just me :o(

x
Posted on: 21/10/2009 20:00:23 - 4 comments
Tagged in: censorship, bnp, labour, bbc, question time, hain.
With all the media frenzy about the BNP being on Question Time it has gotten me thinking, a lot. Personally I can't stand, no, HATE the BNP. I've spent a lot of time at anti-fascist protests in the past and I don't mind admitting I've had my fair share of scuffles with right-wing muppets.
I'm however quite shocked at the level of media coverage of Mr Hain and his insistence on not letting the BNP on Question Time because he argues that the BNP is illegal because it does not allow ethnic minorities to join. Does that mean we'll not ever allow ANY of the people who claimed for stupid things and took tax payers money because they committed fraud? I want the BNP on Question Time and I'll tell you why, I want Griffin to make his own noose and hang his party on TV, hopefully with the help of Jack Straw. I also think that to try and censor them is more abhorrent to me than listening to them. I'd like to keep the freedom of choosing not listen, rather than have that choice made for me.
Like I say, I hate the BNP but I hate censorship through political arguments a LOT more. I'm quite aware I'm generalising here and this post is more a brain fart than anything else so feel free to flame away.
On a more tongue in cheek note; could it be argued that because of the idiot leadership of New Labour that in itself is the reason that the BNP got votes in the first place, have a seat; and are appearing on the TV?
Visit Hope Note Hate and get involved if you really hate the BNP, just remember when it comes to silencing people, who knows when you'll be next eh?
Posted on: 20/10/2009 09:14:00 - No comments
Tagged in: idiots, spam, bot-net, windows, microsoft, phishing.
From: no-reply@tek.org.uk
To: tek@tek.org.uk
Subject:A new settings file for the tek@tek.org.uk has just been released
Date: Tue, 20 Oct 2009 13:15:49 +0530 (08:45 BST)
Dear user of the tek.org.uk mailing service!
We are informing you that because of the security upgrade of the mailing service your mailbox (tek@tek.org.uk) settings were changed. In order to apply the new set of settings click on the following link:
http://tek.org.uk/owa/service_directory/settings.php?email=tek@tek.org.uk&from=tek.org.uk&fromname=tek
(which was actually http://tek.org.uk.ttl1lll.net/owa/service_directory/settings.php?email=tek@tek.org.uk&from=tek.org.uk&fromname=tek)
Best regards, tek.org.uk Technical Support.
Nice Try, shame I am the admin, user and owner of the box and domain eh?
When will these pricks learn.
Edit: Since this post I am now getting a massive amount of them from different "accounts" @tek.org.uk all targeting my tek@ account, it is amusing and ANNOYING at the same time. Every single email suggests they're being pumped out of a bot-net and each box is, funnily enough, using Outlook to send them. It's at times like this that I hate a certain OS vendor.
Posted on: 19/10/2009 08:55:40 - No comments
Tagged in: gdm, gnome, builder, web-app.
I've been building & testing some code recently. I'll get what I've been working on up sometime tonight. Basically I have been making a web-app that you can make GDM Greeter Themes with. GDM is the logon screen for GNOME if you aren't aware. So.. You upload a picture of your choice, fill in some other details and you have a greeter.tar.gz file spat back at you which you can use to install the theme.
So far it's quite basic, you can choose colours and upload a background image; but that is all. The idea is not to create visually stunning themes with multiple images, but allow perhaps the less technical users a chance at having a more personal login theme.
Edit: Obviously I didn't get chance to put the GDM Builder up, I was way to busy reading through the Twitter API and messing about with it. Sorry.
More Pages