Skip to content

Instantly share code, notes, and snippets.

@deepti-kakade
deepti-kakade / gist:4320c3b2cc41549b8534
Created November 25, 2015 06:30
Token input code with ajax
$('#select-me').tokenInput("/prospects/get_associated_leads", {
searchingText: "Searching...",
minChars: 3,
preventDuplicates: true,
theme: "facebook",
tokenLimit: 3
});
{
"color_scheme": "Packages/Color Scheme - Default/Monokai.tmTheme",
"draw_white_space": "all",
"font_size": 11,
"ignored_packages":
[
"Vintage"
],
"margin": 2,
"rulers":
BleakHouse is a library for finding memory leaks.
we need gem cucumber-rails it will automatically install Capybara,selinium-driver,database-cleaner
Drivers
Capybara uses the same DSL to drive a variety of browser and headless drivers.
Selecting the Driver
By default, Capybara uses the :rack_test driver, which is fast but limited: it does not support JavaScript, nor is it able to access HTTP resources outside of your Rack application, such as remote APIs and OAuth services. To get around these limitations, you can set up a different default driver for your features. For example if you'd prefer to run everything in Selenium, you could do:
Rails creates a test folder for you as soon as you create a Rails project using rails new application_name. If you list the contents of this folder then you shall see:
$ ls -F test/
fixtures/ functional/ integration/ test_helper.rb unit/
The unit folder is meant to hold tests for your models
The functional folder is meant to hold tests for your controllers
FFmpeg is a very fast video and audio converter that can also grab from a live audio/video source. It can also convert between arbitrary sample rates and resize video on the fly with a high quality polyphase filter.
1) Install ffmpeg gem
sudo apt-get install ffmpeg
2)Install following required dependencies for video conversion
sudo apt-get install -y x264 libx264-123 libx264-dev libavcodec-extra-53