Linux

Controlling Multiple Servo Motors with Raspberry Pi (No PWM Module)

This is a quick note on how to control multiple servo motors using only the GPIO pins on a Raspberry Pi—without relying on any PWM or servo controller modules. Introduction Controlling Multiple Servos on Raspberry Pi OS Environment Wiring …

How to Count Lines of Source Code

This is a memo on how to measure the number of lines in a source code repository. Introduction How to Count Lines of Source Code Count Lines with a Command Count Lines with Tools Conclusion References Introduction While reading source code…

Remove Duplicate Lines with One Command

You can easily do this with awk: awk '!seen[$0]++' Introduction Remove Duplicate Lines with One Command Command Breakdown Example Conclusion Reference Introduction This is a quick note on how to remove duplicate lines and show each line on…

The Basics of the "man" Command on Linux

This article explains the basic usage of the man command. Introduction Understanding the Basics of the man Command Basic Usage of man Specifying a Manual Section Searching Manuals Searching Within a man Page Conclusion Introduction The man…

How to Run C Programs on Linux: vim + gcc

This beginner's guide explains how to set up an environment to run C programs on Linux (Ubuntu) using vim. Introduction Running C Programs on Linux Installing vim Creating a Text File with vim Installing gcc and Compiling Running the File …

Getting Started with Ghidra: Hands-On with the Powerful Reverse Engineering Tool

This is a hands-on with Ghidra covering from setting up Ghidra to learning how to use it. Introduction Hands-On Ghidra Setting Up Installing Ghidra Installing JDK (Java Development Kit) Launching Ghidra Opening a File with Ghidra Download …

Ubuntu: How to Change Display Resolution | 1920x1080

This post explains how to set the display resolution to 1920x1080 (or any desired resolution) on Ubuntu. In short, you can set the resolution to 1920x1080 with the following commands: $ xrandr --newmode "1920x1080_60.00" 173.00 1920 2048 2…

How to Operate as ec2-user or root in Session Manager | AWS Systems Manager

This post summarizes how to work as ec2-user or root user in AWS Systems Manager (SSM) Session Manager. Introduction Working as ec2-user or root with Session Manager Current Situation: Shell Access as ssm-user Solution: sudo su --login ec2…

How to Fix pip/pip3 Installation Errors on Ubuntu

When using Ubuntu, I found that Python's pip and pip3 were not pre-installed. I unexpectedly ran into trouble during the installation, so here's the record of how to solve it. Introduction Installing pip/pip3 on Ubuntu Premise: pip vs pip3…

Running "Tierra": Tom Ray's Artificial Life Simulation

This article provides a step-by-step guide to running Tom Ray's artificial life simulation, Tierra. Introduction Environment Step-By-Step Guide Running Tierra Explanation of Commands Running the Front-End (Beagle) Exploring Tierra Conclusi…

Counting JSON Records with jq Command

This article summarizes how to count the number of records in JSON using the jq command, depending on the JSON format. Introduction Environment Counting JSON Records JSON Documents with Array Wrapping JSON Documents with Object Wrapping JS…