随手记

2025

2025 - 03

  • 2025/03/25

    uview-plus文档去广告

    function clearAllTimers() {
      const maxTimeouts = 1000; 
      for (let i = 1; i <= maxTimeouts; i++) {
        clearTimeout(i);
        clearInterval(i);
      }
    }
    // 清除所有定时器
    clearAllTimers();
    window.alert = function() {};
    document.querySelectorAll('.el-dialog__wrapper, .v-modal').forEach(item=>item.remove())
  • 2025/03/17

    扫描本地局域网ip 循环ping

    for /L %i IN (1,1,254) DO ping -w 2 -n 1 192.168.0.%i

    列出局域网ip列表

    arp -a

    给局域网ip发送消息

    msg /server:192.168.1.166 * "ip冲突了"

2025 - 02

  • 2025/02/25

    // 获取已添加的规则
    function getRules() {
      return new Promise((resolve, reject) => {
        chrome.declarativeNetRequest.getSessionRules({}, (rules) => {
          if (chrome.runtime.lastError) {
            reject(chrome.runtime.lastError);
          } else {
            resolve(rules);
          }
        });
      });
    }
    
    扩展沙箱机制 每个插件只能获取到自己设置的
    在逆向的插件中执行获取
    getRules().then((rules) => {
        console.log(rules)
    }).

2024

2024 - 09

  • 2024/09/02

    Docker部署influxdb

    docker run -d \
    -p 8086:8086 \
    --name influxdb2 \
    --mount type=volume,source=influxdb2-data,target=/var/lib/influxdb2 \
    --mount type=volume,source=influxdb2-config,target=/etc/influxdb2 \
    --env DOCKER_INFLUXDB_INIT_MODE=setup \
    --env DOCKER_INFLUXDB_INIT_USERNAME=iuu \
    --env DOCKER_INFLUXDB_INIT_PASSWORD=iuuiuuiuu \
    --env DOCKER_INFLUXDB_INIT_ORG=iuu \
    --env DOCKER_INFLUXDB_INIT_BUCKET=iuu-bucket \
    influxdb:2.7.10

2024 - 08

  • 2024/08/29

    百度ueditor编辑器自动加P最新解决办法

    不让百度ueditor编辑器在空白文档自动添加<p><br/><p>
    在网上找了一圈,大部分是解决LI里自动套P
    找了半天发现只需要把ueditor.all.min.js这个文件里的 
    "<p>"+(browser.ie?"":"<br/>")+"</p>"  和 "<p>"+(ie?"":"<br/>")+"</p>"  都替换成"",问题就解决了.
    不过我觉得应该只是替换某一处应该就可以解决,不过时间有限,等以后有时间再去深究,先把现在的问题解决先,也给有需要的朋友分享一下。
  • 2024/08/27

    navicat for Windows 16/17无限试用脚本

    echo Delete HKEY_CURRENT_USER\Software\PremiumSoft\NavicatPremium\Update
    reg delete HKEY_CURRENT_USER\Software\PremiumSoft\NavicatPremium\Update /f
    echo Delete HKEY_CURRENT_USER\Software\PremiumSoft\NavicatPremium\Registration[version and language]
    for /f %%i in ('"REG QUERY "HKEY_CURRENT_USER\Software\PremiumSoft\NavicatPremium" /s | findstr /L Registration"') do (
        reg delete %%i /va /f
    )
    
    echo Delete Info and ShellFolder under HKEY_CURRENT_USER\Software\Classes\CLSID
    for /f "tokens=*" %%a in ('reg query "HKEY_CURRENT_USER\Software\Classes\CLSID"') do (
      for /f "tokens=*" %%l in ('reg query "%%a" /f "Info" /s /e ^| findstr /i "Info"') do (
        echo Delete: %%a
        reg delete %%a /f
      )
      for /f "tokens=*" %%l in ('reg query "%%a" /f "ShellFolder" /s /e ^| findstr /i "ShellFolder"') do (
        echo Delete: %%a
        reg delete %%a /f
      )
    )

    来源 https://linux.do/t/topic/100400/67

  • 2024/08/12

    使用 systemd-analyze 命令来检查服务文件的语法是否正确

    systemd-analyze verify /etc/systemd/system/supervisord.service
  • 2024/08/09

    Docker安装redis

    docker pull redis:latest
    
    wget http://download.redis.io/redis-stable/redis.conf
    
    docker run -d -p 6379:6379 \
    --name docker-redis \
    -v /home/iuu/Software/Docker/redis/redis.conf:/etc/redis/redis.conf \
    -v /home/iuu/Software/Docker/redis/data:/data \
    --restart=always \
    redis:latest \
    redis-server /etc/redis/redis.conf
  • 2024/08/06

    编译安装PHP常用参数

    ./configure --prefix=/home/iuu/Software/php/php83 --with-config-file-path=/home/iuu/Software/php/php83/etc  --with-curl --with-freetype --enable-gd --with-jpeg  --with-gettext  --with-kerberos  --with-mysqli --with-openssl   --with-external-pcre   --with-pdo-mysql --with-pear   --with-xsl --with-zlib --enable-fpm --enable-bcmath  --enable-mbregex --enable-mbstring --enable-opcache --enable-pcntl --enable-shmop --enable-soap --enable-sockets --enable-sysvsem --enable-xml --with-zip  --enable-ftp --enable-session --enable-xml --enable-cli --enable-static --enable-mysqlnd --enable-intl --enable-pdo  --with-iconv --with-bz2 --with-ldap-sasl --with-mhash --with-libxml  --with-pdo-sqlite
    
    make && make install
    
    cp /home/iuu/Software/php/php83/php-8.3.10/php.ini-production /home/iuu/Software/php/php83/etc/php.ini
    cp /home/iuu/Software/php/php83/php-8.3.10/sapi/fpm/php-fpm /home/iuu/Software/php/php83/etc/php-fpm
    cp /home/iuu/Software/php/php83/etc/php-fpm.conf.default       /home/iuu/Software/php/php83/etc/php-fpm.conf
    cp /home/iuu/Software/php/php83/etc/php-fpm.d/www.conf.default /home/iuu/Software/php/php83/etc/php-fpm.d/www.conf
  • 2024/08/06

    给apt设置代理服务器

    新增配置文件

    /etc/apt/apt.conf.d/proxy.conf

    增加以下内容

    Acquire {
      HTTP::proxy "http://127.0.0.1:1080";
      HTTPS::proxy "http://127.0.0.1:1080";
    }
  • 2024/08/01

    Docker安装MySql

    docker image pull mysql:latest
    docker run \
    --name docker-mysql \
    --restart unless-stopped \
    -d -p 3310:3306 \
    -v /home/iuu/Software/Docker/mysql/log:/var/log/mysql \
    -v /home/iuu/Software/Docker/mysql/data:/var/lib/mysql \
    -v /home/iuu/Software/Docker/mysql/conf:/etc/mysql/conf.d \
    -e MYSQL_ROOT_PASSWORD=root \
    -e LANG="C.UTF-8" \
    mysql:latest
  • 2024/08/01

    Docker安装神器lucky

    docker image pull gdy666/lucky:latest
    docker run -d \
    --name lucky \
    --restart=always \
    --network=host \
    -v /home/iuu/Software/Docker/lucky/luckyconf:/goodluck \
    gdy666/lucky
  • 2024/08/01

    NAS迅雷自建Docker

    docker image pull cnk3x/xunlei:latest
    docker run -d \
    --name=xunlei \
    --hostname=xunlei-hostname \
    --network=host \
    --restart=unless-stopped \
    --privileged \
    -e XL_DASHBOARD_PORT=2345 \
    -v /home/iuu/Software/Docker/xunlei/data:/xunlei/data \
    -v /mnts/Downloads:/xunlei/downloads \
    cnk3x/xunlei:latest
  • 2024/08/01

    RustDesk自建Docker

    docker image pull rustdesk/rustdesk-server
    docker run -td \
    --restart=always \
    --name hbbs \
    --network=host \
    -v /home/iuu/Software/Docker/rustdesk/hbbs:/root \
    rustdesk/rustdesk-server hbbs
    docker run -td \
    --restart=always \
    --name hbbr \
    --network=host \
    -v /home/iuu/Software/Docker/rustdesk/hbbr:/root \
    rustdesk/rustdesk-server hbbr

2024 - 07

  • 2024/07/23

    网络安全问题任重道远

    从资产测绘到拿到超级管理员用户5个小时解决战斗

    或许是我运气好误打误撞

2023

2023 - 03

  • 2023/03/13

    k8s核心概念

    Pod:

    Pod是k8s中最小的部署单元。

    Pod是一组容器的集合。

    Pod中的容器是共享网络的。

    Pod的生命周期是短暂的。

    Controller:

    Controller可以确保预期的Pod的副本数量。

    Controller确保所有的Node运行同一个Pod。

    一次性任务和定时任务。

    无状态应用部署。

    有状态应用部署。

    Service:

    定义一组Pod的访问规则。

2022

2022 - 05

  • 2022/05/06

    常见云服务商的K8s服务

    腾讯云TKE

    阿里云ACK

2021

2021 - 04

  • 2021/04/14

    禁止brew 安装软件的时候自动更新

    export HOMEBREW_NO_AUTO_UPDATE=1

2020

2020 - 02

  • 2020/02/18

    Mac安装Go终端环境配置

    # GO环境
    export PATH=$PATH:$GOROOT/bin
    export GOPATH=/Users/iuu/Developer/Go
    export GOBIN=$GOPATH/bin
    export PATH=$PATH:$GOBIN

2018

2018 - 07

  • 2018/07/07

    位 (bit):是计算机中最小的数据单位,只有0和1两种状态。

    字节 (byte):1字节等于8位,用于表示更大的数据单元。

2017

2017 - 07

  • 2017/07/07

    终端设置代理

    export https_proxy=http://127.0.0.1:1080 http_proxy=http://127.0.0.1:1080 all_proxy=socks5://127.0.0.1:1080