All posts by admin

How to Reconfigure ASUS Modem Wi-Fi Router

Issue:

You have an ASUS modem Wi-Fi router.
You already configured it in the past. Now you want to reconfigure it but you cannot access it via http://router.asus.com/.
You already tried to restart the router several times but the problem still persists.

Solution:
  1. Perform a hard reset of the router.
  2. Connect to the default 5G Wi-Fi network of the router.
  3. Go to http://router.asus.com/.
  4. Check and update the firmware.
  5. Reconfigure the router.

Note: If you configure the LAN information of the router manually then remember to set up an IP address for DNS Server1 (e.g. 8.8.8.8)  and DNS Server2 (e.g. 8.8.4.4).

 

How to Automatically Create a Subtitle for a Video

Motivation:

You have MP4 video file.
You want to create a subtitle to understand the video content.

Solution:
  1. Split MP4 file to 9-minutes files (please refer to https://huybien.com/how-to-trim-or-cut-mp4-files-without-re-encoding/ for details).
  2. Log in https://www.veed.io
  3. Click the “+” icon.
  4. Upload a 9-minutes MP4 file.
  5. Click the “Subtitles” tab.
  6. Click the “Auto Translate” button. Select the language for the subtitle.
  7. Click the “Start” button. Wait for the process to be complete.
  8. Click the “Export” button.
  9. Ensure that the “Burn Subtitle” option is selected.
  10. Click the “Export Video” button. Wait for the process on the left to be complete.
  11. Click the “Download MP4” link.

 

How to Automate Cleaning Up a .NET Solution

Motivation:

You have a .NET solution with many projects.
You need to deliver the solution to a client very frequently.
You need to clean up all intermediate folders and files to reduce the package size and make the result look tidy.
You want to automate this process to reduce cleaning up time.

Solution:

  1. In Visual Studio, review Project Build Order… and a last project in the list.
  2. Right click the project and select Properties.
  3. Click on Build Events.
  4. Enter the following commands to the Post-build event command line text box:
    rd /s /q $(ProjectDir)obj
    cd $(TargetDir)
    del *.config
    del *.pdb
    del *.xml

    rd /s /q $(ProjectDir)obj: Remove the obj folder in the project directory.
    cd $(TargetDir): Move to the output directory.
    del *.config: Delete all the config files in the output directory.
    del *.pdb: Delete all the pdb files in the output directory.
    del *.xml: Delete all the xml files in the output directory.

    You can modify these commands or add new commands for your specific purpose.

  5. Save the project.
  6. Repeat the process for some other projects in the solution if necessary. Typically you only need to clean up intermediate folders and files for the some projects in the bottom of the build order list. You may use the Dependencies tab to change the build order for some projects.

Cleaning a folder manually:

In order to delete all the obj folders recursively you can

    1. Create DeleteObjFolders.bat file inside the same folder that contains your solution file (i.e. *.sln)
    2. Paste content below to the DeleteObjFolders.bat file:
    @echo off
    @echo Deleting all OBJ folders...
    for /d /r . %%d in (obj) do @if exist "%%d" rd /s/q "%%d"
    @echo OBJ folders successfully deleted :) Press any key to close the window.
    pause > nul

    3. Execute the DeleteObjFolders.bat file.

 

How to Allow a Remote Desktop User to Access CD/DVD

Problem:

You log in a computer remotely as an administrator.
However you cannot read or write any removable storage devices such as CD/DVD or USB flash memory drives.

Solution:
  1. Type gpedit.msc in the Search box, press Enter.
  2. Go to Local Computer Policy > Computer Configuration > Administrative Templates > System > Removable Storage Access.
  3. Double-click All Removable Storage: Allow direct access in remote sessions.
  4. Click Enabled.
  5. Click OK.

 

How to Quickly Estimate Project Effort using Expert Judgement?

Motivation:

You need to quickly estimate effort for building an enterprise system.

Solution:
  1. Ensure that you have a requirements analysis document.
    This can be

    • list of artifacts or
    • a list of features or
    • a list of use cases or
    • a list of user stories or
    • a list of user interfaces or
    • a list of workflows with their steps.
      Note: Never conduct an estimation using expert judgement without any inputs.
  2. Break down each of item in the list into the following (but not limited to) tasks to create:
    • UI and navigation code,
    • database script or storage schema definition code,
    • API code,
    • business logic code,
    • data access code,
    • scheduler code,
    • unit tests code,
    • deployment script,
    • end-to-end test cases and test reports, and
    • user guide.
      Note: You do not need to break down a feature into tasks if you can estimate an effort to complete it with high confidence.
  3. Estimate the effort in man-days for completing each task.
    When giving an estimate for each task, think about

    • possible inputs validation and error handling aspect,
    • possible navigation framework preparation,
    • possible alternative scenarios of the feature related to the task,
    • possible encryption and decryption aspect,
    • possible attacks prevention (e.g. adding CAPTCHA, trimming special characters),
    • possible frameworks, libraries or external tools preparation, and
    • communication, meeting and status report for each task.
      Note: You should break down a task into sub-tasks if you are still not confident when giving an estimate for completing it.
  4. You do not need to perform the second and third step in a sequential order, just complete anything you can and repeat these 2 steps as many times as you like.
  5. If you cannot break down a feature into tasks or cannot give an estimated value for a task then you need to create a prototype or a proof of concept related to the feature.
  6. If you want to have a more accurate estimated value for a task then you should give 3 values for the task estimation: the best case value (optimistic value), the worse case value (pessimistic value) and the most likely value, then calculate the estimated value using the formula below.
    Estimated value = (Best case value + (4 X Most likely value) + Worse case value)/6
  7.  If you just need to give an effort guesstimate for a project containing too many requirements then you can group similar items together, then guess an effort for completing one item in a group and multiply this value with the number of items in the group, then repeat this guess and calculation for all the remaining groups.
  8. Include all communication, documentation and training effort into the guesstimate.

 

 

How to Backup and Restore an EC2 Instance

Motivation:

Any changes related to an operating system or an application in an EC2 instance may break its connection. You may try to stop, start, or reboot the instance many times but the problem may still persist. In this case, you may need to restore the instance to a previous stable version.

Viruses, malwares or accidental deletion of data may also require a restore of an instance to a previous stable version.

In order to restore an EC2 instance to a previous version you first need to create its backups either manually or automatically.

Manually backup an EC2 instance:
  1. Click Volumes on the left menu.
  2. Click a volume, click Actions, click Create Snapshot.
Manually restore an EC2 instance:
  1. Click Snapshots on the left menu, click a snapshot of an instance.
  2. Click Actions, click Create Volume.
  3. Let all default settings intact, click Create Volume.
  4. Repeat the first 3 steps for all the snapshots of the instance.
  5. Stop the instance.
  6. Click the instance, click Storage, scroll down and click on the link of /dev/sda1 device.
  7. Click Actions, click Detach Volume (or Force Detach Volume if the Detach Volume function does not work).
  8. Click Volumes on the left menu.
  9. Click on the volume created from the snapshot.
  10. Click Actions, click Attach Volume.
  11. Select the instance, set Device = /dev/sda1, click Attach.

12. Detach and attach the remaining volume to the instance.
13. Start the instance.

Automate backup process for an EC2 instance:
  1. Go to AWS Backup service.
  2. Click Backup plans on the left menu.
  3. Click the Create Backup plan button, select a template (e.g. Daily-35day-Retention), enter a backup plan name (e.g. HuyBien_Backup_Plan).

4. Click Backup plans on the left menu, click on a backup plan name.
5. Scroll down to the Resource assignments section, click the Assign resources button.
6. Enter a resource assignment name (e.g. HuyBien_Instances or HuyBien_Volumes), the scroll down to the Assign resources section.
7. Select Resource ID for Assign by.

8. Select appropriate resources. When you select an EC2 instance, AWS Backup will create backup for all EBS volumes attached to the instance, and then will attach them to an AMI that stores all parameters from the original EC2 instance.
9. Click the Assign resources button.
10. Wait for 1 day, then click on the Backup vaults link on the left menu, click a Backup vault name, scroll down to the Backup section to check for backups of the resources created by the backup plan execution.

Configure backup process time:
  1. Go to https://www.thetimezoneconverter.com/, and convert your time to UTC, for example 1:00 AM Saint Petersburg = 10:00 PM UTC.
  2. Go to AWS Backup, click Backup plans, click on a plan name.
  3. Scroll down to Backup rules, select a rule, click the Edit button.
  4. Scroll down to Backup window, click Customize backup window and enter your times.

 

How to Fix iPhone Internet Connection Issue

Problem:

You iPhone can connect to a Wi-Fi router.
The Wi-Fi router does have an Internet connection. Other devices can connect to the Internet using this Wi-Fi router.
However you iPhone cannot connect to Internet.

Verification:
  1. Tap on Settings, then tap on Wi-Fi.
  2. Tap on the Wi-Fi network name.
  3. Scroll down to IPV4 ADDRESS section.
  4. Ensure that Configure IP = Automatic, IP Address = 169.X1.X2.X3 (X1, X2, X3 can be any number), Subnet Mask = 255.255.0.0, and Router may be empty.
Solution:
  1. Reboot your Router.
  2. If the problem still persists then please reset your iPhone by tapping on Settings > General > Reset > Reset All Settings.

 

 

How to Install Ubuntu and Windows as a Dual Boot

Motivation:

You are want to install Windows 10 and Ubuntu 18.04 (or Windows 11 and Ubuntu 22.04) as dual boot for completing some machine learning tasks.

Prerequisites:

You need to have a 8Gb USB stick.

Solution:

Step 1:

  • Note: You can skip this step if you are installing Windows 11 and Ubuntu 22.04.
  • Go to BIOS, select the UEFI option in Boot List Option.
  • Disable the Enable Legacy option ROMS option.
  • Disable Secure Boot.

Step 2:

  • Install Windows 10 or Windows 11.
  • Create a free partition for Ubuntu.

Step 3:

Step 4: Install Ubuntu.

  • Select Minimal installation option, Download updates while installing Ubuntu option on Updates and other software screen.
  • Select Install third-party software for graphics and Wi-Fi hardware option and enter a password on Updates and other software screen. This password will be used on first boot after install.
  • Select Something else on Installation type screen.
  • Select free space partition that you created for Ubuntu.
  • Click the + sign.

  • Create an EFI System Partition and set its size to be 552MB if it does not exist.
  • Create a swap area. Set its size to be twice as your RAM size, e.g. 65536Mb swap area for 32Gb RAM.
  • Create a Root partition. Set its size to be all the remaining free space to optimize your space.

  • Click Install Now button.
  • On first boot after install, select Enroll MOK.
  • Enter the password that you entered to install third party drivers.

 

 

 

How to Quickly Capture and Analyze Requirements for Building a Prototype or Proof of Concept?

Motivation:

You need to quickly capture and analyze requirements for building a prototype or proof of concept for an enterprise system.

Suggestion:
  1. Capture any artifacts related to a business need. They may be some emails, presentation slides, a proposal document, a legacy system, some similar systems, a feature list or an initial requirement specification.
  2. Define terminologies (terms), build a background and context around the terminologies, expand the terminologies into business roles, business workflows, business components, business entities (objects), and business artifacts as much as possible.
  3. Identify the main stakeholders (roles) who will interact with the system (e.g. Guest, Admin, Developer, User, etc.) and their corresponding business problems or needs (i.e. their motivation of using the software system), and their current business workflows. Create as many scenarios (real world or domain business workflows) as possible. Create a domain model (a model of real world or domain entities, their properties and their relationships) if necessary.
  4. If there is an existing or similar system then identify the core components that each stakeholder will interact with (e.g. Accounts, Profiles, Reporting, APIs, Lessons, Videos, etc.) and their corresponding purposes.
  5. Identify the main tasks that each stakeholder will perform (e.g. Register an Account, Log in System, Create/Edit Profile, Create a Bucket, Generate an API Key, Create/Edit/Delete a Lesson, Create/Edit/Delete a Video, View Bandwidth, etc.).
  6. Identify the inputs and outputs and create mock-ups (sketches) or capture similar screens for each task. The quickest way to create a mock-up is to find similar existing screens in your system or external systems, and modify them. You can also search for templates of similar features in the Internet, and modify them. You can also brainstorm a  new one if you are good at creativity and imagining.
  7. Build or draw a prototype demonstrating 2 or 3 critical end-to-end workflows (An end-to-end workflow is a sequence of tasks that solves a real world problem completely). Contrast a current business workflows with the end-to-end workflows demonstrated by the prototype. The quickest way to create a prototype is to find similar existing workflow of of your system or external systems, and modify them. You can also repurpose a business workflow for a prototype. You can also brainstorm a  new one if you are good at creativity and imagining.
  8. Implement a proof of concept related to the 2 or 3 critical end-to-end workflows.
  9. For a complicated system, you may need to implement a proof of concept, build a prototype, and create a work break down structure or product backlog in parallel to ensure that the requirements are technologically and economically feasible.

 

 

How to Convert M4A to WAV File on macOS

Motivation:

You have downloaded some M4A audio files.

You want to extract convert them to WAV files to listen to them in other devices that do not support playing M4A files.

Procedure:

  • In the Music app on your Mac, choose Music > Preferences, then click Files.
  • Copy the path of Music Media folder location. (An example path is Macintosh HD/Users/admin/Music/Music/Media.)
  • Click the Import Settings… button.
  • In the Import Using pop-up menu, set Import Using = Wav Encoder, then click OK to save the settings.
  • Drag M4A files to the Music app.
  • Select songs in your library, then click File > Convert > Create WAV Version.
  • Go to your library folder (i.e. the Music Media folder location) and copy the WAV files to other devices.
  • Delete the M4A files from your library.