Was working on some personal project which required interacting with ISBNDB’s REST API. But couldn’t find any node module for the same.
Took some time off from the project and started to work on creating a node module for the same. And finally have succeeded in publishing a stable first release. Currently it only scrapes the tip of the vast API designed by the ISBNDB team, will be adding new features to the module ASAP.
Have been using a cool product IOGraph for the past few days. The basic feature of this application is to track your mouse movements, and generate a visual, which you can opt to save as an image. Below is a sample result, that I tried.
The above image was generated after tracking 3.6 hours of mouse activity during my day job.
You can find more images in the flickr album that I have created.
Sometimes when you are processing a huge number of files, you might need end up having the error “Too many open files”. I recently bumped into a similar issue, and the following code helped me solve the issue
ObjectSpace.each_object(File) do |f|
if f.path.include?("rails_app_directory/tmp/uploads") && !f.closed?
The above code looks for open file descriptors from the desired directory and closes them. You can definitely change the file path according to your needs. This basically helps you keep the number of open files in your application in control, and in turn also improves the performance of your servers.