CircleCi Debug via SSH

Sometimes tests can be hard to debug, especially when they’re running on a remote machine.This can be done with ssh enabled build with CircleCi using Debug via SSH option. SSH can be enabled for already running build or with rebuild option. To enable SSH access for a running build, go to the ‘Debug via SSH’ tab and click the ‘Enable SSH for this build’ button. To start a fresh build with SSH enabled, for example if you want to debug a build that has already finished, click the ‘with ssh’ button alongside ‘Rebuild’: It provides key such as

Imgcache Plugin to store images offline for Cordova Applications

Introduction Image Cache is JS library used to provide a nice interface for locally storing images for offline apps using PhoneGap/Cordova. This library is especially useful for mobile web applications using Phonegap/Cordova where image becomes stale (invalid) after normal offline navigation. therefore in this case we can not relied upon Normal Cache. So by using image cache we can store images in the cache and replace the stale version of normal cache with fresh version of image cache. This is the best solution I have found so far to provide easy caching of images within a Cordova web

Wicked PDF : PDF generation plugin

Wicked PDF uses shell utility wkhtmltopdf to serve a PDF file to a user from HTML. In other words, you simply write an HTML view as you would normally, then wicked PDF takes care of other stuff. wicked PDF works on Ruby versions 1.8.7 through 2.3; Rails 2 through 5.0 Installation: To use Wicked PDF, first install wkhtmltopdf. Alternatively, you could use the wkhtmltopdf-binary gem by including it in your Gemfile. Add following gems to your Gemfile and run bundle install. gem 'wicked_pdf' gem 'wkhtmltopdf-binary' Register the PDF mime type in config/initializers/mime_types.

Ember-Data library for Ember.js

Ember-Data is a library for managing model data in Ember.js applications. It provides many of the facilities you’d find in server-side object relational mappings (ORMs) like ActiveRecord, but is designed specifically for the unique environment of JavaScript in the browser. When an API is represented using Ember Data models, adapters and serializers, each association simply becomes a field name. This encapsulates the internal details of each association, thereby insulating the rest of your code from changes to the associations themselves. Routes and Models In Ember.js, the router is responsible for displaying templates, loading data, and otherwise setting

Authorization with cancancan.

Cancancan is a gem used for Authorization in rails applications. It's very easy to use and offers a lot of flexibility. In this article, I am going to explain how to use cancancan for Authorization when users have many roles. Installation: Add this to your gem file and run bundle install gem 'cancancan' cancancan is continuation of the dead CanCan project. Cancancan gem is independent of any authentication system. I used cancancan gem with devise gem. After creating User model with devise and setting it up, it provides current_user method that returns 'current user' from session. We will use

Difference between passing object and id to link-to helper for evaluating dynamic segment in ember.

Let's assume we have route in our application: app/router.js Router.map(function() { this.route('category', { path: '/category/:id' }); } This route has dynamic segment. Whenever application will be loaded it will create url as '/category/1' , 'category/2' etc. What is Dynamic segment? A dynamic segment is a section of the path for a route which will change based on the content of a page. Dynamic segments are made up of a : followed by an identifier in path. If user navigates to 'category/5' then it will have category_id '5' to load correct category. Dynamic Segment

Rspec guideline with Ruby

Guideline for writing Good specs

Communicating with Sendgrid V3 API

Sendgrid provides email service which we can use for sending emails from our app and we can even track every details of any email sent through our Sendgrid account like whether it is delivered, opened, dropped and details of unsubscribed email addresses etc. There are also API endpoints provided by Sendgrid to access user subscribe/unsubscribe related data and email event data with respect to emails sent through your sendgrid account for which documentation link is provided at bottom. To understand this lets go through simple example to fetch sendgrid subscription groups data from your sendgrid account - Generate API

Allow posting comments by replying to an email with Griddler gem

As you’re probably aware, SendGrid is great at sending your email, but SendGrid can also help you process email using the Inbound Parse Webhook. The Inbound Parse Webhook processes all incoming email for a domain or subdomain, parses the contents and attachments of that email, then POSTs the multipart/form-data of the attachment and JSON-encoded content to the URL of your choosing. To send an email to the application we use sendgrid services. Sendgrid provides different APIs for different purposes. For incoming email processing use inbound parse webhook API. The API says that: The Parse API will POST the

Getting started with Nginx

Nginx is a web server software like apache. The purpose of a web server software to serve web page in response to a browser request. Nginx pronounced as engine-x. It is faster than apache web server for concurrent requests because it does not create a thread for request like apache. Here is a detail comparison of the two https://www.nginx.com/blog/nginx-vs-apache-our-view/ . Installing Nginx with passenger on ubuntu 1.Install rvm and ruby First update the packages in the system sudo apt-get update Then install the rvm and ruby if not installed using this commands curl -L get.