使用NetSetMan管理多网卡配置

出于办公需求,需要对两张网卡进行管理,包括配置IP、切换网卡等。 找到了个老牌的网络管理软件NetSetMan,使用非常方便快捷,以下是使用实例。 如上图所示,新建配置文件,命名为仅内网,选择内网网卡设备,启用IP配置,设置相应IP、掩码、网关和DNS。然后勾选适配器状态,设置为启用。 添加一个适配器配置,设备选择为无线网卡,然后勾选适配器状态,设置为禁用。 以上设置意思为启用内网网卡并配置IP,禁用无线网卡。 设置完成后,选择当前配置,然后在界面右上角点击激活即可生效。 也可以点击NetSetMan托盘图标,直接选择相应配置名激活生效。 下载NetSetMan

八月 2, 2024 · JQX

Pypi国内镜像设置

PyPI(Python包索引)是最流行的Python软件存储库,使用Pypi可查找与安装由Python社区开发和共享的软件。 由于线路问题,国内通过pypi默认镜像安装或更新软件时可能会很慢,此种情况可以通过配置国内镜像来改善。 pypi临时使用国内镜像 临时使用国内镜像来安装jupyter pip install -i https://mirror.nju.edu.cn/pypi/web/simple jupyter 临时使用国内镜像来升级pip python -m pip install -i https://mirror.nju.edu.cn/pypi/web/simple --upgrade pip 设置pypi默认镜像 通过以下方法可以设置默认镜像 pip config set global.index-url https://mirror.nju.edu.cn/pypi/web/simple 国内pypi镜像列表 https://mirror.nju.edu.cn/pypi/web/simple 南京大学 https://mirrors.bfsu.edu.cn/pypi/web/simple 北京外国语大学 https://mirrors.neusoft.edu.cn/pypi/web/simple/ 大连东软信息学院 https://mirrors.jlu.edu.cn/pypi/simple/ 吉林大学 https://mirrors.njtech.edu.cn/pypi/web/simple/ 南京工业大学 https://mirror.nyist.edu.cn/pypi/web/simple/ 南阳理工学院 https://mirrors.pku.edu.cn/pypi/web/simple/ 北京大学 https://mirrors.sustech.edu.cn/pypi/web/simple 南方科技大学 https://pypi.tuna.tsinghua.edu.cn/simple 清华大学

七月 30, 2024 · JQX

Dufs一个灵活并功能强大的文件服务器

Dufs一个独特的文件服务器,支持静态文件、访问控制、上传、搜索和webdav功能。 dufs特性 静态文件 打包下载目录为zip文件 上传文件或目录,支持拖放 新建、编辑、搜索文件 支持上传、下载断点续传 访问控制 支持https 支持webdav curl访问 安装dufs 官方下载地址 https://github.com/sigoden/dufs/releases 国内下载地址 (密码3705) 根据系统类型下载文件,解压后只有一个dufs单文件 tar zxf dufs-v0.41.0-x86_64-unknown-linux-musl.tar.gz mv dufs /usr/local/bin/ chmod +x /usr/local/bin/dufs 使用dufs dufs命令行参数 dufs --help Dufs is a distinctive utility file server - https://github.com/sigoden/dufs Usage: dufs [OPTIONS] [serve-path] Arguments: [serve-path] Specific path to serve [default: .] Options: -c, --config <file> Specify configuration file -b, --bind <addrs> Specify bind address or unix socket -p, --port <port> Specify port to listen on [default: 5000] --path-prefix <path> Specify a path prefix --hidden <value> Hide paths from directory listings, e.g. tmp,*.log,*.lock -a, --auth <rules> Add auth roles, e.g. user:pass@/dir1:rw,/dir2 -A, --allow-all Allow all operations --allow-upload Allow upload files/folders --allow-delete Allow delete files/folders --allow-search Allow search files/folders --allow-symlink Allow symlink to files/folders outside root directory --allow-archive Allow zip archive generation --enable-cors Enable CORS, sets `Access-Control-Allow-Origin: *` --render-index Serve index.html when requesting a directory, returns 404 if not found index.html --render-try-index Serve index.html when requesting a directory, returns directory listing if not found index.html --render-spa Serve SPA(Single Page Application) --assets <path> Set the path to the assets directory for overriding the built-in assets --log-format <format> Customize http log format --log-file <file> Specify the file to save logs to, other than stdout/stderr --compress <level> Set zip compress level [default: low] [possible values: none, low, medium, high] --completions <shell> Print shell completion script for <shell> [possible values: bash, elvish, fish, powershell, zsh] --tls-cert <path> Path to an SSL/TLS certificate to serve with HTTPS --tls-key <path> Path to the SSL/TLS certificate's private key -h, --help Print help -V, --version Print version dufs使用实例 当前目录只读模式运行 ...

六月 11, 2024 · JQX

Mapinfo提取图层中的经纬度

拿到一个乡镇点位的Mapinfo图层,打开后发现表结构没有经纬度信息,如下: 下来介绍如何为图层添加坐标字段 Tab(表)->Maintenance(维护)->Tab Structure(表结构) 如下添加两个字段,名为logitude和latitude,类型设置为Float 点击OK后会自动保存关闭图层,再次打开图层看下表内容发现两个字段已经添加,但内容为空。 下来使用CoordinateExtractor来提取坐标信息填充至新建的两个字段 Tools->Run Mapbasic Program,选择CoordinateExtractor添加至Tools菜单。 Tools->Coordinate Extractor->Extract Coordinates,打开工具,如下设置: 点击OK后即可打开修改后的图层,其中longitude和latitude字段已经填入坐标信息。

五月 29, 2024 · JQX

将blogger备份批量转换为md文件

安装blog2md apt install git npm git clone https://github.com/unixetc/blog2md.git cd blog2md npm install 使用blog2md转换blogger导出的xml文件 node index.js b bak.xml outmd 处理完成后,所有的md文件将保存在outmd文件夹下。

五月 22, 2024 · JQX