天天看到某人的帖子烦的不行,顺手写了个油猴的脚本,添加上指定人的href就可以了,只屏蔽帖子列表,帖子内容页的信息不会屏蔽。

// ==UserScript==
// @name         落伍发帖人屏蔽器
// @namespace    https://hmilyld.com/
// @version      0.1
// @description  根据发帖人屏蔽发帖人所发的帖子信息
// @author       Hmilyld
// @match        https://www.im286.net/forum-1-*.html
// @require      https://cdn.bootcdn.net/ajax/libs/jquery/1.10.0/jquery.min.js
// @grant        none
// ==/UserScript==

(function() {
    'use strict';

    //href替换为想屏蔽的人就行了,替换后直接看不到该人发送的任何帖子
    $("a[href='space-uid-****.html']").each(function(idx, dom){
        $(dom).closest("tbody").hide();
    });
})();

lnmp官方自带的有backup.sh脚本,但是该脚本只能上传ftp,不能发送邮件,稍微修改了下,然后可以自己发送到指定邮箱,省事了,定时任务需要cron配合。

安装mutt

yum install -y mutt

创建.muttrc

set envelope_from=yes
set from="backup@hmilyld.com"
set realname="hmilyld"
set use_from=yes

- 阅读剩余部分 -

更新系统

yum update

添加用户

adduser hmilyld
passwd hmilyld

安装zsh及oh-my-zsh

yum install zsh
sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

安装zsh-autosuggestions

git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions

安装nvm

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash

修改~/.zshrc配置文件

export ZSH="/home/用户名/.oh-my-zsh"
ZSH_THEME="gentoo"
plugins=(git z zsh-autosuggestions)
source $ZSH/oh-my-zsh.sh

alias ll='ls -la'
alias python='python3'

export NVM_NODEJS_ORG_MIRROR=http://npm.taobao.org/mirrors/node

export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm

刷新~/.zshrc配置

source ~/.zshrc

安装node及npm

nvm install stable

从github换到flarum,捣鼓了下,记录一些问题。

使用的docker安装的,比较省事,直接pull下来处理就行了,下面是相关配置文件

docker-compose.yml

version: "3"

services:
  flarum:
    image: registry.cn-hangzhou.aliyuncs.com/flarumchina/nginx-flarum:latest
    container_name: flarum
    ports:
      - 80:8888
      - 443:443
    env_file:
      - ./flarum.env
    volumes:
      - ./assets:/flarum/app/public/assets
      - ./extensions:/flarum/app/extensions
      - ./nginx:/etc/nginx/conf.d
      - ./cert:/etc/nginx/cert
      - ./nginx.conf:/etc/nginx/nginx.conf
    depends_on:
      - mysql
    restart: always

  mysql:
    image: mysql:5.7
    container_name: flarum-mysql
    ports:
      - 3306:3306
    environment:
      - MYSQL_ROOT_PASSWORD=root password
      - MYSQL_DATABASE=flarum
      - MYSQL_USER=flarum
      - MYSQL_PASSWORD=your password
    volumes:
      - ./db:/var/lib/mysql
    restart: always

- 阅读剩余部分 -