[3W1H] Explaining The WordPress Loop in Detail

This is an article explaining the 3W1H of the well-known WordPress Loop(abbr. as the Loop). Tbh, not all of the 5W1H is suitable in explaining tech terms. So I removed the Who and Where from it. 5W1H is generally a good tool and starting point in understanding something more thoroughly and deeply. So, let’s getContinue reading “[3W1H] Explaining The WordPress Loop in Detail”

A simple script to git pull remotely

For my simple private web projects when there are no script building or bundling, I just don’t need the whole CI/CD pipeline to get stuff working. I only needed git and Github. So here’s how I automate part of my deployment. Before writing this bash script, I would have to first ssh into the remoteContinue reading “A simple script to git pull remotely”

DNS Records Terms Explained

MX – An MX record is the record on your domain that routes email traffic to the proper servers currently hosting your email. A – A record (Address Record) points a domain or subdomain to an IP address. CNAME – A CNAME (Canonical Name) points one domain or subdomain to another domain name, allowing you to update oneContinue reading “DNS Records Terms Explained”

Docker 101 – Bind mounts or Volumes

This article is written for docker beginners to understand bind mounts and volumes and how to choose between them. Bind mounts A file or directory on the host machine is mounted into a container, it is created on demand if it does not yet exist If you bind-mount to a non-empty directory in the container, that directory’sContinue reading “Docker 101 – Bind mounts or Volumes”

Switching git branch names

Recently I was working on a project where there’s only the master initially, which uses docker for the environment. Afterwards, as the project is ready to be launched, I made another branch named basic_setup which does not use docker anymore, but just uses the preset environment in the production server instead. Then I think itContinue reading “Switching git branch names”

Get an empty Ubuntu docker image up and running with a sudo-enabled user

I’m still a beginner in Docker and still don’t have a clue what most of the instructions in Dockerfile or docker-compose.yml do. I just understand the simple ones. So to consolidate my understandings and also shed light for others, I decided to just make a very simple Dockerfile for you, presumably also a beginner toContinue reading “Get an empty Ubuntu docker image up and running with a sudo-enabled user”

How to set up Git at a directory with an empty repository

Assuming you are already at the corresponding directory: Step 1: git init This command, quote from git documentation, creates an empty Git repository – basically a .git directory with subdirectories for objects, refs/heads, refs/tags, and template files. Step 2: git add -A The git add command adds changes in the working directory to the staging area, or more specifically, theContinue reading “How to set up Git at a directory with an empty repository”

Setting HTTP Cache Headers at server-side (PHP+Apache)

Recently I was trying to debug a WordPress site. I notice from the response headers on the pages, most of them have a “cache-control: max-age=600, public” header. Since I’m constantly changing code on certain pages and would like to see immediate effect, I decided to change the cache-control header to “no-store, must-revalidate”. In the functions.php,Continue reading “Setting HTTP Cache Headers at server-side (PHP+Apache)”

All I wanted was just to install nodejs…and npm…

Well recently, It happens that I need to update my nodejs package on my ubuntu server (18.04.2). I type node -v and see that it is v8.x something and the LTS version now is 10.16.3, so I set out to upgrade it. After following some simple guides online, I simply can’t get it to work.Continue reading “All I wanted was just to install nodejs…and npm…”