Ink Mortar

Ava with Vue (2.x) + TypeScript (and NYC)

Component and Unit Testing with Test Coverage

When working on a project with Vue (TypeScript), I faced a lot of roadblocks trying to get code coverage to work. The issue is largely covered in this issue thread. Most solutions / workarounds for that seems to revolve around changing the bundling flow with webpack. Considering my lack of familiarity with webpack (on top of my use of scss and pug in Vue files), putting together a webpack config that works for me turns out to be extremely challenging....

May 22, 2021

Functional and flexible shell scripting tricks

Shell scripts vs python or perl Its 2019 now, who writes shell scripts anymore? Am I right? Well, apparently I do. ¯\_(ツ)_/¯ There are some good arguments for that here and here which mainly revolve around 2 things: Shell exists in all Unix systems and makes use of system default features. Shell is an “interactive command function” designed to get user inputs during the process of running them. Also, here’s an additional relevant reading about the differences between sh and bash....

May 7, 2019

Test Driven Development with Alexa SDK

Quick guide to building and unit testing an Alexa Skill

What is Test Driven Development? According to Wikipedia, it means “Requirements are turned into very specific test cases, then the software is improved to pass the new tests, only.” Basically, you would first have to write the test of the software/feature you are developing before you start working on the developing the software/feature itself. Here are a few more articles on the benefits and why you should apply TDD: Test Driven Development by Jan Olbrich Isn’t TDD twice the work?...

October 29, 2018

How to host multiple domain names and projects on one server

NGINX is one magical tool

I own multiple domain names, and each one hosts a different side project. For the longest time, everything that required ‘hosting’ was hosted on Heroku. But their free tier can be quite limited, it can also get costly quickly if you are paying for each separate project. So instead, I decided to explore putting all of them together using NGINX (recommended to me by Jane Manchun Wong). Required Resources Virtual Private Server (VPS) You’ll need a virtual server such as DigitalOcean or EC2 by AWS....

August 29, 2018

Hosting your own Git server with Gitea

Having additional backups are never a bad idea

Most people (including myself) host their personal projects on a third-party free Git hosting websites like GitHub, GitLab, Bitbucket etc. While that is sufficient for most people, it is also pretty fun to have your own Git service hosted on your own domain name of choice. While I trust my fellow engineers at these companies, I am using this as a personally backup to those services if anything goes wrong (like GitLab....

August 20, 2018

Building a side project over the weekend

Basically a solo hackathon

Few months ago during my job search, I decided that I want to add some new skills to my arsenal (resume) so I went ahead to build a bill splitting webapp (and the month before, an Alexa skill). Granted, the backend was built weeks before during a hackathon (shoutout to HackISU), I’m just focusing on building the UI that makes post requests to the backend. In the process, I also ended up fixing some inherent flaws I left behind in the backend....

June 2, 2018

Getting started with Travis-CI

Add that fancy badge onto your GitHub repository README

What is CI and why should I care about it? CI stands for Continuous Integration which as the name suggests, is an integrated tests that runs continuously on every time when someone pushes a commit (or mostly when opening a Pull Request). As for why is it important, it automates the whole testing modules. Ideally, you would still want to test your changes locally before pushing them to remote but in some occasion where you forgot or the program requires a lot more resources than your current machine can handle, CI comes in very handy....

April 22, 2018