#!/bin/bash
# =====================================================================
# Script Name: example_script.sh
# Description: Template for a production-ready shell script
# =====================================================================
# Enable Strict Mode
# Exit on error, treat unset variables as errors, and fail on errors in pipelines.
set -euo pipefail
-
Read more
-
Linux Using Notes
Flush DNS cache
sudo resolvectl flush-caches
Install dynamic libs *.so
After installing, use
ldconf
to refresh symbolic links and caches, or apps may not find your newly installed *.so.rsync vs scp
They are similar tools but you may prefer to use one over another in certain cases:
- scp is …
-
Tmux Notes
Common Sense
Tmux is an open-source terminal multiplexer for Unix-like operating systems. It allows multiple terminal sessions to be accessed simultaneously in a single window. It is useful for running more than one command-line program at the same time.
Terms:
- Session: A session can have multiple windows.
- Window: A window …
-
Regular Expression Learning Notes
-
C and C++ Learning Notes
Deep Copy & Copy Constructor
The compiler also creates a copy constructor if we don’t write our own copy constructor. Unlike the default constructor, the body of the copy constructor created by the compiler is not empty, it copies all data members of the passed object to …
-
Math is Hard
Monoid
monoid=magma+associativity+identity
Magma
A magma is a set M matched with an operation • that sends any two elements a, b ∈ M to another element, a • b ∈ M, i.e. \((M,\cdot)\) is a magma, if
$$ \forall a,b \in M, a \cdot b \in M $$Determinant of …
Read more -
Vocabulary
A
antisymmetric matrix: \(A^T=-A\)
angular frequency: aka, angular velocity, radial frequency and circular frequency. Denoted as \(\omega\)
B
buoyancy: 浮力。
C
curvature: 曲率。
D
directly proportional to: 成正比。
displacement: 位移。注意与distance(路程)区分。
distance: 路程。注意 …
Read more -
How You Reach a Website
Client <----> CloudFlare <----> VPS
Read more -
Tech Life Hacks
Port Forwarding Using SSH
Sometimes we are faced with the following situation:
graph LR A(Computer A)-->|SSH|B(Server A 192.168.1.3) B-->|has access via 192.168.1.2:80|C(Server B 192.168.1.2) A-->|does not have access|C
Read moreComputer A
is … -
Python Learning Notes