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 …
Blog Posts
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 …
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 …
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 . …
There are various library for manipulating image,one of them is GD library. In this post i quickly show how to resize an image or generate thumbnail of image using GD2. Basic steps as follows First import image Resize an import image to desired size Export Image to desired file above code is extracted from rchart. …
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 …
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 …
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 …
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 …