Adding Custom fields and methods to jsonapi resources

The problem

Recently, I have attempted to completely switch to JsonAPI specification for all my API-only rails projects. To achieve these with ease, I use Jsonapi resources gem. This gem is very handy to use and get’s you configured for JsonAPI specs in no time. But sometimes, its not clear how to do what you would normally do if you are not using the tool. One of those issues is adding custom fields to the json objects from the ActiveRecords being serialized. I will show you my solution to the this challenge.

Read More

Bulk Convert Images to the same size for training

Set of commands that worked for me

  • My images had some extra strings to its extention “.jpgwidth=203&height=307”
  • So first, I renamed the images.
  • Then added padding while centering the image.
  • From the terminal, Navigate to the root folders for the images
Read More

Welcome - Akwaaba!

This is my first post here. I hope my journey using jekyll-now would pay off. I saw Octopress. And I skipped it.

Read More