上一页 1 ··· 12 13 14 15 16 17 18 19 20 ··· 39 下一页
摘要: 查看一个域名的txt记录,其中_acme-challenge为主机记录,iot.inhandnetworks.com为域名 dig -t txt _acme-challenge.iot.inhandnetworks.com 阿里云申请免费域名时如果是www开头的域名,默认会把www省略 域名解析有许 阅读全文
posted @ 2021-04-26 16:04 坚强的小蚂蚁 阅读(472) 评论(0) 推荐(0)
摘要: url url(r'^grid/$', ChartView.as_view(), name='grid'), url(r'domain_overview/$', domain_overview), views from django.http import HttpResponse from pye 阅读全文
posted @ 2021-04-25 11:21 坚强的小蚂蚁 阅读(557) 评论(0) 推荐(0)
摘要: 方法1: import subprocess x = subprocess.check_output("docker ps | grep wget | awk -F '[ ]+' '{print $NF}' ", shell=True) #data = x.communicate() print(x 阅读全文
posted @ 2021-04-13 17:35 坚强的小蚂蚁 阅读(438) 评论(0) 推荐(0)
摘要: 参考: https://blog.csdn.net/shadow_zed/article/details/109030821 显示命令的绝对路径(cmd) ps -eo pid,ppid,%mem,%cpu,cmd --sort=-%cpu | head 只想看命令名字而不是命令的绝对路径(comm 阅读全文
posted @ 2021-04-13 11:09 坚强的小蚂蚁 阅读(678) 评论(0) 推荐(0)
摘要: 一个zabbix监控脚本 #!/bin/python3 # coding = utf-8 import time import os # 获得最新的报表 dir = "/mnt/elements/GEReports/zip/" file_lists = os.listdir(dir) file_li 阅读全文
posted @ 2021-04-12 14:53 坚强的小蚂蚁 阅读(114) 评论(0) 推荐(0)
摘要: 1. jQuery的serialize()方法通过序列化表单值,创建URL编码文本字符串,我们就可以选择一个或多个表单元素,也可以直接选择form将其序列化,如:(name 属性需要填写) <form id="form1"> <input type="hidden" value ="${topicI 阅读全文
posted @ 2021-04-07 11:07 坚强的小蚂蚁 阅读(529) 评论(0) 推荐(0)
摘要: 最好不要用 列表 作为参数,否则容易得到非预期的结果,如下代码。 def add(a, b): a += b return a class Company: def __init__(self, name, staffs=[]): self.name = name self.staffs = sta 阅读全文
posted @ 2021-04-02 17:10 坚强的小蚂蚁 阅读(65) 评论(0) 推荐(0)
摘要: 参考:https://blog.csdn.net/appleyuchi/article/details/105733270 有时间多看几遍,不难理解 例子1 class Role: def walk(self): print('走') class RunMixin: def run(self): p 阅读全文
posted @ 2021-04-02 16:55 坚强的小蚂蚁 阅读(125) 评论(0) 推荐(0)
摘要: 转自:https://blog.csdn.net/aransam/article/details/80929460 1. 两个基类1)APIViewrest_framework.views.APIView APIView是REST framework提供的所有视图的基类,继承自Django的View 阅读全文
posted @ 2021-04-01 18:40 坚强的小蚂蚁 阅读(117) 评论(0) 推荐(0)
摘要: 目标:导出文本中的镜像,并以后缀+tar命名保存镜像,比如emqttd:v1.4.1.tar 1.txt image: registry.cn-hangzhou.aliyuncs.com/elements/captcha:v1.3.7 image: registry.cn-hangzhou.aliy 阅读全文
posted @ 2021-03-31 11:46 坚强的小蚂蚁 阅读(275) 评论(0) 推荐(0)
上一页 1 ··· 12 13 14 15 16 17 18 19 20 ··· 39 下一页