If you want to write to a file in linux you can do the following:
echo "something" > /var/log/test.log
but if the test.log file is only writable by root, then you have to use sudo.
sudo echo "semothing" > /var/log/test.log
but this also fails because it is only echo that is running as sudo not the actual writing to file.
The way I do this is my using the tee command:
echo 'something' | sudo tee /var/log/test.log
You could also do:
echo "echo 'something' > /var/log/test.log" | sudo sh
but that seems more hacky….
If backspace in nano does a forward delete instead of deleting the character to the left, then open the file /etc/nanorc and comment out the line set rebinddelete.
This should fix the "problem".
We are hiring a new Software Developer to our team in London. You can read about the position here:
http://www.footballradar.co.uk/job_developer.html

Grooveshark.com had some problems this morning, but the error page was funny.
It took me a second to find the text after "Going down for a bit"
Because of curiosity I have now signed up at twitter. I don’t know how much I will use it, but who knows. First impression is that it is exactly like facebook status messages. The main difference, as I see it, is the possibility of showing what people are saying (sorry twittering) about a certain word. This feature is not available on FB.
After spending a few more minutes I experienced something that I haven’t seen on FB…. SPAM!! I suddenly had 2 followers, but when I saw that it was "toyskatsfac" with the message "COME LOOK AT MY NEW NUDE PIX http://is.gd/2Crhs" and "Sabrina3w29" with the message "any cute single guys? comment me at http://xurl.jp/xb3a" I knew that it was SPAM..
So 5 minutes after I signed up I had to deal with SPAM. I can block the people, but it leaves a negative impression of the site. Hope it is getting better.
Follow my tweets on www.twitter.com/johanlaidlaw (If there will come any)
I’m leaving for a 5 month adventure on tuesday. The trip starts at Venezuela and ends in Kenya. The trip can be followed at www.johanlaidlaw.dk/into-the-wild
Here are some interesting stats about Roskilde festival.
http://ibyen.dk/musik/article645043.ece
The article is in danish.
When I was writing by bachelor assignment, the danish engineer magazine www.ing.dk wrote a small article about our project. Read the article here (it’s in danish)
When doing OOP in PHP it can be a pain to include all the different class files. The code becomes really ugly with lots of require_once() function calls and you risk to include classes that are never used.
This is were object autoloading comes in handy. In PHP 5 it is now possible to define a functions called __autoload() which takes the name of the class as parameter. The function will be called when trying to use a class or an interface that has not been defined yet. The function could look like this
function __autoload($class_name){
require_once('/classes/'.$class_name.'.php');
}
$obj = new MyClass(); //will load MyClass from /classes/myclass.php
MyClass::getSomething() //will load MyClass from /classes/myclass.php