Blog Posts

Word Search Using grep and AWK

In one of our project we needed to search for multiple words from a file and return the found words. These files would be large and there might be large number of words to search for also. Ruby has a good support for regexp, however it would be slow in doing these searches for patterns as compared to unix commands and hence we decided to look for certain unix commands for doing these searches. We went through “grep“, “awk” and

Continue Reading

Mount Remote File System Using Fuse and sshfs

In one of the project we needed to store data in our data center i.e not place(store) it on cloud specifically. And this data needs to be available to multiple users/system. The operation on this data included creating/editing a file, copying a file from those stored data or copying to it. After searching a few, we decided to use Fuse along with sshfs. Fuse allows to use a  remote file as a local file and allows us to make changes

Continue Reading

Convert Speex file into MP3

Speex to Mp3 using ffmpeg and lame In one of the project we receive a speex(.spx) file from client and we have to play on browser as well as in local machine. So i am using ffmpeg and lame to do this job.It is 2 step process. Step 1 Speex(.spx) file first need to covert into wave(.wav) file using ffmpeg. Step 2 After wave(.wav) conversion convert into mp3 using lame library More info regarding lame you can find out here. You can also manipulate ffmpeg

Continue Reading

Selenium in headless with Xvfb under RUBY

Today I will demonstrate how did I manage to get Selenium (browser => “firefox”) running under headless state (click here to know more on this) . Now we need Xvfb to accomplish this dirty task. For Ubuntu the package is fairly straight forward just type in the command . Under Fedora the same can be achieve using command . For more on Xvfb package  check your distribution provider .

Continue Reading

Conditional GET

I have to admit this . I always fall in love with RAILS each day as I explore it to know how a complex problem can be handle with great ease and with minimum amount of code. That what made me write this post on " Conditional Get Request." For those who aren’t aware of it let me give them some insight in it. Conditional GETs are a feature of the HTTP specification that provide a way for web servers to tell

Continue Reading

Dynamic Report In Ruby On Rails

In my recent work i have face some difficulties for generating different report for different organization or client using same application,because every client have their own reporting format. Like SAAS based application if it is generate some MIS report and if client require some more or less information depending upon his requirement we can give some editable facilities to edit and generate report. So to fulfill this kind of requirement user editable report which contains Markup + ruby code for

Continue Reading

Rchart Charts And Graphs For Ruby

Rchart is ruby port of the slick pChart charting library. Using Rchart we can develop various format of chart. Line Chart Cubic Curve Chart Bar Chart Pie Chart Filled Line Chart Stacked Bar Chart And many more ,You can checkout examples of rchart.Some of examples are listed below. Rchart gem require ruby-gd gem and GD library. To install rchart gem on ubuntu following packages needed. sudo apt-get install libgd-ruby sudo apt-get install libpng-dev sudo apt-get install libgd2-xpm-dev sudo gem install

Continue Reading

Amazon Simple Queing Service (SQS) + Ruby

Amazon Simple Queue Service (Amazon SQS) is a distributed queue messaging service. The idea of SQS is to remove the direct associations between producer and consumer and act as mediator between them. e.g Consider that you have a large  application like websites monitoring which involve many stages like Downloading a website Processing the downloaded website Generating report of the above processing So instead of clubbing the above three one can just split them on their specific need(based on the work

Continue Reading

Convert open office document to another open office format

In many application we want to convert one office format to another office format e.g doc to PDF , doc to html etc.We can import/export document using OpenOffice easily,but this is manual way.But standalone/Web based application we have to automate this functionality. JODConverter,the Java OpenDocument Converter, It converts documents between different office formats using OpenOffice. JODConverter supports all conversion which is given by OpenOffice.More Info regarding format you can visit here. Now,JODConverter is a java library so it can be

Continue Reading

Site Footer