Updated: September 16th, 2012

Introduction

StackOverflow is an amazing site for coding questions. It was created by Joel Spolsky of joelonsoftware.com, Jeff Atwood of codinghorror.com, and some other incredibly smart guys who truly care about user experience. I have been a total fan of SO since it went mainstream and it's now a borderline addiction (you can see my StackOverflow badge on the right sidebar).

The Story

Update 6/21/09: This server is currently under very heavy load (10-200), even with caching plugins enabled. Please bear with me as I try to resolve the situation.

Feel free to bookmark this page and return to it later when the fires have been put out.

Update 06/21/09: I think I've got the situation …

Read the rest of this article »

2

Quick Perl Snippet: Finding If A File Has A Media Extension Using Regex


Posted by Artem Russakovskii on March 21st, 2008 in Programming

Updated: May 1st, 2008

Sometimes in my line of work, I need to figure out if a url or filename point to a media file by checking for the file extension. If it's a url, however, it may be followed by various parameters. Not to overcomplicate things, I came up with the following Perl code:

1
2
3
4
5
6
7
8
9
10
#!/usr/bin/perl -w
use strict;
my $name = "some_file.flv"; # or http://example.com/file.mp4?foo=bar
my $is_media_type = ($name =~ /\.(wmv|avi|flv|mov|mkv|mp..?|swf|ra.?|rm|as.|m4[av]|smi.?)\b/i);
if($is_media_type){
  print "media extension found\n";
}
else{
  print "not a media file\n";
}

Read the rest of this article »

84

Mass Renaming Directories And Files Using Total Commander


Posted by Artem Russakovskii on March 12th, 2008 in Programming, Technology

Updated: September 16th, 2012

If you're like me, you constantly move and rename files and directories. You are also an extremely productive person with evangelical ideals of making every task as efficient as it can be. In this tutorial, I will use my favorite must-have file manager called Total Commander (formerly, Windows Commander) and its brilliant Multi-Rename Tool.

You can download a shareware version of Total Commander at www.ghisler.com. I encourage you to buy it after you try it as it'll soon become an integral part of your life. I've been using it for more than 10 years now and seriously can't imagine my computer without it.

Now for some quick tasks I'd like to accomplish using the Multi-Rename Tool in under a …

Read the rest of this article »