上一页 1 ··· 12 13 14 15 16 17 18 19 20 ··· 39 下一页
摘要: 使用云服务器git clone某个项目时,遇到如下问题: fatal: Out of memory, malloc failed (tried to allocate 2000000000 bytes) 百度后找到如下解决方法: sudo mkdir -p /opt/temp sudo dd if= 阅读全文
posted @ 2021-05-07 12:23 坚强的小蚂蚁 阅读(898) 评论(0) 推荐(0)
摘要: 目标:导入networksolution域名下载的csv文件, 这个脚本文件要放在和manage.py同级目录下 import os, random, string, csv from datetime import datetime import pytz os.environ.setdefaul 阅读全文
posted @ 2021-04-29 15:11 坚强的小蚂蚁 阅读(664) 评论(0) 推荐(0)
摘要: 查看一个域名的txt记录,其中_acme-challenge为主机记录,iot.inhandnetworks.com为域名 dig -t txt _acme-challenge.iot.inhandnetworks.com 阿里云申请免费域名时如果是www开头的域名,默认会把www省略 域名解析有许 阅读全文
posted @ 2021-04-26 16:04 坚强的小蚂蚁 阅读(479) 评论(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 坚强的小蚂蚁 阅读(563) 评论(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 坚强的小蚂蚁 阅读(442) 评论(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 坚强的小蚂蚁 阅读(683) 评论(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 坚强的小蚂蚁 阅读(116) 评论(0) 推荐(0)
摘要: 1. jQuery的serialize()方法通过序列化表单值,创建URL编码文本字符串,我们就可以选择一个或多个表单元素,也可以直接选择form将其序列化,如:(name 属性需要填写) <form id="form1"> <input type="hidden" value ="${topicI 阅读全文
posted @ 2021-04-07 11:07 坚强的小蚂蚁 阅读(532) 评论(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 坚强的小蚂蚁 阅读(69) 评论(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 坚强的小蚂蚁 阅读(126) 评论(0) 推荐(0)
上一页 1 ··· 12 13 14 15 16 17 18 19 20 ··· 39 下一页