上一页 1 ··· 41 42 43 44 45 46 47 48 49 ··· 55 下一页
摘要: seq用于生成一个序列 seq [option] first increment last 选项: -f --format=FORMAT 使用 printf 样式的浮点格式 -s --separator=STRING 使用指定字符串分隔数字(默认:\n) -w --equal-width 在数字添加 阅读全文
posted @ 2020-09-22 10:36 ascertain 阅读(148) 评论(0) 推荐(0) 编辑
摘要: C风格 #!/bin/env sh function mat(){ for ((p=0;p<10;p++)) do echo $p done } mat {start..end..step} #!/bin/env sh function mat(){ for p in {10..1..2} do e 阅读全文
posted @ 2020-09-22 10:09 ascertain 阅读(93) 评论(0) 推荐(0) 编辑
摘要: os模块 import os print(os.name) Windows中os.name为nt Linux中os.name为posix sys模块 import sys print(sys.platform) Windows为win32 Linux为linux platform模块 import 阅读全文
posted @ 2020-09-20 16:56 ascertain 阅读(1616) 评论(0) 推荐(0) 编辑
摘要: pip install msgpack import msgpack,json js='{"person":[{"name":"zxc","age":18},{"name":"vbn","age":88},{"name":"uio","age":99}],"total":3}' d=json.loa 阅读全文
posted @ 2020-09-19 22:53 ascertain 阅读(225) 评论(0) 推荐(0) 编辑
摘要: import json from pathlib import Path pp={'a':123,'b':['bam',{'c':789}],'d':True,'m':False,'v':None} # print(p) # print(json.dumps(p)) # b=json.dumps(p 阅读全文
posted @ 2020-09-19 21:58 ascertain 阅读(85) 评论(0) 推荐(0) 编辑
摘要: s="""\ 1,tom,20, 2,jerry,30, 3,,, """ with open('c:/vbn.csv',mode='wt+') as f: # for line in s.splitlines(keepends=True): # print(line) # f.write(line 阅读全文
posted @ 2020-09-19 20:51 ascertain 阅读(90) 评论(0) 推荐(0) 编辑
摘要: import pickle from pathlib import Path file='d:/v/vbn' p=Path(file) if not p.parent.exists(): p.parent.mkdir(parents=True) with open(str(p),mode='wb') 阅读全文
posted @ 2020-09-19 20:47 ascertain 阅读(120) 评论(0) 推荐(0) 编辑
摘要: from configparser import ConfigParser cfg=ConfigParser() cfg.read('c:/mysql.ini') print(cfg.sections()) print(cfg.has_section('client')) print(cfg.ite 阅读全文
posted @ 2020-09-19 14:57 ascertain 阅读(219) 评论(0) 推荐(0) 编辑
摘要: trap命令用于捕获指定的信号并执行预定义的命令,为shell内置命令 有两个常用选项 基本语法: trap 'command' signal signal是要捕获的信号,command是捕获到信号后,将要执行的命令,命令可以是若干条shell语句,也可以是一个函数 shell脚本在执行时,会产生三 阅读全文
posted @ 2020-09-18 18:59 ascertain 阅读(1589) 评论(0) 推荐(0) 编辑
摘要: L2TP是一种工业标准的Internet隧道协议,功能大致和PPTP协议类似,比如同样可以对网络数据流进行加密。 L2TP也好,还是其它代理也好,说白了就是提供给我们一个中转地,所以搭建前得有台VPS服务器,如要实现xx,就得准备台国外的VPS服务器,这里继续推荐 hostwindos和 vultr 阅读全文
posted @ 2020-09-17 20:39 ascertain 阅读(7844) 评论(0) 推荐(0) 编辑
摘要: Unit和Target 先介绍两个概念,Unit和Target。 Unit是Systemd管理服务的基本单元,可以认为每个服务就是一个Unit,并使用一个Unit文件定义。Unit文件中需要包含相应服务的描述、属性以及需要运行的命令。在CoreOS中服务运行的命令通常是一系列的容器操作,而将具体的服 阅读全文
posted @ 2020-09-16 19:19 ascertain 阅读(221) 评论(0) 推荐(0) 编辑
摘要: Systemd支持的12种Unit文件类型: 后缀名 作用 .automount 用于控制自动挂载文件系统。自动挂载即当某一目录被访问时系统自动挂载该目录,这类 unit 取代了传统 Linux 系统的 autofs 相应功能 .device 对应 /dev 目录下设备,主要用于定义设备之间的依赖关 阅读全文
posted @ 2020-09-16 18:39 ascertain 阅读(295) 评论(0) 推荐(0) 编辑
摘要: 服务器分区变成了read-only system.当碰到这个问题的时候,我的第一反应很可能硬件出现了故障,我使用了如下的方法来检测和排除故障: 使用dmesg检查是否有关于磁盘错误的信息,果不其然发现大量磁盘扇区错误的信息,如下: end_request: I/O error, dev 03:06 阅读全文
posted @ 2020-09-15 19:33 ascertain 阅读(2322) 评论(0) 推荐(0) 编辑
摘要: # 设置监听IP,默认是监听所有IP ;local a.b.c.d # 设置监听端口,必须要对应的在防火墙里面打开 port 1194 # 设置用TCP还是UDP协议? ;proto tcp proto tcp # 设置创建tun的路由IP通道,还是创建tap的以太网通道,由于路由IP容易控制,所以 阅读全文
posted @ 2020-09-15 19:31 ascertain 阅读(247) 评论(0) 推荐(0) 编辑
摘要: logstash安装目录结构: 配置文件 home目录 Unit文件此文件可由bin/system-install脚本生成 #!/bin/bash unset CDPATH . "$(cd `dirname $0`/..; pwd)/bin/logstash.lib.sh" setup if [ - 阅读全文
posted @ 2020-09-15 18:47 ascertain 阅读(1149) 评论(0) 推荐(0) 编辑
摘要: L2TP配置: IPSec配置: \ IPSec策略: 阅读全文
posted @ 2020-09-14 19:12 ascertain 阅读(1649) 评论(0) 推荐(0) 编辑
摘要: Download: https://download.sonatype.com/nexus/3/latest-unix.tar.gz Download (sonatype.com) Docker Install: docker pull sonatype/nexus3 docker volume c 阅读全文
posted @ 2020-09-14 15:28 ascertain 阅读(513) 评论(0) 推荐(0) 编辑
摘要: open(file,mode='r',buffering=-1,encoding=None,errors=None,newline=None,closefd=True,opener=None) f=open("test") # file object # Windows <_io.TextIOWra 阅读全文
posted @ 2020-09-13 22:46 ascertain 阅读(95) 评论(0) 推荐(0) 编辑
摘要: 初中级: 1、评估产品需求及发展需求,设计网站架构。 2、选择IDC公司、云产品,CDN等产品。 3、采购服务器、安装系统、配置服务、服务器IDC上架。 4、调试网络、优化系统及服务。 5、上线代码、配合研发搭建环境、调试、测试代码。 6、监控硬件、软件及各种业务应用。 7、配置收集日志和,根据日志 阅读全文
posted @ 2020-09-13 11:14 ascertain 阅读(485) 评论(0) 推荐(0) 编辑
摘要: partial对参数进行复制后,会覆盖原有函数的默认值,因为,partial中已经赋值了,默认值就不再生效,如果partial中未定义,则默认值生效 partial定义 def partial(func,*args,**kwargs): def newfunc(*fargs,**fkwargs): 阅读全文
posted @ 2020-09-13 10:25 ascertain 阅读(172) 评论(0) 推荐(0) 编辑
上一页 1 ··· 41 42 43 44 45 46 47 48 49 ··· 55 下一页