Managing daemon using daemon-kit

Hey all, In Previous article i have given short bio of ruby daemon using daemon kit. In this post i am writing about how to manage daemon,how to start/stop a daemon from any directory. We can start a daemon using following way. Go to the directory and give the command. or (You know the difference right; To run it in foreground or background respectively.) But consider this possibility, what if you didn’t want to go to the directory where the

Continue Reading

Understanding Daemonkit

Hey all, Many of us knows what daemons are in linux. These are processes or programs that run in background with little or no user intervention. Now we can write daemons in ruby too. And for doing so we can use Daemon-Kit(https://github.com/kennethkalmer/daemon-kit). Now the daemon can do the task continuously or do it at particular interval of time or do it depending on a particular event. Daemon-Kit provides a skeleton to write these different types of daemons with the help

Continue Reading

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

Site Footer