As a daily macOS user, you might find it convenient to make your Linux PC keyboard function similarly to a macOS keyboard. By adapting your Linux keyboard to mimic macOS behavior, you can streamline your workflow and reduce the friction that comes with switching between different operating systems. The key change involves making the Alt
Read more
Tag: Tutorial
Mapping Left Alt to Ctrl for Windows Keyboard to Be Similar to macOS
Posted onAs a dedicated macOS user, I often find myself missing the convenience of having a Command key located near my thumb for common shortcuts when using Windows. In the standard Windows keyboard layout, the key that occupies the same position as the Command key on macOS is the Alt key. However, the equivalent key on
Read more
Splitting a String by Another String in C++: A Flexible Utility Function
Posted onIn this post, we will explore a flexible utility function for splitting a string based on a given delimiter using C++ and the standard library. This allows us to break down complex strings into smaller parts that are easier to process and manipulate. The C++ Utility Function to Split a String by Another String Background:
Read more
Sorting Two Lists Together According to The Order of One List in Python
Posted onWe may use two lists to store the values of two properties of a list of elements in Python. Under such data structure arrangement, when we need to sort the properties from one list, we may want to also make sure the other list will be also re-ordered following the same order as the first
Read more
Synchronizing Thunderbird Calendar with Apple iCloud Calendar
Posted onThunderbird is a nice email client and calendar management software. iCloud calendar is the native calendar cloud service in Apple devices such as iPhone. So far there is no native support from Thunderbird to support iCloud calendar, excepting reading the read-only public iCloud calendars which has privacy concerns as long as lacks of editing functionalities.
Read more
Printing Google Doc with Comments in Page Margins
Posted onGoogle Doc documents support comments which is useful for collaborative editing of files with comments to each others. But when we print the document from Google Doc, the comments are not included. How to print the document with comments in page margins? In this post, we will introduce a method using the opensource and free
Read more
Install R and RStudio Desktop in macOS
Posted onWe ever discussed How To Install R and RStudio Desktop in Ubuntu Linux 20.04. In this post, we introduce how to install R and RSTudio Desktop on macOS. Install R environment Install R environment as follows using Homebrew. $ brew install R Then verify that the R environment is installed and ready, by running in
Read more
Converting Int to String in C++
Posted onIt is common to convert an integer (int) to a string (std::string) in C++ programs. Because of the long history of C++ which has several versions with extended libraries and supports almost all C standard library functions, there are many ways to convert an int to string in C++. This post introduces how to convert
Read more
How to Migrate RSS Feed Readling List from Feedly to Follow.it
Posted onHaving a reading list from RSS feeds is a convenient way to organize and aggregate various information source from the Web. After Google Reader was retired, many different readers services are available. Feedly and Follow.it are two good choices among those RSS feed readers. Different readers have different features. Follow.it provides features like keyword filtering
Read more
Installing R and RStudio Desktop in Ubuntu Linux
Posted onWe ever discussed How To Install R and RStudio Server in Ubuntu Linux 20.04. If the purpose is to install a local RStudio IDE instead of a remote RStudio Server, we can install RStudio Desktop. In this post, we introduce how to install R and RStudio Desktop on Ubuntu Linux 20.04. For other Ubuntu version,
Read more
Installing R and RStudio Server in Ubuntu Linux
Posted onR is a language and environment for statistical computing and graphics, providing a wide variety of statistical and graphical techniques. The R environment is open source software under GPL. R has rich software packages and is widely used for statistical analysis. RStudio Server is an R integrated development environment (IDE) that provides many useful features
Read more
Git Deleting Remote Tags from the Git Server
Posted onGit’s tags are convenient use to name some specific commits by tagging them for releasing or book keeping purposes. For example, GitHub allows repository managers to make releases using git tags. However, it may happen by mistake that a git tag is pushed to the remote git server while the tag has been made to
Read more
How to Count the Number of Words in a File in PHP?
Posted onCounting the number of words in a file is useful in many programs. In this post, we will discuss how to count the number of words in a file in a PHP script. In PHP standard library, we have function str_word_count($str) which returns the number of words from a string $str. On the other hand,
Read more
How to Make DNF and YUM Save Downloaded RPM Packages
Posted onDNF/YUM can automatically download the RPM packages and install them. Under some situations, we may prefer to make a copy of the RPM files for offline usage so that no need to have network connections to install the software packages. For such purposes, we need to make a copy of the RPM packages. It is
Read more
Linux User Group Management and Operations
Posted onLinux allows more than one users to log into the system to run processes/programs at the same time. In order to make this multi-user system work properly, Linux provides ways to isolate and protect users from each other and manage the permissions efficiently. One of the mechanism is user groups. Linux users may be grouped
Read more
Compress PNG Images on Linux
Posted onPNG images already use DEFLATE data compression algorithm involving a combination of LZ77 and Huffman coding. But the PNG images can be further compressed by removing non-important metadata or using lossy compression to save storage space and/or data transfer bandwidth. In this post, we introduce 2 compression ways with tools available on Linux. Lossless compression
Read more
Change Another Process’ Environment Variables in Linux
Posted onEach process has its environment variables in Linux. But is it possible to change another process’ environment variable from another process in Linux? If it is possible to do so, how to do it? There is a trick which can work for some scenarios. First, find out the process ID, then start gdb and attach
Read more
Redirect Feed Links to follow.it using .htaccess
Posted onFeedburner used to a powerful tool for RSS feeds publishing and subscriber management. However, feedburner will unlikely leave its maintenance mode because there has been no new features yet less features for quite some years. But RSS feed is still an important part of the Web supported by many software such as WordPress. follow.it is
Read more
Make Grub2 Boot Older Kernel Version in Ubuntu 20.04
Posted onIn a Linux system, we may have multiple kernels installed. Usually, it is the latest kernel configured to be the default one the system boot loader will use during automatic boot if there is no manual kernel choosing. In many cases, such as there is no driver ready yet for some devices in newer kernels,
Read more
Add Inline Comments for Multi-line Command in Bash Script
Posted onIn Bash script, it is common that multiple small commands run together connected by pipes (|) and the whole command is quite long. For clarity, we may write the command in multiple lines. How to add comments for these long multi-line commands? In Bash, the content after # in a line is the comment. Using
Read more