April 6, 2023
xargs # xargs is a versatile command in Unix-like operating systems, which is used to read items from standard input separated by lines, spaces, or other delimiters, and then execute a command using those items as arguments. Here are some of the most commonly used options for xargs:
-I: This option allows you to specify a placeholder that will be replaced with the input item in the command line.
...
August 13, 2022
A lookup table for HTTP security-related glossaries, such as Site
, Origin
, Cookie
etc.
For example, before we can understand what cross-site
means we must understand what Site
means, and If we want to know what CORS
is for we need to understand what Origin
is first.
...
August 11, 2022
As dealing with microservice-based systems, we often encounter the ever-repeating question , “Should I use RabbitMQ or Kafka?” For some reason, many developers view these technologies as interchangeable. While this is true for some cases, there are various underlying differences between these platforms.
As a result, different scenarios require a different solution, and choosing the wrong one might severely impact your ability to design, develop, and maintain your software solution.
Part 1 of this series explains the internal implementation concepts of both RabbitMQ
and Apache Kafka
. This part continues to review notable differences between these two platforms, differences that we should note as software architects and developers.
Then, it proceeds to explain the architecture patterns we usually try to implement with these tools and assess when to use each.
...
August 10, 2022
As dealing with microservice-based systems, we often encounter the ever-repeating question , “Should I use RabbitMQ or Kafka?” For some reason, many developers view these technologies as interchangeable. While this is true for some cases, there are various underlying differences between these platforms.
As a result, different scenarios require a different solution, and choosing the wrong one might severely impact your ability to design, develop, and maintain your software solution.
The goal of this piece is first to introduce the basic asynchronous messaging patterns. Then, it continues to present both RabbitMQ and Kafka](https://kafka.apache.org/) and their internal structures and highlights the critical differences between these platforms, their various advantages and disadvantages, and how to choose between the two.
...
August 9, 2022
Files, blocks, and objects are storage formats that hold, organize, and present data in different ways—each with their own capabilities and limitations. File storage organizes and represents data as a hierarchy of files in folders; block storage chunks data into arbitrarily organized, evenly sized volumes; and object storage manages data and links it to associated metadata.
The terms file storage
, block storage
, and object storage
refers to the API that the storage exports to its consumers, regardless of the transport (network, local, etc.).
...
August 7, 2022
Introducing GNU Compiler Collection (GCC) and Clang/Low Level Virtual Machine (LLVM); comparing the performance of both C/C++ compilers
This post is copied from here
Background
#
Visual C++, GNU Compiler Collection (GCC), and Clang/Low Level Virtual Machine (LLVM) are three mainstream C/C++ compilers in the industry. Visual C++ provides graphical user interfaces (GUIs) and is easy to debug, but it is not suitable for Linux platforms. Therefore, this document mainly compares GCC with Clang/LLVM.
...
April 7, 2022
The network interface controller (NIC). Also known as a network interface card, network adapter, LAN adapter or physical network interface, and so on. the following commands can be used for list NIC for linux.
Overview
#
lspci
, List all PCI devices
lshw
, Linux identify Ethernet interfaces and NIC hardware.
dmidecode
, List all hardware data from BIOS.
ifconfig
, Outdated network config utility
ip
, Recommended new network config utility.
hwinfo
, Probe Linux for network cards.
ethtool
, A unified NIC/card driver and settings read/set utility on Linux.
...
April 6, 2022
Sometimes we need to set up a proxy from the command line due to network issues. On Ubuntu, the common commands I use that require networking are curl
, git
, apt
, wget
, docker
, maven
, gradle
, npm
, yarn
etc. Some of these commands access proxy settings in environment variables, some of them requires specific configurations. In this post, we are targeting a Debian-based distribution, e.g, Debian and Ubuntu…
...
February 3, 2022
Git rebase can be used as a powerful tool to tweak the git history, this post log basic git rebase usage with an example that removes large files from git.
The Error Message # So, you just tried to run git push, and after taking longer than usual, you get an error trace like this one:
remote: error: GH001: Large files detected. You may want to try Git Large File Storage - https://git-lfs.
...
January 20, 2022
Side-by-side diffs are more readable to me than in-line diffs.
Long time ago, I started using Meld to display them when working with git. But I always needed to manually specify branch or commit names.
This week I finally spent some time and found a way to invoke Meld directly from tig, so that I can see the diff side-by-side while browsing a commit history in tig (for example, when I want to review a proposed branch containing 10 new commits, and I want to inspect each of them individually). Here’s a short howto.
...