Cypress ( cypress.io) is a testing tool that can test anything that runs in a browser from unit tests to end-to-end tests.

I recently has a chance to use Cypress in an Angular project I’m working on. …

Today I learned how to create a URL with query string parameters with HttpParams class in Angular.

I wanted to construct a URL with some query string parameters like: https://api.something.com?id=someid&name=johndoe

I tried:

import { HttpParams } from '@angular/common/http';

...
const baseURL = 'https://api.something.com';
const params = new HttpParams();

params.set('id', 'someid');
params.set('name', 'johndoe');

const fullURL = `${baseURL}?${params.toString()}`;
console.log({…

Today I learned how to do a fuzzy search in command history using fzf, and a bit about sed.

It is useful when I want to search for a specific command I ran before, but I don’t really remember what it was. For example,

$ docker-compose exec php artisan migrate…

Today I learn how to use sips to convert a PNG image to a JPG image from the command line from The Robservatory blog.

sips - The Scriptable Image Processing System - is a command line tool that comes pre-installed with macOS (I'm using 10.15 Catalina). …

Today I learned how to create a template for Git’s commit message from thoughtbot’s blog.

Running $ git commit opens an editor window with some default text in it. Normally we would put our commit message at top of the file where the empty line is.

We can create a…

TL;DR — There is no easy way to rename an Angular component. There is no $ ng rename or $ ng move commands to rename components easily in the Angular CLI.

Some people have been asked for this as a CLI feature. …

fzf is my new favorite command-line tool. I learned about this tool from Remy Sharp’s post: CLI: Improved.

From the GitHub page — fzf is a general-purpose command-line fuzzy finder. It does the search and nothing else.

Fuzzy finders allow you to search for things in the list by typing…

Today I learned how to use multiple SSH keys one a computer.

At work, all projects are hosted on our company’s internal git server running GitLab CE. while I put all my personal projects on GitHub.

I wanted to use different keys for GitLab and GitHub. So that I can…

#nerdalert

One day my custom mechanical keyboard suddenly got weird: option and command keys are swapped. Pressing one button triggered another, and vice-versa. It happened just like that. Other keys were working fine.

Like a typical Mac keyboard, the orange is set to `alt` and the pink is set to `cmd` on my keyboard. But they were swapped.

This can be an easy fix in MacOS’ System Preferences › Keyboard › Modifier Keys settings where I…

I start learning about WebGL recently. The editor I use is VSCode which is an awesome editor for frontend development, but still, I found some issues and I think I should take some notes.

Many tutorials I have seen start like this: first create index.html and main.js file.

Put a <canvas> element in index.html

<canvas id="canvas"></canvas>

In main.js, grab the canvas element to use it as a WebGL rendering context

const canvas = document.getElementById('canvas'); 
// or const canvas = document.querySelector('#canvas');
const gl = canvas.getContext('webgl');

Armno P. 🇹🇭

blogs at https://armno.in.th. #leftmedium.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store