M o t r i x 一款全能的下载工具

Motrix 是一款开源免费且界面非常清爽简约的全能型下载软件,它跨平台支持 Windows、Mac、Linux 三大系统,可以支持下载 HTTP、FTP、BT、磁力链 …

more ...

PDF中提取图片

  1. 安装库
C:\Users\*****>pip install pymupdf
Collecting pymupdf
  Downloading PyMuPDF-1.17.5-cp38-cp38-win_amd64.whl (5.1 MB)
     |████████████████████████████████| 5.1 MB 273 kB/s
Installing collected packages: pymupdf
Successfully installed pymupdf-1.17.5

C:\Users\*****>
  1. python 脚本
import fitz
import time
import re
import os

def pdf2pic(path, pic_path …
more ...

AD 密码过期查询

  1. 单个AD 账号查询
net user %USERNAME% /domain

例如:

PS C:\Windows\system32> net user lansz /domain
这项请求将在域 jx.cn 的域控制器处理。

用户名                 lansz
全名                   Lan ShunZhou
注释                   兰顺舟 …
more ...

office 激活

office 2019
转换成 vol版本出现报错
C:\Program Files\Microsoft Office\Office16>cscript ospp.vbs /rearm
Microsoft (R) Windows Script Host Version 5.812
版权所有(C) Microsoft Corporation。保留所有权利。

---Processing--------------------------
---------------------------------------
There was an error when trying to rearm Office. You can try …
more ...

ngxtop 报错

[root@**** ~]# ngxtop
Traceback (most recent call last):
  File "/usr/local/bin/ngxtop", line 7, in
    from ngxtop.ngxtop import main
  File "/usr/local/lib/python3.6/site-packages/ngxtop/ngxtop.py", line 77, in
    from config_parser import detect_log_config, detect_config_path, extract_variables, build_pattern
ModuleNotFoundError: No module named 'config_parser'
解决方法:
卸 …
more ...

Python 复制文件到新的路径

import shutil

path = 'd:\11111\test.py'

newpath = 'd:\2222\test.py'

shutil.copy(path, newpath)

more ...

python 列出文件夹下所有的文件以及文件夹名

import os
path = 'D:\******……' #定义路径

folders = os.listdir(path)
for folder in folders:
    print(folder)
more ...

用AD组策略部署Bginfo,桌面显示用户信息

工具:Bginfo,Windows AD 组策略

  1. 先配置好Bginfo

image1

对于IP 需要自定义,否则会出现不在使用的网卡的地址为空,显示为<none>。

为了过滤不适用的 …

more ...

Windows10系统下的WSL+Ubuntu图形桌面配置

  1. Windows下安装VcXsrv

image1

2. WSL Ubuntu下安装xfce desktop
sudo apt-get install xfce4-terminal
sudo apt-get install xfce4
  1. ~./bashrc末尾添加Display信息
export DISPLAY=:0.0
export LIBGL_ALWAYS_INDIRECT=1
执行下面命令,使修改生效配置
source ~/.bashrc
4. Windows上打开XLaunch
选择“Multiple Window”,Display number填写0。其他 …
more ...

powershell:远程连接服务器

(1)在server端输入“Enable-PSRometing”,启用远程连接;
(2)在client端输入set-item wsman:\localhost\client\trustehosts –value “192.168.11.53”,将server设置为client的信任主机。
(3)输入“enter-pssession –computername 192.168.11.53 –credentrial contoso.test\administrator”,输入密码后即可远程登入server;
more ...

Centos 8 时间

CentOS8.0中默认不再支持ntp软件包,时间同步将由chrony来实现,像我这种习惯了ntp同步时间的,一时难以去适应chrony。

本文将通过wlnmp提供的源,来安装ntp服务

添加wlnmp源

安 …

more ...

Word 2019 发布wordpress 博客

  1. 新建
  2. 搜索博客,选择博客模板

image1

  1. 选择wordpress ,输入账号密码
more ...

决WordPress修改固定链接后Nginx报404

nginx.conf 里添加如下内容:[icon name="wpforms" class="" unprefixed_class=""]

location / {
if (-f $request_filename/index.html){
                rewrite (.*) $1/index.html break;
        }
if (-f $request_filename/index.php){
                rewrite (.*) $1/index.php;
        }
if (!-f $request_filename){
                rewrite (.*) /index.php;
        }
}
more ...

自建KMS 激活 win

wget https://github.com/Wind4/vlmcsd/releases/download/svn1111/binaries.tar.gz
解压
tar -zxvf binaries.tar.gz

Intel,那么就可以直接用我下面的命令进入目录:

./vlmcsd-x64-musl-static

查看vlmcsd的运行情况,可以使用如下命令 …

more ...

删除 RSS 功能 的“文章RSS”、“评论RSS”、“WordPress.org”

wp-include/widgets/class-wp-widget-meta.php

删除RSS 相关的字段

more ...

CentOS8使用阿里yum源

由于CentOS 8主要使用AppStream, BaseOS, Extras三个仓库,所以在这里主要配置上面三个仓库对应的配置文件,这里的三个仓库可以理解为同一个软件源中保存了 …

more ...

python3 print格式化输出---------"%s 和 % d"

  1. 打印字符串

    >>> string="hello"
    >>> print("string=%s"%(string))
    输出: string=hello
    

2.打印整数

>>> print ("He is %d years old"%(25))
输出: He is 25 years old

3.打印浮点数

>>>print ("His height is %f m"%(1.83)) 输出 …
more ...

Centos date 设置自定义时间

(1)安装ntpdate工具

# yum -y install ntp ntpdate

(2)设置系统时间与网络时间同步

# ntpdate cn.pool.ntp.org

(3)将系统时间写入硬件时间

# hwclock --systohc

(4)强制系统时间写 …

more ...

Squid 状态查看

squidclient -p 80 mgr:info      #取得squid运行状态信息:
squidclient -p 80 mgr:mem     #取得squid内存使用情况:
squidclient -p 80 mgr:objects #取得squid已经缓存的列表,使用时要小心,可能会造成squid崩溃:
squidclient -p 80 mgr:diskd  #取得squid的磁盘使用情况:
squidclient -p 80 -m PURGE http …
more ...

Windows 下 python 打包成exe

Date 2019-12-06(Fri) By terry Category Life.

pyinstaller.exe -F 文件路径/要打包的文件.py

more ...