December 14, 2021
Linux
Docker
官方文档:https://docs.docker.com/engine/reference/commandline/docker/菜鸟教程:https://www.runoob.com/docker/docker-command-manual.html
Docker的操作命令和可用参数非 ...
查看更多
December 10, 2021
在类里面实现__enter__和__exit__方法,用于实现上下文管理:
class Manage(object):
def __init__(self):
print('init')
def __enter__(self):
...
查看更多
November 29, 2021
参考文档:https://zhuanlan.zhihu.com/p/149126959https://www.cnblogs.com/tkqasn/p/6524879.htmlhttps://blog.csdn.net/a2011480169/article/details/8789175 ...
查看更多
November 22, 2021
参考资料http://www.pythontip.com/pythonPatterns/https://www.runoob.com/design-pattern/design-pattern-tutorial.html
以前没了解过设计模式,最近了解一下,做个粗浅的笔记,慢慢深入理解补 ...
查看更多
October 9, 2021
Linux
git
在centos 6的机器上,使用默认yum安装的git克隆代码的时候,提示error: The requested URL returned error: 400 Bad Request while accessing,使用另一台centos 7高版本的git测试,同样的命令却不会报错,疑似 ...
查看更多
September 18, 2021
Linux
参考文档:https://www.sohu.com/a/252263523_609423https://blog.csdn.net/kongxx/article/details/98329891https://www.cnblogs.com/opama/p/4712139.html
官 ...
查看更多
September 16, 2021
Linux
Docker
参考文档:官方文档:https://docs.docker.com/engine/reference/builder/菜鸟教程:https://www.runoob.com/docker/docker-dockerfile.html博客园:https://www.cnblogs.com/p ...
查看更多
August 16, 2021
Linux
Python
Prometheus
Prometheus提供了一个官方的报警管理组件alertmanager,虽然也有图形化界面,但是页面没有提供定时静默的功能,不过开放了API可供调用,可以通过调用API去实现插入静默规则
API文档:https://raw.githubusercontent.com/prometheu ...
查看更多
August 12, 2021
Python
xlsxwriter只能生成新的xlsx文件,不能读取内容做修改官方文档:https://xlsxwriter.readthedocs.io/
示例代码#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 2021-8-3 ...
查看更多
May 20, 2021
Linux
openssl x509命令可以对证书做很多操作,可以参考: https://blog.csdn.net/as3luyuan123/article/details/16873093
#!/bin/bash
# 检查证书文件一定天数内是否过期
USAGE="USAGE: sh $ ...
查看更多