November 02, 2014

As of git 1.9.4, it appears that there is no easy way to remove local tags that don't exist on remote (a.k.a "stale tags"). According to --prune option in git fetch documentaiton :

Read the entire post...


October 28, 2014

In AngularJS we can have one or more directives communicate with each other. This gives us an ability to create web components (hello AngularJS 2.0) that are built from multiple directives. In order to for a directive A to access the API methods defined in a controller of a directive B, the latter needs to define the require: property with a value set to the name of directive A and specify how the search should be performed (in my example, I prefix directive name with ^^, so the search for controlelr is done on the parent DOM elements only). The compilation of directive B will fail if directive A controller cannot be found in the "search path".

Read the entire post...


September 14, 2014

A few months ago, I finally had a chance to get my hands on the so-much-talked-about AngularJS framework and I really digged it. In fact, I like it so much that I am 100% sure this framework will stay ahead of others for a long time. Well, in our world this means for at least another year or two.

Read the entire post...


May 07, 2014

RailsAdmin is a very nice simple gem that allows you to manage data in models via a simple to use GUI. By default, it comes without any authentication enabled, so anyone can access the /admin URL. It does allow you to integrate with popular authentication frameworks, though, like devise and CanCan, however, I find it to be an overkill in small simple projects. In case of the latter, I simply opt in for basic authentication over HTTPS.

Read the entire post...


March 16, 2014

Over time, your rails models go from being a super model to being fat and eventually end up obese waiting any time for a heart attack to choke your app. When refactoring such models, I really like and follow the approach described by Code Climate in 7 Patterns to Refactor Fat ActiveRecord Models.

Read the entire post...


March 02, 2014

When we generate a new Rails project, it spits out at us a nice well thought-out folder structure with a particular place for each code component should go to. App code goes into /app folder, configurations into /config, log files int /log and so forth. We love it and it works great until you come across a situation when you've got other files that you also need to associate with the project, but your generated rails app doesn't seem to have a folder for.

Read the entire post...


February 18, 2014

You've finally realized the value of SOA (Service Oriented Architecturee) and decided to move all of your dynamic functionality into an independent service layer. Smart!

Read the entire post...


February 06, 2014

In my ongoing quest of porting apps from Windows to Mac OS X environment, I had to install Tomcat's mod_jk connector to proxy requests from Apache to JBoss application server. This is not my favorite setup, of course, but rather a legacy environment for one of the clients. Everything was going smoothly until mod_jk compilation part. After doing some research and reading some blogs, here is these are the steps that finally worked for me:

Read the entire post...


January 16, 2014

Just moved from MySQL to PostgreSQL for the new rails apps. I think it is time I try something new after being so faithful to MySQL DB for the past X years. My first PostgreSQL install didn't go as smooth as I expected, but wasn't too bad. Here is a summary of the installation steps that worked for me (assuming you are using the awesome Homebrew package manager).

Read the entire post...


January 15, 2014

You've just upgraded to Ruby 2.1 and Ruby is hitting you back with this error?

Read the entire post...


January 14, 2014

So, you've finally found some free time to replace your default Rails console with Pry and now you want to see nice Hirb formatted output instead of the default IRB one? I hear you. To achieve that just add the following lines to your local ~/.pryrc file (e.g. /home/dmoore/.pryrc)

Read the entire post...


January 13, 2014

If you don't mind getting your hands on "HTML-like" type of code and looking around for a way to launch a simple blog website paired with free hosting, then Jekyll should definitely be on your evaluation list. It's open-source, text based and follows baking CMS principle by generating a static site from pre-written markup files. Pair it with free hosting from GitHub Pages, comments from Disqus and you have yourself a very flexible blogging platform without required dependencies on a database and third party module/plugins.

Read the entire post...


January 02, 2014

My livereload was working fine until I've added the better_errors gem. Then, each time when an error page was shown by better_errors, I had to manually hit Command+R to reload that page in order to see the changes I've made. Needless to say, this was quite inconvenient in the development.

Read the entire post...