Skip to main content

Posts

Showing posts from January, 2018

FFmpeg tools in Rails Application

FFmpeg is an extremely powerful and versatile command line tool for converting any multimedia files. It is free and available for Windows, Mac and Linux machines. Whether you want to join two video files, extract the audio component from a video file, convert your video into an animated GIF, FFmpeg can do it all and even more. FFmpeg commad synopsis ffmpeg [global_options] {[input_file_options] -i input_url} ... {[output_file_options] output_url} ... Some Basic and Useful Commands Cut video file into a smaller clip ffmpeg -i videoplayback.mp4 -ss 00:00:50 -codec copy -t 20 output.mp4 Convert video from one format to another ffmpeg -i videoplayback.mp4 -c:v libx264 filename.wav Mute a video (Remove the audio component) ffmpeg -i videoplayback.mp4 -an mute-video.mp4 Convert Video into Images ffmpeg -i videoplayback.mp4 -r 0.25 frames_%1d.png Convert a video into animated GIF ffmpeg -i videoplayback.mp4 -vf scale=500:400 -r 5 -t 00:00:30 image.gif

Blockchain API Payments Integration in Ruby

How blockchain works Blockchain is a distributed database, which consists of two records: Individual transactions Blocks Individual transactions consist of “Header” and “Data” which is related to transactions. Transactions take place for a given period of time. Block is used to create alphanumeric string called as “Hash”.When the first record is created, the next block takes previous block’s Hash for creation of their own Hash. This is authenticated or validated. At this point of the Blockchain process, a majority of nodes in the network must agree the new block’s hash is correctly calculated and ensures that all copies of the distributed ledger share the same state. Once block added, cannot be changed. If we try to change or swap that block, the hashes for previous and subsequent blocks will also change. The other computers in the network will also understand that problem and they will never add new block, until the problem is resolved. When the problem is so

Filterrific - Rails Plugin for search, sort & filter data

What is filterrific? 'filterrific' gem is used for filtering the data only. It is a Rails Engine plugin that makes it easy to filter, search, and sort your ActiveRecord lists. Ruby On Rails Gem Filterrific Features of filterrific gem: It Integrates with pagination Filters can be reset to default settings Makes heavy use of ActiveRecord Scopes API option to use Filterrific with Rails API mode. Just use gem 'filterrific', require: 'filterrific_api' in your Gemfile ActionController helpers to shuttle filter params from ActionView forms to ActiveRecord based models, and to return matching records back from ActiveRecord to ActionView It depends on ActiveRecord scopes for building DB queries Can be used for HTML/JS/JSON/XML response formats It is used to run filter settings from a filter UI to the controller and ActiveRecord It persists filter settings in the HTTP session or DB for saved searches Dependencies: Rails - 3.x and a

Introduction of Docker Tools For Beginners

What is Docker? Docker is the world's leading software container platform. Docker is a tool designed to make it easier to deploy and run applications by using containers. Containers allow a developer to package up an application with all of the parts it needs, such as libraries and other dependencies, and ship it all out as one package. Where does Docker operate? Design Development Deployment Testing/Release Docker makes the process of application deployment very easy and efficient and resolves a lot of issues related to deploying applications. Build app lication only once: An application inside a container can run on any system that has Docker installed. So there is no need to build and configure application multiple times on different platform. More Sleep and Less Worry With Docker you test your application inside a container and ship it inside a container. This means the environment in which you test is identical to the one on which the app