Git Global Settings:
Git Commit Code
|
|
Git Query and Cleanup
|
|
Git Branch Operations:
|
|
Git Merge Operations
Create a new local branch
issue54from remotemaster, then develop on it.
|
|
|
|
|
|
Create a new local branch
issue54from remotemaster, then develop on it.
Understanding Docker Multi-stage Builds:
RUN instruction adds a new layer, so reducing the number of layers helps minimize image size.FROM instructions are used, only the last FROM image becomes the root image of the final build.Example of multi-stage build in my own project deployment: Here, we compile a binary using the Golang base image and then directly copy it into a minimal Alpine-based image:
Specifies the base image used to build the Docker image. FROM must be the first non-comment instruction in a Dockerfile. If the specified image is not available locally, Docker will automatically pull it from the public registry.
Example:
|
|
Specifies the maintainer information.
|
|
Sets environment variables that are available for subsequent RUN instructions and persist at runtime within the container.
|
|
|
|
Note: Users can use docker load to import image files into the local image library, or docker import to import container snapshots. The key difference is that container snapshot files discard all historical records and metadata (preserving only the state at the time of the snapshot), while image storage files preserve full history and are larger in size. Additionally, when importing from a container snapshot, you can reassign metadata like tags.
|
|
|
|
|
|
Encrypted with des3, requires a password of more than 4 characters:
|
|
|
|
Add the following configuration to the CA config file /private/etc/ssl/openssl.cnf (macOS system):
|
|
cat /etc/salt/master.d/api.conf # Configure certificate and port
cat /etc/salt/master.d/eauth.conf # Set permissions
Test using curl to obtain token information:
|
|
|
|
|
|
|
|
|
|
e.g., grains/disk/pillar/pip/pkg
Default encoding is not ASCII. You can specify it using:
|
|
or
or
import statements, global variables, constants, others. Within import, arrange in order: standard library, third-party, local modules. Avoid writing multiple imports on one line.], }, )).def).l or uppercase O as they can easily be confused.CapWords. Internal classes use _CapWords.CapWords with an Error suffix.static in C). Two ways to achieve this: use __all__ mechanism or prefix with an underscore.public, private, protected in C++. Prefix non-public attributes with a single underscore.Foo, define __a; access via Foo._Foo__a to avoid ambiguity. If a subclass also uses Foo, this protection fails.self. The first parameter of static methods must be cls.
|
|
After installing flake8 successfully, open VSCode, go to File → Preferences → Settings, and add "python.linting.flake8Enabled": true in settings.json.