Enable Git auto-complete on Mac terminals

I have been using Ubuntu for most of my development works for a long time. But recently I also started working on a Mac on one of my projects. This was the first time I was using it. Most of the things felt homely but the first thing that caught my attention was, there no auto-complete feature available on the terminal for Git commands. Git is the first step to start working on any project, so this small thing was what I wanted to fix on Mac. I asked few of my fellow Mac using friends but they said it

Make Indicator always visible for UIScrollView in iOS Swift Language

Naturally, Indicator of ScrollView is visible when the content view of ScrollView is longer than ScrollView height and user drag on Screen. As we all know It is a default functionality, we can't make it always visible directly. Using flashScrollIndicators() method we can make it visible. Example override func viewDidAppear(_ animated: Bool) { super.viewDidAppear(true) scrollView.flashScrollIndicators() } But indicator only appears for some time after viewDidAppear method call and disappear again. Indicator only to reappear when the user touches the screen. To show indicator continuously without touching screen you can add flashScrollIndicators() method in Timer. Timers work in continuously with

Ember custom Truth helpers and Handlebar

Ember uses the Handlebars templating library for your app's user interface. Handlebars templates contain static HTML and dynamic content. It uses data-bindings for dynamic contents. For more details you can check ember documentation: Handlebar Documentation Helpers: Helpers are functions that are designed to help you control the way your data is rendered by the template in the browser for the client to view. Helpers helps you to add additional functionality to your templates beyond what is included out-of-the-box in Ember. Helpers are most useful to transform raw values from models and components into a format more appropriate for your users.

Implementing Rollbar in ember applications

Rollbar does real-time error monitoring for developers, It catches all types of errors and also show the root cause for error. In this article I am going to explain implementing Rollbar in ember application with ember-rollbar-client and configuration. Before using ember-rollbar-client we used 'ember-rollbar-cli` but It was not catching errors for Android and IOS builds. To use ember-rollbar-client add it in package.json After installing this package you need to add rollbar configuration in config/environment.js 'emberRollbarClient': { accessToken: 'rollbar-write-client-token' }; You can get 'rollbar-write-client-token' from rollbar for that you need to create a project in Rollbar. Then you will get

iOS 11 New Navigation Bar and Search Controller

As we all know the apple is bringing all the new changes in iOS every year, they are improving the the UIKit for the better User Interface for iOS. Today we will see 2 new changes of UIKit in iOS 11. Navigation Bar Controller A navigation bar appears at the top of an app screen, below the status bar, and enables navigation through a series of hierarchical screens. When a new screen is displayed the back button appear with the label of previous screen title on the left side of the screen. We can also add button on the right

More about Functions, Pure and Impure Function...

When we write code in Imperative programming languages, we make this mistake of considering a procedure as a function many times without realizing it. We keep using word function commonly. Whether the written method is a function or not. If you do not believe me then keep reading this article and you will see that. To start with let's see what is actually a Pure Function and Impure Function   Pure Function The pure function always has following: Accepts one or more parameters Each parameter belongs to specific domain Returns  a value or Set of values Impure functions If the function

Building realtime application using Phoenix Channel

We had requirement of building realtime notification system. So whenever a user mentions n number of users we have to broadcast a message to all the users in real time and thereby update the count of each notification and push the message on their respective client. To implement this we need to understand Channels in phoenix. Channels: Phoenix framework has a built-in facility to manage two way communication between web clients and the server. Sender broadcast a message about topics and receiver subscribes the topics so they can get those messages. Also sender can become receiver and receiver can become

Elixir - How to run Ecto queries from within a custom mix task

Reading Time: 4 mins While writing a custom Mix task in Elixir, I ran into minor challenges for running / executing an Ecto query to update a database table column from within my mix task. It was not straightforward initially thus I thought to share here. In this short article, we will also see how to pass arguments to our mix task to run dynamic query. First, what is Mix? Elixir documentation says: Mix is a build tool that ships with Elixir that provides tasks for creating, compiling, testing your application, managing its dependencies and much more. Mix build tool is

Use Spring to run RSpec quicker

Use spring to run RSpec - with spring - bundle exec spring rspec spec/controllers/api/v1/ Finished in 47.14 seconds (files took 1.58 seconds to load) 72 examples, 0 failures without spring - bundle exec rspec spec/controllers/api/v1/ Finished in 48.84 seconds (files took 29.23 seconds to load) 72 examples, 0 failures One of the reasons for RSpec tests being slow is the initial application boot time. This happens every time you make changes in your code and takes few seconds every time. You can reduce that by using spring to run your

Visual studio database project

Visual Studio database project is one of the awesome tool provided by visual studio for managing database changes across all environments and developers machine. We can manage database changes same way as we manage the code changes using version control. VS database project helps to keep everyone in sync with the changes in database. For effective use of database project and make development easier, we should follow some things like, Developers should use local SQL Server, names of databases should be the same in all development machines and credentials to access database are same in all developers machines Lets see