• link_to_markdown.js 页面链接转成 Markdown
    netnr 2019-09-09 90
    console.debug(Array.from(document.links).map(l => `[${l.textContent.replace(/\s+/g, ' ').trim()}](${l.href})`).join('\n'));
  • 获取农历
    netnr 2019-08-13 90
  • last-lastb-secure.sh 查看 SSH 暴力破解记录
    netnr 2019-08-13 58
    last # 登录成功的用户信息
    last | less # 最近倒序
    
    lastb # 登录失败的用户信息
    
    # /var/log/ 目录下 secure 开头的日志文件
    
    # 查看哪些IP破解你SSH密码以及次数
    cat /var/log/secure | awk '/Failed/{print $(NF-3)}' | sort | uniq -c | awk '{print $2" = "$1;}'
  • dead_link_detection.js 检测页面所有链接,找到死链(如导航页面维护清理失效的链接)
    netnr 2019-08-09 514
    class LinkChecker {
        static PROXY_SERVERS = [
            "https://cors.eu.org/",
            "https://seep.eu.org/",
            "https://api.codetabs.com/v1/proxy?quest=",
            "https://www.netnr.eu.org/api/Open/LinkStatusGet?url=",
            "https://netnr.alwaysdata.net/api/Open/LinkStatusGet?url=",
        ];
    
        static proxyIndex = 0;
  • ln-mklink ln -s 软链接(小写 L),Windows 软链接 mklink
    netnr 2019-08-06 774
    # 创建软链接,ln -s 真实源目录 软链接目录
    ln -s /package/mysqldata /var/lib/mysql
    
    # 修改软连接属主
    chown -h mysql:mysql /var/lib/mysql
    
    # 删除:rm就可以,但源文件不受影响
    # 指向:可指向文件、目录
  • git-clone-ss git clone 使用 SS socks5代理
    netnr 2019-07-29 98
    # 已经有了SS
    
    git config --global http.proxy socks5://127.0.0.1:1080
    git config --global https.proxy socks5://127.0.0.1:1080
    
    # 取消
    git config --global --unset http.proxy
    git config --global --unset https.proxy
    
    # 只对github进行代理
  • firewall-cmd-iptables centos 防火墙的启动、停止
    netnr 2019-07-25 561
    systemctl status firewalld  # 查看firewall服务状态
    systemctl start firewalld   # 启动
    service firewalld restart   # 重启
    systemctl stop firewalld    # 关闭
    systemctl disable firewalld # 开机禁用
    systemctl enable firewalld  # 开机启用
    
    firewall-cmd --zone=public --permanent ... # 指定区域、永久的命令
    
    firewall-cmd --list-all # 查看防火墙规则
  • 思维导图示例
    netnr 2019-07-20 526
  • zip-tar Linux 上常用的压缩/解压工具,介绍了 zip、tar 的使用
    netnr 2019-07-18 713
    # 【zip 打包】
    # -r 表示递归打包包含子目录的全部内容,-q 表示安静模式,-o 表示输出文件
    zip -r -q -o tmp.zip  /tmp
    # 使用 du 命令查看打包后文件的大小
    du -h tmp.zip
    
    # 【unzip 解压缩】
    # 将 tmp.zip 解压到当前目录
    unzip tmp.zip
    # 使用安静模式,将文件解压到指定目录
  • 系统管理架构图 部门、用户、角色、权限、菜单、按钮
    netnr 2019-07-16 459
  • 绘图示例
    netnr 2019-07-12 412
  • barrage.js 弹幕,斗鱼弹幕临时解决方案
    netnr 2019-06-06 91
    /*
     *  barrage 弹幕
     *  
     *  2019-06
     *  netnr
     */
    
    (function (window) {
    
        var bar = function (obj) {
  • wsl Windows Subsystem Linux(WSL)安装
    netnr 2019-05-11 56
    # 教程链接
    https://docs.microsoft.com/zh-cn/windows/wsl/install-manual
    
    # 使用开发人员模式
    设置》更新和安全》开发中选项》开发人员模式
    
    # 添加 Windows 应用程序
    # 适用于 Linux 的 Windows 子系统,或 PowerShell 执行命令安装
    Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
  • aegis centos卸载阿里云盾服务
    netnr 2019-05-09 51
    # 查看开机启动的服务名
    chkconfig --list
    
    # 一般情况下阿里云盾的服务是aegis
    # 停止服务
    service aegis stop
    
    # 删除服务
    chkconfig --del aegis
  • linux-task-manager.sh 任务管理器
    netnr 2019-04-20 53
    yum install epel-release -y && yum install htop -y # 安装 htop
    
    # help
    https://www.tecmint.com/htop-linux-process-monitoring/
    
    
    npm install gtop -g # 安装 gtop
    
    # help
    https://github.com/aksakalli/gtop
  • OfficeOnlineServer Office Online Server 调用说明
    netnr 2019-04-17 1.6K
  • ab Linux 使用 ab 压力测试工具
    netnr 2019-04-17 791
    yum install httpd-tools # 安装
    ab -V # 版本
    
    # Get 请求,10 并发 总 100 次
    ab -c 10 -n 100 https://netnr.eu.org/
    
    # Post 请求(发送当前目录下的 post.txt 文件:uid=1&pwd=1)
    ab -c 10 -n 100 -p post.txt https://netnr.eu.org/
    # Post 请求(发送当前目录下的 post.txt)
    ab -c 10 -n 100 -T 'application/json' -p post.txt https://netnr.eu.org/