👋 Welcome !

I am a passionate developer who loves to code and write about technology.

  • My favourite Topics:

  • Think of danger in times of safety;

  • Disaster Recovery;

  • Load balancing;

  • Multi-Site High Availability(Active-Active across multiple locations);

Git Command lines practice for Branch Management

Project name: Test-Jekyll-MM-Gem-based.github.io Quoted from: Github Jekyll minimal-mistakes Overview This Jekyll project uses a branch management strategy that separates concerns into dedicated branches: theme Branch: Contains theme-related files (layouts, includes, assets, etc.). posts Branch: Contains content-related files (posts, pages, etc.). main Branch: The primary branch for merging and running the project. Branch Creation and Management # Create and switch to the 'theme' branch git checkout -b theme # Remove content directories from the 'theme' branch git rm -r _posts _pages README.md git commit -m "Remove content directories from theme branch" # Merge .gitignore from main into theme git merge main -- .gitignore git commit -m "Update .gitignore in theme branch" # Switch back to the main branch git checkout main # Create and switch to the 'posts' branch git checkout -b posts # Remove theme directories from the 'posts' branch git rm -r _layouts _includes assets Gemfile Gemfile.lock index.html git commit -m "Remove theme directories from posts branch" # Merge .gitignore from main into posts git merge main -- .gitignore git commit -m "Update .gitignore in posts branch" # Switch to the 'main' branch git checkout main # Merge the 'theme' branch into 'main' git merge theme # Resolve any conflicts, then stage and commit git add . git commit -m "Merge theme branch into main" # Merge the 'posts' branch into 'main' git merge posts # Resolve any conflicts, then stage and commit git add . git commit -m "Merge posts branch into main" # Push the 'main' branch to the remote repository named 'origin' git push origin main # Clean up generated directories and update .gitignore # Switch to the 'posts' branch git checkout posts rm -rf _site/ .sass-cache/ .jekyll-cache/ git add .gitignore git commit -m "Add .gitignore to posts branch" # Switch to the 'theme' branch git checkout theme rm -rf _site/ .sass-cache/ .jekyll-cache/ git add .gitignore git commit -m "Add .gitignore to theme branch" # Ensure .gitignore consistency across all branches git checkout theme git merge main -- .gitignore git commit -m "Update .gitignore in theme branch" git checkout posts git merge main -- .gitignore git commit -m "Update .gitignore in posts branch" # Check repository status, including ignored files git status --ignored # Remove generated directories from git tracking (if necessary) git rm -r --cached _site .sass-cache .jekyll-cache git commit -m "Remove generated directories from Git tracking" # Verify ignored status git status --ignored # Only execute the following commands in the 'main' branch jekyll build jekyll serve # force copy from theme branch when in main branch git merge -X theirs theme # force copy, another option git checkout theme -- multilple_file_name_with_space

2025-1-14 · 3 min · Atom.X

Interacting with the System and Managing Memory

Original Course link: Interacting with the System and Managing Memory Module 2: Dynamic allocation most of the memory we have used has been located on the stack. Dynamic memory allocation gives a programmer much more flexibility, in that it allows you to request a specific amount memory to be allocated on the heap, so that it will not disappear with the stack frame of the calling function. heap vs. stack Stack vs Heap: What’s the difference? (educative.io) ...

2024-8-23 · 7 min · Atom.X

Русская классическая литература

Some famous sentences from Russian classical literatures for beginners who are learning Russian language. “Anna Karenina” by Leo Tolstoy “Crime and Punishment” by Fyodor Dostoyevsky “War and Peace” by Leo Tolstoy “Dead Souls” by Nikolai Gogol “Master and Margarita” by Mikhail Bulgakov Goodreads “Anna Karenina” by Leo Tolstoy: “Все счастливые семьи похожи друг на друга, каждая несчастливая семья несчастлива по-своему.” (All happy families are alike; each unhappy family is unhappy in its own way.) “Я всегда любил тебя, и когда любишь кого-то, ты любишь всего человека, таким, какой он есть, а не таким, каким хотелось бы его видеть.” (I’ve always loved you, and when you love someone, you love the whole person, just as he or she is, and not as you would like them to be.) “Любить тех, кто тебя ненавидит, можно, но любить того, кого ненавидишь, невозможно.” (Love those that hate you, but to love those one hates is impossible.) “Весна - время планов и проектов.” (Spring is the time of plans and projects.) “Уважение было придумано, чтобы заменить пустое место, где должна быть любовь.” (Respect was invented to cover the empty place where love should be.) “Если искать совершенство, то никогда не будешь доволен.” (If you look for perfection, you’ll never be content.) “Crime and Punishment” by Fyodor Dostoyevsky: ...

2024-5-14 · 2 min · Atom.X

История семьи Евa

написать историю Ева родилась. Ее мама-ежиха — красивая мастер и художник конфет, а папа-енот — умный инженер, который умеет чинить много машин; старший брат — кот, а второй брат — обезьяна. Каким животным станет маленькая Ева? write a story Eva was born. Her hedgehog mother is a beautiful master and artist of candies. and the raccoon dad is a smart engineer who can fix a lot of machines; the elder brother is a cat, and the second brother is a monkey. ...

2024-4-26 · 5 min · Atom.X

42 School - shell00/ C

shell shebang line (#!/bin/bash to tell the system which interpreter to use special or wired file name delimeter \ tab, to show the special or wired file name such as : % touch "23\\?\$*'MaRViN'*$?77&\\" -rw-r--r-- 1 linxu 2024_heilbronn 0 Jan 17 21:20 \?$*'MaRViN'*0\ % rm \\\?\$\*\'MaRViN\'\*0\\ # input \ and then click tab, the terminal will show us \\?\$\*\'MaRViN\'\*0\\ automatically, # for us to confirm it automatically. % ls -lRa *MaRV* | cat -e -rw-r--r-- 1 linxu 2024_heilbronn 3 Jan 17 21:51 "\?$*MaRViN*$?\"$ # the file size 3, it is wrong, use echo and terminator % to end the input % echo -n 42 > \"\\\?\$\*MaRViN\*\$\?\\\" % cat \"\\\?\$\*MaRViN\*\$\?\\\" 42% # The function of the % mark is to indicate that the prompt is on the same line as the output, # because there is no linefeed character at the end of the output. This can help you distinguish # between the output and the prompt, and avoid confusion. However, some shells may use different # symbols or colors to indicate this situation. man how to modify the file size, time, dates, link number, in terminal unix. how to use and read command manual. ...

2024-1-15 · 8 min · Atom.X