Been a while…

since my last post, almost a year and a lot has happened. Two Ubuntu releases, third one being in alpha right now, Windows 7 and Snow Leopard. The latter is the one I’m using to write this particular post. Yeah, that’s right. I got a Mac, but no only did I get a mac, I got myself a copy of Windows 7 Home Premium and I got myself a Linode, running Ubuntu 9.04 and waiting for the next LTS release to upgrade.

As you might imagine I have got lots of stories to tell, if I can be bothered to actually write posts. But I’ll try.

‘sudo’ for Powershell, sorta

Using powershell one thing I found annoying is just could’t figure out how to run processes with elevated rights without having to start a new, elevated powershell. I was looking for a sudo kind of command/script.

I was hitting the big lower case g (google) and found this. Thanks to Tsukasa I finally found a ‘sudo’ for powershell.

I just had to figure out a why to get it to work. Probably there are others looking for the same I thought I might just summarise the steps it took to make it work. Continue reading

Playing with Windows PowerShell

Making the switch from XP to Vista64 I found myself playing around with the OS and some of Microsoft’s current projects and tools. As a Linux command line enthusiast I was always bothered by the lack of a good shell for the Windows part of my computer life. Cygwin just felt wrong and since I heard about the new MS shell called Powershell a while back I thought maybe I should give it shot. Getting used to it.

What I really liked is the fact that they took a lot of familiar u/*nix shell commands, using them as aliases to their own commands. So, there are different commands you can use to achieve the same task. Pretty simple example everyone should be familiar with is listing files in a directory.Doing a ‘Get-ChildItem’ will get you to your list just as ‘ls’ or ‘dir’ does.

‘Get-Process’ and ‘ps’ is just another example and the only strange thing about it, is that the aliases always seem to be be the better choice, since they’re much shorter and therefore quicker to type.

Why would you type ‘Get-Help New-PSDrive’ if you can do the same typing ‘man mount’ ?

That’s it for now. Next time I’ll tell you how to get a little sudo-like command for Powershell.

In the mood…

Sometimes you feel like everything you do is just boring and nothing could change that.

Sometimes you don’t feel like blogging at all, because you’re not sure if there is anything to write about.

Sometimes however you do feel like writing a blog post because it could be the revelation you’re looking for.

 

I haven’t been actively doing anything with my blogs or websites for quite some time now and I think it’s the right time to change that. While I was being bored I managed to do some things that I’m going to write about in the days and weeks to come.

Among those things are a guide on how to set up your own Ubuntu server in Virtual Box on Windows to use to get some ssh and web action going. Another thing I plan writing about is setting up IIS7 on Vista and getting some applications and modules up and running.

So, that’s it for now. Hope to see you next time.

Turn Pidgin into an awesome Microblogging client

Pidgin, Free Software multi protocol instant messenger, is the choice of many users on both Windows and Linux machines and a lot of people use it to post messages on on Microblogging sites like identi.ca or Twitter, either directly via xmpp in the case of identi.ca or using ping.fm, the probably most popular web application to post on several services simultaneously. I will show you some plugins to enhance the Microblogging experience using Pidgin.

First of all if you don’t know what Microblogging is, and you’re lazy to type Wikipedia into you’re location bar here’s the link to the the entry about it. Long story short, it’s basically some sort of online community where you can post public and private messages usually of 140 characters, the size of an SMS. It depends on your encoding, and responses on services like jaiku can be much longer, but that’s just to get you sort of an idea what it’s about.

This cap of characters your able to use is already the first problem you’ll probably face using Pidgin as you have absolutely no idea how many characters you already typed into the input field while the web sites of the services themselves usually show some sort of counter next to the input area or field. This brings us to our first plugin:

ConvCharCount

It’s kind of a no brainer to guess what it does. It counts the characters contained within the input area of Pidgin and shows the count on the right side of the bar where the emoticons, formatting and the like are located. Get it here

Pidgin identi.ca/Twitter Status

These two plugins set your status message to whatever your last dent on identi.ca or tweet on twitter was, only use one at the same time. Installation is quite easy, on Linux and you should already have everything you need to run them, on Windows however you’ll probably need to install ActivePerl. Which isn’t uncommon and you need for a lot of Pidgin plugins. Anyway here’s the like for the identi.ca plugin and here’s the one for the Twitter one.

Twitter in your profile

It puts your last tweet inside your protocol’s profile at a position you defined. You can put all your usual stuff in there and tell the plugin where it has to put the text of your last tweet. Personally, I don’t see a use for this. Is there anyone who even pays attention let alone looks at profiles on instant message services? Well, if your part of such a group this is probably for you. It works and it does what it promises. Link

Microblog-Purple

This is the one plugin you should probably keep an eye on or maybe even start using it today. I currently only supports Twitter, but other services like Jaiku and identi.ca are planned for the future. When Twitter dropped it’s xmpp support a lot of people were sort of pissed as they couldn’t use pidgin anymore to post tweets. Ping.fm already existed at this point which some did not want to use following their Stallmanian ways. Microblog-Purple, when activated adds another protocol to your account management: TwitterIM. After you gave it your password and account name you can start writing and reading tweets. Link

I know that there are a lot of desktop application like Twitux, Twhirl and Gwibber out there which do an amazing job and which I used for a while and appreciate all the work that was put into them but I prefer to not run one gazillion applications at the same time, and if Pidgin does the job. Why not?

The Digg effect and what I could have done

Yesterday I received a lot of traffic, and a lot it is still quite of an understatement. When I realised where all this traffic was coming from it was already to late and only a bunch of cached pages withstood the enormous flow of visitors — at least for a while. I felt victim to the digg effect and sixteen thousand hits later I knew what I could have done to keep my blog alive.

In the evening my shared host provider sent me an email in which he explained that they though there was an DoS attack directed at my page and that they had to move me on an isolated server, after a quick email discussion and me telling them that it was in fact the digg front page what caused DoS like traffic they put me back on line.

There are few things I could have done to prevent the site from going down, the best probably being getting a root or managed server instead of an shared host but that’s not a quick solution and as I think this is probably an isolated case not really necessary. Now the support team of my hosting provider gave me this great tip on how to get rid of all that incoming digg traffic which was taking down my site with some short two lined addition to my .htaccess-file.

RewriteCond %{HTTP_REFERER} ^http://(.+\.)?digg\.com/ [NC]
RewriteRule .* - [F]

These to lines will drop incoming traffic from digg and show them a forbidden instead of forwarding them to my index.php where a lot of load is produced executing or accessing php files. Some people will assume the site remained done, some will be just confused why they’re forbidden to access the site, as I know digg some will shout censorship, and those who know what happened will just enter the URL in their address bar and access it this way as only traffic from digg is blocked. Anyway, I thought there is maybe a more elegant way, which I didn’t use because I did not know what Wikipedia’s policy would say about this and to be honest I’m just too lazy to dig it up. It is possible to to redirect incoming traffic from a specific source, in this case digg to a completely different URL and one that would suit quite well is the Wikipedia entry about the digg/slashdott/etc. effect.

RewriteCond %{HTTP_REFERER} ^http://(.+\.)?digg\.com/ [NC]
RewriteRule .* http://en.wikipedia.org/wiki/Digg_effect$1 [r=301,nc]

Well those two are what I could have done, but when I noticed what was happening most of the traffic has already had happened and at this point there was nothing I could do.

I think I was quite lucky that I installed the wp super cache add-on for WordPress which cached pages, making static URL files being served instead of executing the PHP files every single time which reduced the load at least to some extend but it clearly wasn’t enough and the server struggled every time a new page has to be cached.

Is there anything else more I could have done? I love the idea of a WordPress plug-in that puts those lines in my .htaccess every time a set number of visitors from digg or other social media sites tried to access the page, I don’t even know if this kind of automation is even possible though.

Clever idea, Youtube in “Super HD”

We all know Youtube made some progress in terms of quality of their videos, they still pretty much blow compared to every other video site out their and I doubt they’ll change a thing as their lead in the market isn’t in really in danger. This apparently wasn’t enough for blogger Mr.doob and he put up a video on his site powered by youtube with four times the resolution of an ordinary one. Continue reading