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
底层网络接口,所以它根据ip route show去查找default via这行的网卡(有默认 路由的网络接口),但我们测试环境的服务器没有配置网关,所以它找不到默 认路由,导致flannel启动失败 解决方法是给服务加个网关(默认路由)或者在kube-flannel.yml里指定vxlan绑 定的网卡设备(不建议直接绑定网络接口名,因为不同的服务器接口名称可能 不一样,可匹配ip网段所在的网络接口) CGROUPS_MEMORY: missing [ERROR SystemVerifica�on]: missing required cgroups: memory 因为树莓派系统默认未启动cgroup_memory,解决方法: # vi /boot/firmware/cmdline.txt #如果有这个文件就编辑此文件 # vi /boot/cmdline.txt 主系统的这块veth 放到某个网桥里(如Docker0或cni0这些网桥) ★VxLAN大二层网络隧道 VxLAN是一种隧道技术,能在三层网络的基础上建立二层以太网络,vxlan的实 现方法是将原始的以太网帧加上8字节的vxlan头部,再封装在一个UDP报文里, 此报文目的端口为8472/udp,即对端的隧道终端服务监听8472/udp端口。 所以vxlan可以理解为 MAC帧over0 码力 | 126 页 | 4.33 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 年前3git 操作手册
★重置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 年前3Velocity Conference 2015
about? What did I learn? Service Workers: The Practical Bits by Patrick Meenan (Google) @patmeenan http://www.slideshare.net/patrickmeenan/service-workers-for-performance They are effectively a man in Performance Best Practices Together to Create the Perfect SPA by Chris Love (Love2Dev) @ChrisLove http://www.slideshare.net/docluv/putting-performance-best-practices-together-for-a-spa "We have created (but where the heck do you start?) by Tammy Everts & Cliff Crocker (SOASTA) @tameverts @cliffcrocker http://www.slideshare.net/CloudTest/metrics-metrics-everywhere-but-where-the-heck-do-you-start The myth0 码力 | 4 页 | 176.79 KB | 5 月前3Pomodoro Technique
Utica Coll. of Syracuse Univ. Lib., N.Y . Attributions and References [1] The Pomodoro Technique, http://pomodorotechnique.com/ [2] Personal Productivity Using The Pomodoro Technique, Daniel Hinojosa w/ present#slide=id.i0 [3] Flow: The Psychology of Optimal Experience, Mihaly Csikszentmihalyi, http://www.amazon.com/Flow-Psychology-Experience-Mihaly-Csikszentmihalyi/dp/0061339202/Walkthrough To0 码力 | 3 页 | 289.16 KB | 5 月前3The Phoenix Project
Attributions [1] Amazon, http://www.amazon.com/Phoenix-Project-DevOps-Helping-Business/dp/0988262509/[2] The Three Ways: The Principles Underpinning DevOps, Gene Kim, http://itrevolution.com/the-three-ways-0 码力 | 3 页 | 154.45 KB | 5 月前3
共 7 条
- 1