Execute Promise calls sequentially with/without a library
Recently I had a chance to write code to sequentially execute Promise calls. Here’s a record for it. With Bluebird.js Without any library
Web developer's learning journal
Recently I had a chance to write code to sequentially execute Promise calls. Here’s a record for it. With Bluebird.js Without any library
I found this task on LeetCode, and found a strange thing in bit-wise operation in JavaScript. So here’s a record of it. The task was: Reverse bits of a given 32 bits unsigned integer. Input: 00000010100101000001111010011100 Output: 00111001011110000010100101000000 Then, I wrote the following code. let result = 0; for(let i = 0; i < 32; …
I started to learn Docker through an online tutorial. This post is meant to recording general ideas of what Docker is, why/when I use it, and how it looks like for myself. What is Docker? Docker is a tool that packages software in containers. Each Docker container is: a standard unit of software that packages …
I encountered an error which seemed quite weird (at least to me). I’ve been hosting a couple of Laravel apps on a shared server. Today, I noticed that these apps were not working, returning 403 errors.Then, I saw that .htaccess files were wrongly configured. Here’s the wrong .htaccess. After the wrong code above was replaced …
This is a quick note for how to run PHP code from CLI and print the result on a web browser… php -S 127.0.0.1:8000 -t C:/app/php-folder
This post is a list of CSS/SASS techniques I’ve learned since I got my current soft engineer role, which is mostly concerned with front-end development. Before I started to work for my current position, I wasn’t absolutely confident with my CSS skills, so I had to teach myself techniques which were: not 100% clear to …
This post is about how to do error handling for multiple async calls in JavaScript. This may seem a simple topic, but I’d often struggled with this when I first learned about JavaScript. Before doing so, I’d like to quickly go over chained Promises and async/await in JavaScript. Chained Promise calls (“Why don’t you use …
This post is a record of all the technical questions I received in interviews for front end developer positions with React.js. I wrote this post so that I can review what type of questions will be expected in the next job interview when React is relevant to the position. Hopefully, this will be helpful for …
In this post, I’ll write about how to configure Laravel apps for PHPUnit, and how to write basic tests. This post is meant to be a note for myself, but hopefully someone finds it helpful too. DB Driver First of all, this approach requires SQLite3 driver. So, you have to make sure that PHP on …
Recently I decided to teach myself AWS, but I soon started to wonder why and when to use AWS EC2 rather than renting a server from a conventional server provider. Why? the main reasons are… EC2 seems so convoluted with many acronyms and terms (e.g. AMI, ESB, EFS), all of which makes it difficult to …