Use twitter from the terminal!
March 20th, 2009
Today I decided that I’m going to give twitter another try, but the first thing that struck me was how cumbersome it was to actually post a tweet.
The way I did it:
- Open your favourite browser
- Go to twitter.com
- Log in
- Write a tweet
I’m a Linux user and I love the terminal. Wouldn’t it be better to write tweets from the terminal? – Yes it would!
I have written a quick and dirty python script that enables you to write tweets from the terminal.
You can download the script here.
Install guide for Debian:
Step 1: Download
$ wget http://dibon.net/tweet
$ chmod +x tweet
$ sudo mv tweet /usr/bin/
Step 2: Install curl
The script uses curl to send data to twitter, if you don’t have curl installed you have to install it:
$ sudo aptitude install curl
Step 3: Make the config
Make a file called “.tweet” in your home directory:
$ vim .tweet
And insert the following:
[login]
username = YOURUSERNAME
password = YOURPASSWORD
You may want to edit the permissions for the file
$ chmod 0700 .tweet
That’s about it. You may have you reopen your terminal window before you can use the tweet command.
Usage:
$ tweet "I'm writing a tweet in terminal!"
Unfortunately it is necessary to use single or double quotes before and after the message.
Tip of the week: When We Left Earth
March 19th, 2009
Server up and running!
March 18th, 2009
A while back i ordered computer components for a server. Since school has been quite busy lately I haven’t had time to actually do much with it, but the last couple of days I’ve finally got it running.
The specs:
- 2.7 GHz AMD Athlon X2 64 bit
- 4GB of DDR2 ram
- 2x 500GB
- 4x 1000GB
I’m running 2x500GB in RAID 1 as system disk and the 4x1000GB in RAID 5 for storage. The server will primarily used as a private file server, but I’m also running Apache, MySQL etc. on it too. I have (with much help from Harald Nesland, thank you!) got a DNS server working, and I’m now hosting the domain logarit.me (“logaritme” is Norwegian for “logarithm“).
Happy π day!
March 14th, 2009
Did you know March 14th is the PI day? No? Well it is!
Hurray for π!
To celebrate this awesome day I just ordered a π-watch and the a π-mug.
More stuff at http://www.piday.org/.
How to FAIL twice in one day
March 2nd, 2009
Have you ever wondered how you could FAIL twice in one day? Sure you have!
Here are two tips to get you going:
Tip one: The ATI graphics driver install
When installing the ATI drivers for your graphic card in Ubuntu: Never ever check what graphic card you really have, take a guess and stick to it. Be sure to spent at least 2 hours trying everything from hacking with the aticonfig-tool to reinstalling the same driver. After two hours (or more) you’ll might find out that you have a X1600 card, instead of a X1300, then the solution becomes fairly obvious. Instead of using 2+ hours you could have done it in about 30 seconds with the correct drivers. But hey, whats the fun in that?! :_((
Tip two: The famous 5-minute WP installation
When you’re about to update WordPress from the 2.6.x to the 2.7.x be sure that you don’t have any backup what so ever! This is a key step to get this guide to work. If you have backup of your wp-config.php, theme files etc. there is no fun in doing this. Delete them right away!
Now, download then newest wordpress version. Before you continue with the actual install you have to make sure that some of the folders have some strange permissions (Why? I don’t know). If you don’t do this your FTP-client (I assume do use FTP) will just overwrite the files and all the fun is gone. Instead you will have a mix of new and old files side by side! Now you have to upload everything from the newly downloaded version of WP and check that the FTP-client is set to overwrite all files.
When the upload is finished you try visiting your blog page, and what do you know, the update has fucked up! At this point it’s important to get frustrated and just delete the whole shebang and try the good old reinstall. The reinstall seems to work, all the files is installing in the right way and everything is great! Now you go to you blog page. What do you see? “There doesn’t seem to be a wp-config.php file. [...]“. “wtf?!” might be your first response, but then you remember, you deleted all the WP-files a couple of minutes ago, including wp-config.php of course.
One should think that missing the wp-config.php isn’t that bad, basically it’s just information to log in to your MySQL database. Well, if you want to make things really interesting you have cleverly disguised your WP-database with a non-describing name. After some minutes looking through your databases you find the database with contains the WP data, and everything seems to go your way.
FINALLY! The blog is back, or wait, what the hell is this?! – The default wordpress theme?! Yes, that’s right. Don’t you remember? You deleted all your old theme files – and you don’t have any backup! Oh well, it shouldn’t take more than a couple of hours to get a working theme up and running again. Enjoy! :(
Summary
Yesterday sucked monkey balls :(