Shell判断字符串是否含有特定字符
场景:判断字符abcde是否含有字符abc [[ “abcde” =~ “abc” ]] && echo “this is true” || echo “this is not true” if [[ “abcde” =~ “abc” ]]; then echo “this is true” else echo “this is not true”; exit fi
场景:判断字符abcde是否含有字符abc [[ “abcde” =~ “abc” ]] && echo “this is true” || echo “this is not true” if [[ “abcde” =~ “abc” ]]; then echo “this is true” else echo “this is not true”; exit fi
apt 是 apt-get、apt-cache 和 apt-config 中最常用命令选项的集合 apt 命令 取代的命令 命令的功能 apt install apt-get install 安装软件包 apt remove apt-get remove 移除软件包 apt purge apt-get purge 移除软件包及配置文件 apt update apt-get update 刷新存储库… 阅读更多 »apt vs apt-get
方法一:找一个插件来添加页脚,header, footer and injections,增加如下代码片段: <style> a:link { color: #095484; text-decoration: none; } a:visited { color: #095484; text-decoration: none; } a:hover { text-decoration: unde… 阅读更多 »页脚添加备案号
准备 服务器,托管或者云服务器,本网站运行在阿里云域名,本域名funnymuddy.com在阿里云(万网)申请 架构 Nginx + fastcgi_cache + PHP FPM + WordPress + MySQL 步骤 搭建一个网站还是需要一些步骤的,不如自动化了吧! https://gitee.com/gitmee/wordpress-nginx 安全 TLS test https://… 阅读更多 »WordPress建站
WP不支持中文名注册,需要修改代码,很简单,只是一行代码。 wp-includes/formatting.php function sanitize_user( $username, $strict = false ) {$strict = false;
Hexo和Github关联之后,接下来就是找一个域名(这里以example.com为例)cname到yourname.github.io,需要以下操作 在域名注册商比如阿里(万网)或者namecheap,找到相应域名example.com,添加两条CNAME记录。www, yourname.github.io, 5 minutes; @,yourname.github.io, 5 minutes … 阅读更多 »Hexo + Github 搭建Blog系统 (2)
参考这个文章 https://zhuanlan.zhihu.com/p/26625249 总结一下,有以下步骤 安装hexo 安装nodejs和npm sudo apt install nodejs npm 安装启动hexo (自己起了一个vagrant vm来安装,目录在keepm/nodejs/hexo-try) sudo npm install hexo-cli -g hexo init b… 阅读更多 »Hexo + GitHub 搭建Blog系统 (1)
开通个人网站的想法多年前就有,目的是记录自己的点滴积累,但一致懒得行动。今年由于疫情长时间宅在家里,所以又有了这个想法。于是申请了阿里的云主机,还有几个域名,走起! 备案时间比较长,大概半个月的时间。昨天备案下来,今天就着手搭建网站。选用WordPress中文版。整体架构为Nginx+Cache+php7.2-fpm+WordPress+MySql! Redis可作为动态缓存,有个插件可以直接用,… 阅读更多 »个人博客网站正式启程!