GeekCoding101

  • Home
  • GenAI
    • Daily AI Insights
    • Machine Learning
    • Transformer
    • Azure AI
  • DevOps
    • Kubernetes
    • Terraform
  • Tech
    • CyberSec
    • System Design
    • Coding Notes
  • About
  • Contact
linux
Coding Notes

Fix Font in VSCode Terminal

The Font Problem in VSCode After done the configuration in Terminal Mastery: Crafting A Productivity Environment With ITerm, Tmux, And Beyond, we got a nice terminal: However, after I installed VSCode, the terminal couldn't display certain glyphs, it looks like this: The Fix We need to fix it by updating the font family in VSCode. 1. Identify the name of font family. Open Font Book on Mac, we can see: The font supports those glyphs is "MesloLGM Nerd Font Mono", that's also what I configured for iTerm2. 2. Go to VSCode, go to Command + comma, go to settings, search "terminal.integrated.fontFamily", set the font name as below: 3. Now we can see it displays correctly:   Well done!

April 12, 2024 0comments 922hotness 0likes Geekcoding101 Read all
Coding Notes

Terminal Mastery: Crafting a Productivity Environment with iTerm, tmux, and Beyond

I love working on Linux terminals Rewind a decade or so, and you'd find me ensconced within the embrace of a Linux terminal for the duration of my day. Here, amidst the digital ebb and flow, I thrived—maneuvering files and folders with finesse, weaving code in Vim, orchestrating services maintenance, decoding kernel dumps, and seamlessly transitioning across a mosaic of tmux sessions. The graphical user interface? A distant thought, unnecessary for the tapestry of tasks at hand. Like all geeks, every tech enthusiast harbors a unique sanctuary of productivity—a bespoke digital workshop where code flows like poetry, and ideas ignite with the spark of creativity. It’s a realm where custom tools and secret utilities interlace, forming the backbone of unparalleled efficiency and innovation. Today, I'm pulling back the curtain to reveal the intricacies of my personal setup on Mac. I invite you on this meticulous journey through the configuration of my Mac-based development sanctuary. Together, let's traverse this path, transforming the mundane into the magnificent, one command, one tool, one revelation at a time. iTerm2 After account setup on Mac, the initial terminal looks like this when I logged in: Let's equip it with iTerm2! What is iTerm2? iTerm2 is a replacement for Terminal and the successor to iTerm. It works on Macs with macOS 10.14 or newer. iTerm2 brings the terminal into the modern age with features you never knew you always wanted. Why Do I Want It? Check out the impressive features and screenshots. If you spend a lot of time in a terminal, then you'll appreciate all the…

April 10, 2024 0comments 845hotness 0likes Geekcoding101 Read all
Coding Notes

Crafting A Bash Script with Tmux

The Background... I have Django/Vue development environment running locally. To streamline my Django development, I typically open six tmux windows 😎 : I used one Tmux session to hold all above. However, my laptop sometimes needs to reboot, after reboot, all of my windows are gone 😓 I have configured tmux-resurrect and tmux-continuum to try to handle this scenario, but they couldn't re-run those commands even they could restore the windows correctly. Let me show you the screenshots. The problem... Typically, my development windows look like this: As you see, the services are running within the respective windows. If I save them with tmux-resurrect, after reboot, of course tmux-resurrect and tmux-continuum could restore them, but services and all environment variables are gone. To simulate, let me kill all sessions in tmux, check the output: Now start tmux again, here are the status I can see, tmux restored the previous saved windows: Let's check the window now: None of the services is running 🙉 The Complain... As the supreme overlord of geekcoding101.com, I simply cannot let such imperfection slide. Not on my watch. Nope, not happening. This ain't it, chief. Okay, let's fix it! The Fix... .... Okay! I wrote a script.. oh no! Two scripts! One is called start_tmux_dev_env.sh to create all windows, it will invoke prepare_dev_env.sh which export functions to initialize environment variables in specific windows. A snippet of start_tmux_dev_env.sh: The prepare_dev_env.sh looks like: The End... Now, after reboot, I can just invoke script start_tmux_dev_env.sh and it will spin up all windows for me in seconds! I'M Really Pround…

April 6, 2024 0comments 839hotness 0likes Geekcoding101 Read all
Coding Notes

Build and Sign RPM package and repo

Hi there! Welcome to geekcoding101.com! I have two decades years of working experiences on Linux. There are many things I have come across, but I want to say, building package for Linux is something you couldn't avoid at all in your work or study! I have summarized the steps/tricks in this article, hope you will find it useful! Enjoy! Create unsigned rpm I will first demonstrate how to create unsigned rpm. Create Folder Structure First step is creating folder structure. If you don't specify top_dir in ~/.rpmmacros (It's a config file), then it will use ~/rpmbuild by default Create SPEC file for unsigned rpm Now we can work on the spec file SPECS/rpm-no-sig.spec: Create a dummy source file for unsigned rpm Use a dummy py file to be packed into the rpm: rpm-helper-unsigned.py: Create a folder: mkdir <rpm-name>-<version> For example: Then put rpm-helper-unsigned.py under it. Then make gz file for the folder: You will get file rpm-no-sig-1.0.tar.gz. Move it to SOURCES folder. When building rpm, it will recognize this gz file and extract it automatically. Build rpm-no-sig.rpm Run command: rpmbuild -ba SPECS/rpm-no-sig.spec Example: You will get RPMS/noarch/rpm-no-sig-1.0-1.noarch.rpm Check MD5: rpm -Kv <rpm file> Example: Backup this rpm to somewhere else. Create signed rpm Create SPEC file for signed rpm The spec file SPECS/rpm-with-sig.spec: Create a dummy source file for signed rpm Use a dummy py file to be packed into the rpm: rpm-helper-signed.py. You can just reuse the one in above and change the print message accordingly. Create a folder: cd ~ && mkdir <rpm-name>-<version> Example: cd ~ && mkdir rpm-with-sig-1.0 Move rpm-helper-signed.py into the folder. Also create the gz file with same process. Example: You will…

January 21, 2021 0comments 830hotness 0likes Geekcoding101 Read all
Newest Hotest Random
Newest Hotest Random
Kubernetes Control Plane Components Explained A 12 Factor Crash Course in Python: Build Clean, Scalable FastAPI Apps the Right Way Golang Range Loop Reference - Why Your Loop Keeps Giving You the Same Pointer (and How to Fix It) Terraform Associate Exam: A Powerful Guide about How to Prepare It Terraform Meta Arguments Unlocked: Practical Patterns for Clean Infrastructure Code Mastering Terraform with AWS Guide Part 1: Launch Real AWS Infrastructure with VPC, IAM and EC2
Terraform Associate Exam: A Powerful Guide about How to Prepare ItGolang Range Loop Reference - Why Your Loop Keeps Giving You the Same Pointer (and How to Fix It)A 12 Factor Crash Course in Python: Build Clean, Scalable FastAPI Apps the Right WayKubernetes Control Plane Components Explained
Terms Used in "Attention is All You Need" OAuth 2.0 Authorization Code Flow Instantly Remove Duplicate Photos With A Handy Script Mastering Terraform with AWS Guide Part 1: Launch Real AWS Infrastructure with VPC, IAM and EC2 Crafting A Bash Script with Tmux Kubernetes Control Plane Components Explained
Newest comment
Tag aggregation
Machine Learning Supervised Machine Learning AI cybersecurity notes Daily.AI.Insight Transformer security

COPYRIGHT © 2024 GeekCoding101. ALL RIGHTS RESERVED.

Theme Kratos Made By Seaton Jiang