09 2022 档案

摘要:ClientAliveInterval 60 ClientAliveCountMax 2TCPKeepAlive yes ClientAliveInterval: Sets a timeout interval in seconds after which if no data has been r 阅读全文
posted @ 2022-09-30 15:00 ascertain 阅读(23) 评论(0) 推荐(0) 编辑
摘要:1.通过进程替换 #!/bin/bash expect <(cat <<-delimiter set timeout 3 spawn ssh -l root 192.168.8.12 expect { "password" { send "exuberant\n" } } interact deli 阅读全文
posted @ 2022-09-28 19:34 ascertain 阅读(64) 评论(0) 推荐(0) 编辑
摘要:函数 #!/bin/bash function b(){ for i in `seq 1 $2`;do echo -n "$1" done } b = 1 printf printf '=%.0s' {1..10} printf %10s | tr ' ' = seq tr seq -s= 10 | 阅读全文
posted @ 2022-09-28 17:28 ascertain 阅读(91) 评论(0) 推荐(0) 编辑
摘要:dchelper.sh #!/bin/bash # global variables # scriptDir=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) scriptDir='' repositoryDir='' devopsHost='' dbHos 阅读全文
posted @ 2022-09-28 16:06 ascertain 阅读(17) 评论(0) 推荐(0) 编辑
摘要:1: 修改Windows启动项 bootice EasyBCD EasyUEFI 2: 网络安全 acunetix kubeadm init \ --kubernetes-version=v1.21.3 \ --apiserver-advertise-address=192.168.8.11 \ - 阅读全文
posted @ 2022-09-28 12:31 ascertain 阅读(300) 评论(0) 推荐(0) 编辑
摘要:sshd: ~/.ssh/environment client连接进来时, 会有此环境变量, sshd必须设置PermitUserEnvironment yes, 默认no client发送本地session的环境变量至sshd /etc/ssh/sshd_config /etc/ssh/ssh_c 阅读全文
posted @ 2022-09-28 11:56 ascertain 阅读(106) 评论(0) 推荐(0) 编辑
摘要:import os import numpy as np import pandas as pd import string, random def random_string(n: int): return ''.join(random.choices(string.ascii_letters, 阅读全文
posted @ 2022-09-23 06:22 ascertain 阅读(78) 评论(0) 推荐(0) 编辑
摘要:import time def dubious(): print(f"\033[32;40;7m{'dubious start'}\033[0m") while True: send_value = yield if send_value is None: break commence = time 阅读全文
posted @ 2022-09-19 16:11 ascertain 阅读(26) 评论(0) 推荐(0) 编辑
摘要:__slots__ 定义为类属性, 约束实例属性, 类定义__slots__后, 实例就没有__dict__ 子类和父类都定义__slots__后, 子类可有全部__slots__属性 父类存在__slots__,子类没有定义__slots__时, 子类存在__dict__ 定义__slots__后 阅读全文
posted @ 2022-09-19 14:08 ascertain 阅读(17) 评论(0) 推荐(0) 编辑
摘要:super不带任何参数,必须在类中使用, 等价于第一参数为当前类,第二参数为当前函数第一参数(self) super(type) 一个参数时 没什么用, 不能调用任何方法 super(type,type2) requires issubclass(type2,type) 未绑定方法, 以type2的 阅读全文
posted @ 2022-09-16 16:47 ascertain 阅读(16) 评论(0) 推荐(0) 编辑
摘要:~/.profile printf "%-8s %-25s %-4s %s\n" @@@@@ ~/.profile '==>' Commence # ~/.profile: executed by Bourne-compatible login shells. if [ "$BASH" ]; the 阅读全文
posted @ 2022-09-16 11:41 ascertain 阅读(79) 评论(0) 推荐(0) 编辑
摘要:class Singleton: __obj = None __initiated = False def __new__(cls, *args, **kwargs): if cls.__obj is None: cls.__obj = super(Singleton, cls).__new__(c 阅读全文
posted @ 2022-09-15 10:45 ascertain 阅读(17) 评论(0) 推荐(0) 编辑
摘要:所有function都有 __get__ 用于实现绑定 __get__ class B: def __init__(self, v): self._v = v def v(self): return self._v def bind(instance, func, name=None): if na 阅读全文
posted @ 2022-09-12 20:26 ascertain 阅读(22) 评论(0) 推荐(0) 编辑
摘要:const obj = { name: 'qwer', hobbies: ['op', 'nm'], year: 2022, fn: function () { }, // function ignore reg: new RegExp(), // RegExp {} undefined: unde 阅读全文
posted @ 2022-09-05 22:11 ascertain 阅读(112) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示