摘要: yum install shc shc -f yourscript.sh 加密完成后会生产一个 yourscript.sh.x 文件 阅读全文
posted @ 2024-05-21 17:01 时光煮酒丶 阅读(2) 评论(0) 推荐(0) 编辑
摘要: #!/usr/bin/python env # -*- coding: utf-8 -*- import time import subprocess import logging """ # 分辨率 "adb shell wm size" adb shell input swipe命令中的坐标值中 阅读全文
posted @ 2024-01-17 17:15 时光煮酒丶 阅读(132) 评论(0) 推荐(0) 编辑
摘要: 使用supervisor进程管理工具,在同一个容器中部署zookeeper和kafka 目录 Dockerfile jdk1.8.0_181.tar.gz kafka_2.12-1.1.0.tgz conf.d docker-compose.yml kafka_conf.d conf.d 中为sup 阅读全文
posted @ 2023-11-29 10:22 时光煮酒丶 阅读(40) 评论(0) 推荐(0) 编辑
摘要: 修改tomcat配置文件:server.xml <Connector port="8080" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" compression="on" compressionMinSize=" 阅读全文
posted @ 2023-11-29 09:49 时光煮酒丶 阅读(95) 评论(0) 推荐(0) 编辑
摘要: from OpenSSL import crypto, SSL def generate_certificate( organization="PrivacyFilter", common_name="192.168.1.200:8000", country="NL", duration=(365 阅读全文
posted @ 2023-10-26 10:18 时光煮酒丶 阅读(72) 评论(0) 推荐(0) 编辑
摘要: import logging.handlers import datetime class ColoredFormatter(logging.Formatter): COLOR_CODES = { 'DEBUG': '\033[94m', # 蓝色 'INFO': '\033[92m', # 绿色 阅读全文
posted @ 2023-09-21 15:57 时光煮酒丶 阅读(147) 评论(0) 推荐(0) 编辑
摘要: tortoise-orm 使用雪花算法生成主键ID import time from tortoise import Tortoise, fields, run_async from tortoise.models import Model from typing import Any class Snowflake: def __init__(se 阅读全文
posted @ 2023-09-16 17:45 时光煮酒丶 阅读(98) 评论(0) 推荐(0) 编辑
摘要: #背景: 做FTP服务器数据迁移,要保证FTP能正常写入文件目录需要有755权限,从安全考虑文件仅需要要644权限,由于文件层级较多,使用`chmod -R`命令来修改目录和文件只能修改为同一种权限,不能满足需求. #过程 - 先将所有文件目录权限修改为644 ```shell chmod -R 6 阅读全文
posted @ 2023-08-16 10:56 时光煮酒丶 阅读(108) 评论(0) 推荐(0) 编辑
摘要: 安装ImageMagick ``` yum -y install ImageMagick ``` 批量压缩脚本 ```shell #!/bin/bash # 设置原始图片目录和压缩后图片目录 input_dir="/data/images" output_dir="/data/images_outp 阅读全文
posted @ 2023-08-15 14:52 时光煮酒丶 阅读(145) 评论(0) 推荐(0) 编辑
摘要: 主要配置文件: ``` server { listen 443 ssl; server_name www.example.com; ssl_certificate /usr/local/nginx_server/ssl_key/example.com.pem; ssl_certificate_key 阅读全文
posted @ 2023-06-27 14:56 时光煮酒丶 阅读(295) 评论(0) 推荐(0) 编辑