This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PS C:\Program Files\Microsoft Office\Office16> cscript.exe .\OSPP.VBS /dstatus | |
Microsoft (R) Windows Script Host Version 5.812 | |
版权所有(C) Microsoft Corporation。保留所有权利。 | |
---Processing-------------------------- | |
--------------------------------------- | |
PRODUCT ID: 00413-50000-00000-AA773 | |
SKU ID: 52c4d79f-6e1a-45b7-b479-36b666e0a2f8 | |
LICENSE NAME: Office 19, Office19ProPlus2019R_Grace edition | |
LICENSE DESCRIPTION: Office 19, RETAIL(Grace) channel |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#虚拟机迁移平台之后无法启动进入dracut模式 | |
#光驱启动进入救援模式 | |
#先chroot进入原系统(一般是/mnt/sysimage)然后执行以下命令 | |
initramfs: dracut -v /boot/initramfs-$(uname -r).img $(uname -r) | |
#然后退出chroot重启即可 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AR1220C-S 使用网页登录管理界面提示 ERR_SSL_SERVER_CERT_BAD_FORMAT | |
undo http secure-server ssl-policy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
openssl dhparam -out /etc/ssl/certs/dhparam.pem 4096 #常规做法,非常慢 | |
openssl dhparam -dsaparam -out /etc/ssl/certs/dhparam.pem 4096 #这个速度比较快,原因还没有去研究 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
from pyPdf import PdfFileReader, PdfFileWriter | |
out = PdfFileWriter() | |
for i in range(1, 165): | |
src_pdf = u"/path/to/pdfs/" + str(i) + u".pdf" | |
pdf = PdfFileReader(file(src_pdf, 'rb')) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
with open(fileName, 'wb') as f: | |
f.write(pdf.content) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import requests | |
allList = [] | |
for i in range(1, 23): | |
listPayload = dict(action="loadvoteoptionbypage", guid="2cdb51ca-ef8a-f83d-9fc6-28341591d747", | |
tpldiyfile="viewvotewx.tpl", page=i) | |
r = requests.post(u'http://m138082.nofollow.ax.mvote.cn/op.php', data=listPayload) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import requests | |
from PIL import Image | |
from io import BytesIO | |
url = u'http://grs.a.mvote.net/imgsource/global_AB7481EF-358F-0B95-F2FD-3C43CA06CE94.png' | |
r = requests.get(url) |