Torrenting on Linux

Filed Under (Tutorials) by Karun on 21-02-2010

Tagged Under : , , , , ,

rutorrent webUI

rutorrent webUI screenshot (traffic statistics)

As of today, the primary OS on my laptop is Ubuntu and since torrenting is a good way to get open source applications (such as Eclipse), I thought I should definitely invest the time to get a decent torrent client. I’m not saying that Transmission isn’t a good client. I certainly can’t say that since I haven’t used it for more than 5 minutes. I simply lacks umph. It really doesn’t impress me as much as uTorrent does on Windows. So let’s look for an alternative client.

Using uTorrent with Wine is always a popular option, one most Windows to Linux converts happily embrace. Let’s face it, uTorrent is awesome. But I really wanted to embrace Linux which for me meant to stop using the mouse and GUI as much as possible (not that difficult for me) and getting used to native applications rather than applications via Wine. This meant no more uTorrent for torrenting and no more mIRC :( The alternative I settled for came highly recommended by quite a few users. And oh, look at that, it’s terminal based. Of course, I’m talking about rTorrent ;)

I have tried to install rTorrent before and failed. This time around, I had managed to get rTorrent to install and work fine but I couldn’t get a webUI for it to work. So I had dt walk me through the process. I’ll try to document as much of it as possible to help users going through the same issue.

If you want to see a couple of screen shots of the end result before beginning, visit the rutorrent website and check out the screen shots. The best part about it is the tracker based, per torrent and global settings along with the pretty amazing traffic plug-in which gives your multiple (group) views of your traffic statistics. It’s pretty cool ;)

Read the rest of this entry »

File list generator v1.1

Filed Under (Development) by Karun on 14-02-2010

Tagged Under : , ,

On a lazy Sunday afternoon when you’ve got nothing better to do, you either write rather useless scripts or update them. I chose to do the latter.

The file list generation script I wrote some time back was mainly to generate a list of movies I have. When I generated a list of all the HD movies I have on disk, I realized, my list was being ruined by loads of sample files which escape the file filter because they are the same extension as the videos themselves. So I decided to write a simple fix to remove all files with “sample” in it. Of course, this is activated by a command line switch which is by default off. The extension list now ignores all images (pngs, jpgs and bmps) so my file list no longer has any screen shots.

Here’s a couple of sample script calls

C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -command& ‘C:\Users\Karun\My Scripts\filelist.ps1‘” “H:\Movies\HQ
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -command& ‘C:\Users\Karun\My Scripts\filelist.ps1‘” “H:\Movies” “true
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -command& ‘C:\Users\Karun\My Scripts\filelist.ps1‘” “H:\Movies” “true” “true

The first one will call on the script and generate an output. The second will do so recursively. The third one will ignore all files with the word “sample” in them. Simple enough? Go get the code and have fun with it!

View Script Source Code | Download Script Source Code

If you’re having trouble executing the script, you should consider signing your PowerShell scripts. Scott Hanselman has written a great post on how to do so. Go read it! You could simply Set-ExecutionPolicy to Unrestricted but then you’d be leaving your system open to attacks. Don’t blame anyone but yourself if you run someone else’s unsafe code and screw something up :) You have been warned :)

Playing videos in RAR archives

Filed Under (Tutorials) by Karun on 07-12-2009

Tagged Under : , , , ,

A lot of people today download videos (TV shows and movies) off the internet using torrents or Usenet. Most sources pack the videos in multi-part RAR archives to minimize loss in case of error prone transfer. Though this does not make much sense usually on protocols such as the bittorrent protocol but it does on the scene where data is transferred using FTP. In such cases, you are left with a lot of rar files that you have to keep (if you’re seeding on trackers) and extract every time you want to play them.

Some video players like VLC and XBMC came up with a solution. On the fly extraction of multi-part archives to play videos. Not all players support this though. Just recently, I came across something that can solve this problem. You can now use RARFileSource to get your favourite video player to read videos in RAR files and play them.  RARFileSource is a DirectShow filter which let’s most video players read RAR files on the fly. The only restriction is that the video should not be compressed. Thankfully, this is the scene norm so you need not worry. Just install the application (117 KB) and drag drop a RAR archive on to your favourite video player. Works fine with MPC: HC for me and WMP for dt (who suggested this to me).

Now you can seed your files and play them from the RAR archives directly only extracting them when you need to give them to someone else ;) Cool, eh? :D

Clean File List Generation with PowerShell Script

Filed Under (Development, Tutorials) by Karun on 06-12-2009

Tagged Under : , ,

I have a whole load of movies that I’d like to generate a list of. I considered writing a batch script but it didn’t really do something I needed. I ended up writing my first regular use (non test) PowerScript and here’s how.

My first requirement was to list all my 1080p movies and for the list to leave out all the subtitles. So I was looking for a function to list files (dir in command prompt did that :)) and then remove files by extension. As it turned out, I could list files of a certain extension but not leave out files by extensions. Finally, I had to write the result to file (simple enough to do in command prompt. Use the > operator to direct output of the previous command to a file) So, a quick fix would be to use something like

dir *.avi *.mp4 *.mpg *.mpeg *.mkv /B /O N

For sub-folders, you can use tree and fiddle around the options but lets face it, as programmers, we want better solutions.

Since the launch of Windows 7, Microsoft has shipped PowerShell with the OS making it much more “main stream”. I had played around with PowerShell a couple of years ago when version 1 came out but I thought it was time that I actually made a regular use script.

The core of the script is using get-childitem to get all files and folders in a directory. From there, you can make it go recursive (and look inside sub directories) with a -recurse switch. Little bit of piping allows you to eliminate results you don’t need. For this, I wrote a simple function.

function fileCheck([string]$extention, [string]$attributes) {
# list of rejected extentions
$exts = “.srt”,”.sub”,”.idx”,”.txt”,”.lnk”

return $exts -notcontains $extention -and $attributes -ne “Directory”
}

As you’ve probably figured out, this function ignores those file extensions and directories as well from our final file list.

Once you have the list, you can either use $object.Name for full name (ie file name with extension) or $object.BareName for only the file name. On reading the source of my script, you’ll see I’m using both and also writing a count of the number of files in a file named list.txt. The first part of the file is a human readable list for your consumption using new lines for separation. The second is a single line output of all files using commas for separation and containing a file count at the end. The latter is simply for copy pasting into chats (like IRC) where you can’t spam with a huge multi-line list.

I went on then to add more code to handle command line inputs so that you can make shortcuts from folders and call the script. I have attached a couple of sample script calls

C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -command& ‘C:\Users\Karun\My Scripts\filelist.ps1‘” “H:\Movies\HQ
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -command& ‘C:\Users\Karun\My Scripts\filelist.ps1‘” “H:\Movies” “true

The first one will call on the script and generate an output. The second will do so recursively. Simple enough? Go get the code and have fun with it!

View Script Source Code | Download Script Source Code

If you’re having trouble executing the script, you should consider signing your PowerShell scripts. Scott Hanselman has written a great post on how to do so. Go read it! You could simply Set-ExecutionPolicy to Unrestricted but then you’d be leaving your system open to attacks. Don’t blame anyone but yourself if you run someone else’s unsafe code and screw something up :) You have been warned :)

Trying Minefield 3.7a1pre

Filed Under (Hacks, Review) by Karun on 03-11-2009

Tagged Under : , ,

firefox-aero-preview

Firefox Aero Preview

Ever since I started using Win7 (first public beta) I have liked one thing about Internet Explorer that Firefox couldn’t do. This was the ability to use Win7’s Aero prowess completely rendering each tab in the Aero preview for Firefox. At the time, Microsoft hadn’t come out with the Win7 UX Interaction Guide but it’s been out for a few months and I was quite disappointed that Mozilla didn’t jump at the opportunity to release an upgrade.

A couple of weeks back, I saw screen shots of my friends’ browsers and noticed they were using Minefield. They confirmed that 3.7a1pre does indeed have full Aero support so I finally upgraded. I must say, it’s a great update.

As you can see from the screen shot, it doesn’t really like some pages in the Aero preview. I am pretty sure it’s an AJAX thing.

Of course, if you consider updating, quite a few of your plug-ins will not work simply because of the version compatibility checks. A simple way to by pass this is to install the Nightly Tester Tools to skip Firefox’s version compatibility checks. Most add-ons should work fine.

Firefox with Strata Addons

Firefox with Strata Addons

There are a few add-ons I’d like to recommend with this alpha. Try checking out Strata40, StrataBuddy and StrataGlass. StrataGlass is amazing (works on any machine running on Vista/7) but it did give me problems on some pages so I disabled it. However, it is a great idea and it looked really nice. If someone irons out the wrinkles, I’d love to wear it everyday with my Firefox :)

Ctrl+Shift+Tab after turning browser.ctrlTabs.previews on

Ctrl+Shift+Tab after turning browser.ctrlTabs.previews on

Another small change I’d definitely recommend to users is going to about:config, past the warning, searching for the browser.ctrlTab.previews setting and setting the value to true (simply double click on it to toggle). After this, try Ctrl+Tab to get tab previews. If you think this is cool, try Ctrl+Shift+Tab to get previews with the ability to search between them. Doesn’t that make life easier when you have loads of tabs? ;)

I’d like to thank my friend Nitro for showing me the Strata add-ons and telling me about the Ctrl+Tab setting ;) Ctrl+Shift+Tab was purely luck ;)

PS: Manan asked me over twitter about the memory usage of Minefield 3.7a1pre and I must say, it’s quite low. In fact, with 8 tabs (none of which are heavy on AJAX other than the Wordpress panel), I’m using 125MB RAM. Though I’ve not confirmed it, I’d say that’s slightly lesser or the same as regular Firefox and Minefield even seems a tad bit faster and more responsive even with all my regular add-ons ;) Impressive :)

MP!L Forum Elite Member

Filed Under (News) by Karun on 28-10-2009

You might have heard about Messenger Plus! Live, a Windows Live Messenger add-on that has over 62 million users already. I’ve been on their support forum for nearly 5 years now and been a beta tester for nearly 2 years.

Early on the morning of the 27th of October I stumbled upon a thread simply titled “New Elite Members” and I found this interesting since it was the first time in my 5 years on the forum that new additions to the staff were being made. I opened it to see who the lucky people were. I expected a couple of lads to be added but the list had more like 12 people.

The first 3 people were all ones I knew so I skipped straight to the bottom of the page to leave a congratulatory message for them. After typing that out, I continued reading the page and to my surprise I found my name on it :-|

I was absolutely shocked. I have spent a lot of time on the forum but over the past couple of years, my post count really hasn’t moved much more than a couple of hundred. I do however spend a couple of hours every day helping out on the Messenger Plus! IRC support channel but I didn’t really think any one noticed.

I must say, I am absolutely honored. The decision was made by the staff and for the fool who voted for me, I have to say “HAHA.. you totally wasted your vote :p”. But seriously, thanks a lot guys. Feels good to be part of the “staff” of a forum with over 85,000 users for a software which has over 62 million users.

The forum and IRC have given me a lot. They have taught me most of the things I know, give me loads of friends and great experiences. And then to be made an Elite Member.. it’s an honor.

My user bio now accurately represents my status in the community

Messenger Plus! User (since v2.x)

Messenger Plus! Live Official Tester (since v3.5)
Messenger Plus! Live IRC Help Chan Op (since 2008)
Messenger Plus! Live Elite Member (since 27/10/2009)

Now to become IRC oper (I’d probably need to kill segosa for that ;p), MVP and then take over the world!

Windows 7 Launch Party

Filed Under (News) by Karun on 02-10-2009

Tagged Under : ,

Windows 7 Launch Party is a party organized by individuals in their homes, offices or other commercial venues celebrating the launch of Windows 7 and showing off its prowess. Its being done through the House Party website and the only reason its not called that is because Microsoft didn’t want to restrict the venue to homes. Great PR is what I say.

Why am I giving you stale news? Well, this isn’t really news but I applied around the first week of September got selected first as a candidate host then got a confirmed host status. Last night I got an e-mail stating my party package is on its way.

All hosts will receive:

  • One limited Signature Edition Windows® 7 Ultimate
  • One Puzzle with Windows® 7 Desktop Design
  • One Poster with Windows® 7 Desktop Design
  • Ten Tote Bags with Windows® 7 Desktop Design for hosts and guests
  • One table top centerpiece for decoration
  • One package of Windows® 7 napkins

The package should arrive by this Tuesday or Wednesday. The party is planned for the 23rd of October at 7.00 PM and is an invite only party. So drop in a line and I’ll try to get people in :) After all, my room can only fit that many people in.. :P

Anonymous Microsoft Developer opens AMA discussion on reddit

Filed Under (News) by Karun on 14-09-2009

Tagged Under : , ,

Ever wanted to ask what really goes on at Microsoft to a softie? Want to know about some random bytes of code inside Windows? Want to know who really killed Microsoft Bob? Well, here’s your chance!

Ask him about anything from life at Microsoft to questions on their product and business strategies. As he puts it, he will try to answer them without getting fired :P

I worked on Vista and Windows 7, and will also be working on Windows 8. Ask me anything you want about the company, culture, lifestyle, seattle, products, etc. and I’ll answer the best I can without getting fired.

He has put up some info for students looking at becoming Interns at Redmond. Most of it is the same stuff you’d read around the internet but here’s something I read for the first time and I must say, I agree with especially since this was how I got my trip to Redmond ;)

Also, there is one other way you can consider to try to get an internship. The Imagine Cup is a competition that Microsoft hosts for students. In the past, top ranked students from each region have been flown out for interviews at Redmond, skipping the whole screening process. I can’t promise that they will continue to do this, but if I ever saw a student who placed well in the imagine cup, I would definitely see it as being very positive.

I must say, the guy is brave. I think its a good move. There are a lot of misconceptions about Microsoft as a company. It isn’t (all) evil :P I wish I knew he was. I’d certainly like to meet him and have a chat :) If DrinkingKoolAid ever reads this (chances are surely slim), get in touch with me. The first round’s on me!

Dell Win7 x64 sound driver updates cause system freeze

Filed Under (Thoughts) by Karun on 13-09-2009

Tagged Under : , , , ,

I noticed that Dell had finally released updates for some of their drivers on their support site for a Dell Studio XPS 1640 on Windows 7 x64. I immediately started downloading them and after a reboot noticed that the update for IDT sound driver causes a freeze in any application trying to do anything related to sound. No updates on their track pad drivers it is so we continue to use Windows Vista drivers.

Speaking of IDT drivers causing serious woes, I would suggest to every Dell Studio XPS 1640 user planning to upgrade from Windows Vista to Windows 7 manually (ie. not using a ghost image provided by Dell) that you kindly DO NOT DO SO. Drivers such as the ones for IDT consume 40-50 CPU constantly for doing nothing of essence in the background. A simple “remove driver” wouldn’t work either. If Dell plans on shipping drivers like the current one, I would not even go to Dell for an upgrade to Windows 7.

Dell better come up with a fix quickly. I think I’ll call up Dell’s premium tech support just to tell them about this issue and hope its fixed quickly. On a side note, for some reason, side scroll on the track pad doesn’t work on Windows 7 in the current version of Firefox :( It works fine for every other software. Weird.

Update: Just talked to tech support. Seems I’m the only one who has issues. Weirdly enough, a reinstall of the driver seems to have fixed the issue. ¬¬ Some odd quirk I guess.

http://hax.gifpaste.org/?C=M;O=D

Building a Home Server: Part 1

Filed Under (Hacks, Tutorials) by Karun on 10-09-2009

Tagged Under : , , , , ,

The first question in your head would be “Why the world do I need a Home Server?

Good question. I’d like to ask you a couple of things. Do you have multiple machines in your house? Do you ever feel like you should have centralized storage in your house? Do you have old hardware simply lying around the house waiting to be tinkered with? Do you like playing with your machines?

If you said yes to (most) of the above questions, having a Home Server could help you :) It can handle not only centralized storage of media and documents but also backups. Have you ever needed a file from computer x in your house and found it was shut down after being used by a family member? Well, you wouldn’t have this issue if you had a central server. People could go around switching off their machines all they want as long as you have the file you want on your Storage Server.

Lets get into it then. From now, I’ll walk you through how to make your old machine into a Network Attached Server (NAS).

Read the rest of this entry »