Skip to main content

Posts

Configuring Network Interface on Red Hat Server

For this instance, we use a Red Hat Enterprise Linux (RHEL) Server 7.9. Unlike the latest Ubuntu version that commonly utilizes YAML-based configuration and the netplan tool for setting up IP addresses of network interfaces, the RHEL network interface can be configured using the configuration script located in /etc/sysconfig/network-scripts . Several interface configurations and scripts have been automatically generated by RHEL during the installation process. The configuration file is named by its device name such as ifcfg-eth0 for the eth0 device. If we run our RHEL in a VMware-based virtual machine, the device name might be shown up like ens35 or such things. The following configuration is an example of a network configuration with DHCP enabled. #/etc/sysconfig/network-scripts/ifcfg-eth0 TYPE="Ethernet" PROXY_METHOD="none" BROWSER_ONLY="no" BOOTPROTO="dhcp" DEFROUTE="yes" IPV4_FAILURE_FATAL="no" IPV6INIT="yes&q

Deploying Network Infrastructures in AWS Using CloudFormation

AWS is undoubtedly the most complete cloud services provider. Even though its services are not always the best compared to other similar services, it is able to provide a variety of tools to help us build any kind of internet-based services. When we initially create an account in AWS, we instantly receive the ability to create a complex network within a Virtual Private Cloud (VPC). We can develop a VPC in a region on multiple data centers or availability zones. AWS allows us to configure and deploy our infrastructures using an IaC-based (Infrastructure as Code) service called CloudFormation. For instance, we will deploy a VPC with several network components in it. The components include internet gateway, subnet, NAT gateway, and routing tables. The VPC will be available in a single availability zone and hosts two subnets which are private and public. Firstly, we define the variables that will be referred to in the configuration within the Parameters block. It contains only the

Shikaku Talks To Shikamaru

It was after Asuma lost the battle with Akatsuki.

Phases of Node.js Event Loop

We know that a Node.js application is run in a single-threaded fashion. But, it can handle multiple asynchronous operations in the background and exhibits features as if it is a multi-threaded application. At the base level, Node.js is built on C++ which actually allows the existence of multiple threads. While that's not the actual basis, Node.js utilizes the  libuv library that allows it to interact with the operating system and utilize available resources efficiently. The library enables asynchronous I/O operations such as file reading, database querying, data transferring over the network, and so on, then it will trigger the registered callback for each completed I/O operation to run. Node.js manage all the callbacks in a mechanism called " event loop ". An event loop is a loop of sequential processes which are grouped into several phases. It handles callbacks of asynchronous I/O operations and asynchronous calls initiated by objects or functions in the main appl

Configure Gitlab SMTP Setting

Gitlab CE or EE is shipped with the capability to send messages through SMTP service as the basic feature to send notifications or updates to the users. The configuration parameters are available in /etc/gitlab/gitlab.rb . Each SMTP service provider has a different configuration, therefore the Gitlab configuration parameters should be adjusted according to the requirements. Some examples have been provided by Gitlab here . This is an example if you use the Zoho service. gitlab_rails['smtp_enable'] = true gitlab_rails['smtp_address'] = "smtp.zoho.com" gitlab_rails['smtp_port'] = 587 gitlab_rails['smtp_authentication'] = "plain" gitlab_rails['smtp_enable_starttls_auto'] = true gitlab_rails['smtp_user_name'] = "gitlab@mydomain.com" gitlab_rails['smtp_password'] = "mypassword" gitlab_rails['smtp_domain'] = "smtp.zoho.com" This is another example of using Amazon SES w

Measuring Correlation

If we want to know a correlation between a boxer winning a match and using red pants, we can mathematically determine it based on past records of those conditions. There are four possible combinations of the conditions. The boxer loses and he doesn’t use red pants (00) The boxer loses and he uses red pants (01) The boxer wins and he doesn’t use red pants (10) The boxer wins and he uses red pants (11) For example, we have the following past records. Condition “00” is 23 times Condition “01” is 10 times Condition “10” is 45 times Condition “11” is 9 times Then, we can use the phi coefficient formula. The result of this formula is between -1 and 1. If the result is close to 0, it means the conditions have no correlation. If it is close to 1, it means the conditions are strongly correlated. Meanwhile, if it is negative, the correlation is strong but in the opposite way. The formula is as follows. phi = (n11 x n00) – (n01 x n10) / sqrt(n1X x n0X x nX1 x nX0) n1X represents the condition wh

Elements of UI Design

There are some essential elements in designing a user interface. I found that the following items are necessary to bring up a certain feeling, thought, or perspective for the user of our product. Color Color can shape a mood for the user. Combining multiple colors should be carefully picked to create a comfortable look. One of the tools available online to pick colors is here . Positive and Negative Space Positive space is the element containing the main content or information. Meanwhile, negative space is the distance between main elements or empty space around them. Each main element should have distance or space from each other to nicely navigate the focus of the users from one information to another. Typography Typography includes selecting appropriate fonts with good looks and aligning text content on the page. Microcontent We need to provide some short texts or content on a page to make it easy for the user to skim the information on th

First Appearance of Titan Eren

 When Mikasa was trying to grasp herself, a titan appeared killing the other titans.

Downloading A Large File From Google Drive

I just found a helpful answer from Quora about downloading a large file from Google Drive. It utilizes Google Drive API for downloading the file. The steps are as follows. Get the file ID from the shareable link URL. For example, the URL has a format similar to this: https://drive.google.com/file/d/THE_FILE_ID/view?usp=sharing , then the file ID is THE_FILE_ID . Go to Google OAuth 2.0 Playground . On this page, we can get an access token for utilizing Google API to download our file. Select the Drive API v3 and authorize it. Then, keep the access token that is available on the "Exchange authorization code for tokens" tab. Last, we can utilize curl to download the file using a terminal. curl -H "Authorization: Bearer THE_ACCESS_TOKEN" https://www.googleapis.com/drive/v3/files/THE_FILE_ID?alt=media -o THE_OUTPUT_FILE.ext

Utilizing Docker Secret

It likely happens that we need to provide some secrets like passwords, keys, or private things into our Docker containers. If we use the docker-compose tool to generate our containers, we basically can put the secrets as environment variables in the docker-compose.yaml file. But, what if we want to share our configuration with the others, they will find those secrets too. So, for overcoming that issue, we can utilize a feature provided by Docker itself which is the Docker secret, or we can just call it secret . For instance, we want to build a container for the PostgreSQL database. The PostgreSQL image allows us to set a custom database password by providing a value for the POSTGRES_PASSWORD or POSTGRES_PASSWORD_FILE variable. services: postgres: image: postgres environment: - POSTGRES_PASSWORD=$3cureP4ssword Or, we can utilize the Docker bind-mounting to store a file and instruct the Docker to read the secret information from the mounted file. services:

Principles of UX Design

If we want to elaborate a user experience (UX) design for our product, we need to understand some principles of a good UX design. Our design should be based on specific reasons and have certain intentions for our users and ourselves as product owners or as a business. These are several principles that should become our consideration in generating the design. Usefulness We build a product with a desire for providing solutions for any specific needs of the users. So, it is important to make sure that any design elements are provided to make the users completely gain the benefit of using our product and solve their problems. Usability Visions and our good intentions are not enough to build a great product if we don't provide clear ways for the users to take the most benefit of the product. Usability is a focus to provide easiness for the users in utilizing our product. Desirability Why are some products or services instantly abandoned by their users

When Mikasa Got So Emotional But Had To Fight

 She just tried to suppress her feeling.