Why Is Render JSON And Return Not Working In My Controllers

Recently, I stumbled upon on an unexpected error when i was refactoring my code to follow the style guide of rubocop, Ruby On Rails’ very own linter. The and/or style guide recommends that the logical operator && be used in place of and. When I did that, my controllers started to break my tests. Return… Read More »

Reopen And Add Methods To Models In Ruby Gems

This is a documentation on how to add class and instance methods to models that exist in ruby gems. Often, there is a need to add methods to models that are created in ruby gems. In a recent project that I am working on, I found a particular need for adding images to a tagging… Read More »

How To Change Or Add New SSH Key for EC2

This is a documentation of how to change or add new ssh key for your EC2 instance if you lost, and maybe compromised your private key. The gist of it is to add in a new key pair to the disk volume of the EC2 instance. Pretty straightforward! But how can you do it without … Read More »

Category: AWS

Implementing Eslint In Sublime With Airbnb Style Guide

This is a documentation on how to setup eslinting on sublime text editor, bootstrapped with using the style guide set up by Airbnb. Why Is Eslinting Necessary Linting your javascript code catches syntax errors, and possibly some runtime errors, while you are coding. It helps you debug faster, putting things like missing ; or wrong… Read More »

Terraform With Docker

This is a documentation on how to use Terraform with Docker to provision cloud resources, mainly using AWS as the provider. It contains tips on certain practices that I personally deem best practices fo various reasons. It will revolves around these 3 commands docker run -v `pwd`:/workspace -w /workspace hashicorp/terraform:0.12.9 init docker run -v `pwd`:/workspace… Read More »

Automate mysql_secure_installation Using Bash

This is a documentation on running a script to install mysql on a Ubuntu 18.04 server, specifically using the AWS EC2 image. Project Requirements I am playing around with Terraform at the moment and would like to automate setting up a staging server that will run a mysql instance inside it along with a Rails… Read More »