noizZze

Google+ Share Page Extension for Chrome & Co

Update: I wasn’t aware but now I know that the extension works for Chrome and everything Chromium-based equally well.

Just put together a simple extension for Chrome and company to share any page through an active Google+ account. Just install it and look for the “+” icon in the address bar. Clicking on it brings a popup that loads the official button with the counter and everything.

Please note that sharing is possible for public pages only. For private pages you’ll probably see an error from G+. Enjoy.

Download and Install the Chrome extension

Bug reports and suggestions are welcome!

Adding Audio Track to Video With Ffmpeg

I enjoy many TV Shows, but it’s hard to find an acceptable (read respectable) quality, and so recently I downloaded a translated version of Stargate Atlantis but with an original English track sitting in a separate MP3 file. I’m on Mac OS X and love using VLC for playing media, and to give it a credit, it supports this scenario, but in an inconvenient way – you have to choose two files manually each time. That’s when the grey matter comes in.

We Require…

I have just been contacted with a job offer through a respectable web site that read like this.

We require a high-skilled RoR developer who can help us with our … site, which is under construction now. You will be working with one more developer, but most of your work will be independent. You should be able to quickly learn and understand existing code, suggest improvements, add new features and functionality. We work in short iterations and all your tasks will be listed in Pivotal Tracker, so you should be able to take an assigned story using this service. You will get very clear and very detailed specifications for all functions and we will be available for questions whenever you have them (you should feel free to ask us in English, Ukrainian or German). Besides, you should be able to deliver code in an efficient and high-quality manner to our production server.

If you are interested, please, send us only relevant samples of your work. We would like to see Rails applications that you have built, especially code samples where we can see the quality of Code, written by you. If you want to send us applications developed by you in collaboration with other programmers, tell us about your participation in this project and part of work done personally by you.

Are you already itching to join their team? You should… you should… you should…, send us…, tell us. Now, how about you tell me what is so exciting about your product that I need to drop everything I have on the table and join your “one more” developer on this quest? A challenge, a relocation, heck, if it’s just money I would love to know that. If you are looking for someone having hard time to find anything to get them busy with and feeling it’s an exciting offer, you have missed the door. Highly skilled people don’t look for work as desperately as you could have imagined. I think I’ll pass on this one, no matter how appealing taking an assigned Pivotal story sounds.

To top things, there were neither a greeting, nor a signature. How embarrassing is that?

Redis and Resque Customizations

For one of the projects I’m working on for my clients we need a robust and easy to use queue. Redis and Resque is a great combination that fits us well except that we can’t:

  • Vary the interval between polling queues. When you know how much exactly you have to sleep before the next job can be picked for execution, there’s no need to waste precious time waiting longer than that.
  • Skip queues under certain conditions. If you know you need to pause a queue (throttling, for example), you couldn’t do it without hacks. Now you can.
  • Expand queue name patterns into the real queue names. Sometimes we don’t know which queues we’ll use (dynamic names), but we know the pattern (say, ‘mt_*’). You can write your custom queue lister that will convert any notation you want into the list of queues at run time (before the polling begins).
  • Specify the target queue when scheduling a job. Say, I have a SendMessage job and I want to prioritize the delivery for certain recipients.

To address these problems I forked the Resque repository. The results you can find in my fork with nice documentation and full test suite.

I’m also thinking of adding queue meta-data functionality to let workers / jobs assign bits of information to the queues for later reference. In my case, I want to know when the last job was processed in this queue to be able to skip over the queues crossing the throttling threshold.

Backing Up: Backup Ruby Gem

Backing up has never been easier with a little Ruby gem – backup. It offers huge array of features including various database adapters, flexible filesystem archiving, compression, encryption, backup destinations and synchronization. Every option is explained in its corresponding section in details.

Backing Up: Introduction

It’s not a secret the most valuable asset of any application is its data and you have to protect it at all costs. In the following series of posts I would like to share several strategies I’ve come across over the years.

Backup Ruby gem. Not to waste much time on theory, in this post I would like to run through the real scenario of backing up a snapshot of directories and the database snapshot to Amazon S3. It doesn’t matter if you aren’t into Ruby. Ruby is currently on almost every Unix box by default, so you could start using the gem straight away.

Incremental backup with RSync will show you how to quickly sync your local data to a different location (Dropbox folder or external drive, for example). Nothing out of ordinary, but has its uses, as well as serving a nice introduction to more curious stuff.

Theory of backups rotation will talk about rotating your backups with minimum disk usage, while maintaining completeness. Sorry Windows users, it’s Unix-specific.

Amazon EBS snapshots concludes the series of posts with a very practical scenario that you could apply today if you are an Amazon EC2 user.

Hope you’ll enjoy it!

Max

I figured I might want to make a quick post here for those who follow this blog, and not my Twitter account. Recently (on Jan 24, 2011) Kate and I became parents. We named our first-born “Max” and he is a very active little buddy.

Ok… have to go. He’s giving some hard time to his mom. :)

Friendly Composite Keys in Mongoid

By default, Mongoid generates long hash-like keys from BSON that incorporate time, machine ID and counter. Pretty unique, but user unfriendly (for example, 47cc67093475061e3d95369d).

To solve this, Mongoid lets you define a custom composite key on the document and during the creation of the key it escapes special characters that may be found in the original string. So for example, ‘~’ is converted to ‘-tilda-’ and ‘-’ is converted to ‘-dash-‘. Yes, I don’t like it as well as I don’t like ‘_’ to be converted to ‘-undscr-‘. It looks pretty ugly in the URL.

So here’s a little trick if you want to make it replace all non-alpha and non-digit characters with dashes:

You need to put it in the initializer. I do this in config/initializers/mongoid.rb.

9Cells: Recording Video Tour

It has become an established practice these days to have a video tour on the application web site. When the concept of the app is new it is supposed to help users to figure it all out a great deal.

In the case of 9Cells, we have very few conversions so far. People don’t even try to click on the “Create Survey” link, and my best guess is that’s because they don’t see the meaning and value in the application.

This is primarily the reason I decided to invest some time and effort in creating a brief end-to-end tour focusing on clarity and the ease of use.

The script

I started with the script that would reflect a workflow of a typical user:

  • Click on the “Create Survey” link
  • Log into Twitter
  • Create the survey
  • Load credits into account
  • Start the survey
  • Monitor the progress

Next I ran through the workflow and imagined what I would be interested in knowing at each step and added necessary comments and explanations to the script.

Video

To record the video I tried several tools. On Mac we have this free QuickTime Player that is capable of recording the video from screen in real-time. It’s absolutely fantastic, but lacks a couple of features I needed for this recording:

  • Limiting the area to a single window dimensions
  • No click indication

Yes, I can crop the area afterwards to limit the view, but my quick tests showed the results are usually crappy, unless I go nuts with hardcore semi-console tools.

After snuffing around, I found a very nice and simple tool — Screenflick — an all-in-one recording solution that sits in the status bar and does just that — records, records, records. It’s packed with all essential features (click indication, keypress popups etc) and very reasonably priced.

Lessons learned during the recording:

  • Don’t move mouse cursor around unless it’s necessary. If you need to insert a few scenes later or need to stretch one for a bit longer to fit in all explanations, you will end up with jerky mouse cursor movements.
  • Don’t rush. Take your time on each screen. You will be able to remove unnecessary frames later. It’s way harder to add them.
  • Don’t scroll the screen unless necessary. Again, it makes harder to cut frames and insert new ones. If you need it, do it. If the hands are just itching, sit on them.

For the video mastering I chose iMovie app bundled with every Mac. It does the job relatively good and it’s free.

Audio

I’m not a native speaker and currently live outside English speaking countries, so that’s not an option for me to either narrate myself or find someone to do that for me. At least, it’s not THAT easy. That’s why I decided to use the “Alex” voice that comes with every Mac running Leopard. Saying whatever I need is as easy as running “say” command in Terminal. And what’s great about it is that I can run it hundreds of times to get it right — it won’t grow tired or pissed.

After all phrases were recorded to files, I started aligning them with video in iMovie. As expected, sometimes there were too much video, and sometimes I had to stretch it to let the narrator finish the phrase. All in all, it went surprisingly well, and I even enjoyed the process.

Embedding

With mastered video in hands I needed to put it on the front page of 9Cells. As usual, there are millions of options as to where and how to display the video. At first, I chose to put it instead of the gallery, and so had to reduce the size of the picture from 640x480 to even smaller 480x360. The result was barely viewable, and thus I made a step back and decided to use one of the lightbox popup plugins. I chose Fancybox. Why? It’s easy to configure, does what’s necessary and has callbacks. I’m sure there is at least a dozen of them falling under this description, but this one didn’t give me a single chance to regret it.

To play the video there’s one almost defacto tool — Flowplayer. It’s on Flash (yeah, I know about iDevices), but it works for the huge range of video formats, has hundreds of plugins, easy to script and incredibly flexible.

Finally, I took 10 minutes to create a “Video tour” badge in Photoshop.

Conclusion

The results of this effort are currently on 9Cells. Let me know what you think. Any feedback is warmly welcome.

9cells.com: Get Votes for Your Works

Just released a fully functional early BETA of 9cells.com – the service that lets you get votes for up to nine images in one compact survey.

  • Designers: Check which of your logos, designs, templates people like the most
  • Photographers: Find your best composition, colors etc
  • Eveyone else: Not sure which pic to print and hang on the wall? Which of the flowers to send to your mom?

There’s plenty of uses!

Check it out and let me know…

Oh, and if’t not too much to ask, please tweet about 9cells.com and use #9cells hashtag.