python3学习手册
ljust(30, "*") # 左对齐,*补全 newstrr = strx.rjust(30, "*") # 右对齐,*补全 ★print输出带颜色的字linux 此种方法仅linux命令行下有效 print( "\033[0m 带颜色的文字 \033[0m" ) # \033[和m之间的数字为显示效果及颜色的 数字代码 数 字 代 码 效果 颜色 前景色代 码 白 , 同 0 默认 37 47 效果+颜色用;分号隔开 print("\033[4;31m这是带下划线红色的字\033[0m") ★print输出带颜色的字windows 此种方法仅windows命令行下有效 import ctypes STD_INPUT_HANDLE = -10 STD_OUTPUT_HANDLE = -11 STD_ERROR_HANDLE = -12 hex()) # 输出16进制字符串,默认是 bytearray(b'\x11\x16c\xfe') ★ bytes和bytearray都可以使用 .decode("u�8") 方法转为string ★global全局变量 global_var_xx = 1 def func_xx(): global global_var_xx # 在函数中使用全局变量,否则函数内0 码力 | 213 页 | 3.53 MB | 1 年前3k8s操作手册 2.3
firewall-cmd --add-rich-rule='rule family="ipv4" source address="10.244.0.0/16" accept' # firewall-cmd --run�me-to-permanent # firewall-cmd --list-all ★如果有硬件交换机做ACL或基于云的安全组做访问控制,则可关闭服务器上的 防火墙软件 ⑨加载ipvs模块 unix:///var/run/dockershim.sock 要求docker<=20.10 k8s 1.24及之后版本: kubelet→cri-containerd→containerd→runC 后来cri-containerd重构进containerd中(CRI Plugin),合为一个containerd进程 默认调用的cri-socket: unix:///var/run/containerd/containerd localAPIEndpoint: adver�seAddress: 10.99.1.51 bindPort: 6443 nodeRegistra�on: criSocket: /var/run/dockershim.sock name: k8s-master1 taints: - effect: NoSchedule key: node-role.kubernetes0 码力 | 126 页 | 4.33 MB | 1 年前3git 操作手册
#重启 ★放通防火墙 # firewall-cmd --add-service=h�p # firewall-cmd --add-service=h�ps # firewall-cmd --run�me-to-permanent ★查看h�p配置: gitlab-ce自带有nginx软件,查看默认生成的配置: # cat /var/opt/gitlab/nginx/conf/nginx ★重置root用户密码 安装完gitlab-ce后,初始管理密码保存在 /etc/gitlab/ini�al_root_password 文件 中,如果文件已删除或忘记root用户密码了,可以重置,方法如下: # cd /opt/gitlab/bin/ # gitlab-rails console -e produc�on #进入交互界面 > User.all0 码力 | 35 页 | 1.69 MB | 1 年前3postgresql操作手册
--unit postgresql # systemctl enable postgresql # systemctl start postgresql 如果想安装其他版本,可到官网查询安装方法 h�ps://www.postgresql.org/download/linux/redhat/ 本文档选择PG-13版本作为讲解,使用el8系列的系统,x86_64平台 # yum install0 码力 | 17 页 | 445.84 KB | 1 年前3The DevOps Handbook
periodic to continuously ii. Create build & test processes that run in dedicated environments enables: 1. Enables build & tests to run all time, independent of developers 2. Segregated processes so we Non-Ideal Testing Pyramids h. ENSURE TESTS RUN QUICKLY (IN PARALLEL, IF NECESSARY) i. Design tests to run in parallel ii. Enable different test categories to run in parallel iii. Generally, limit manual servers 5. Restarting VMs, containers, applications, etc. 6. Generating configuration files 7. Run automated smoke tests 8. Running test procedures 9. Scripting & automating DB migrations iii. Focus0 码力 | 8 页 | 23.08 KB | 5 月前3The DevOps Handbook
usually follows this progression: a. Environment creation: b. Code deployment: c. Test setup and run: d. Overly tight architecture: iv. ELIMINATE HARDSHIPS AND WASTE IN THE VALUE STREAM 1. In the another team to complete tedious, error-prone, and manual tasks that could be easily automated and run as needed by the team who needs the work performed b. Requiring approvals from busy people who are0 码力 | 8 页 | 22.57 KB | 5 月前3The DevOps Handbook
Sometimes we’ll draw a graph of something that isn’t moving yet, just in case it decides to make a run for it…Tracking everything is key to moving fast, but the only way to do it is to make tracking anything0 码力 | 8 页 | 24.02 KB | 5 月前3The DevOps Handbook
Incorporate these paths into automated tests 1. Static Analysis – inspect program code for all possible run-time behaviors and seek out coding flaws, back doors, and potentially malicious code2. Dynamic Analysis0 码力 | 9 页 | 25.13 KB | 5 月前3A Seat at the Table - IT Leadership in the Age of Agility
and ties.The CIO’s Place at the Table IT leadership runs the business along with the others who run the business. The seat at the table is earned by being at the table. The role of senior IT leadership0 码力 | 7 页 | 387.48 KB | 5 月前3
共 9 条
- 1