hexo-tag-aplayer音乐插件使用
hexo-tag-aplayer安装1npm install --save hexo-tag-aplayer
依赖
APlayer.js > 1.8.0
Meting.js > 1.1.1
使用1{% aplayer title author url [picture_url, narrow, autoplay, width:xxx, lrc:xxx] %}
标签参数
title : 曲目标题
author: 曲目作者
url: 音乐文件 URL 地址
picture_url: (可选) 音乐对应的图片地址
narrow: (可选)播放器袖珍风格
autoplay: (可选) 自动播放,移动端浏览器暂时不支持此功能
width:xxx: (可选) 播放器宽度 (默认: 100%)
lrc:xxx: (可选)歌词文件 URL 地址1{% aplayer "Caffeine" "Jeff Williams" "caffeine.mp3" "picture.jpg" ...
hexo-douban 插件使用与问题
hexo-douban一个在 Hexo 页面中嵌入豆瓣个人主页的小插件.
安装1$ npm install hexo-douban --save
配置将下面的配置写入站点的配置文件 _config.yml 里(不是主题的配置文件).
12345678910111213douban: user: mythsman builtin: false book: title: 'This is my book title' quote: 'This is my book quote' movie: title: 'This is my movie title' quote: 'This is my movie quote' game: title: 'This is my game title' quote: 'This is my game quote' timeout: 10000
user: 你的豆瓣ID.打开豆瓣,登入账 ...
hexo-butterfly添加日历插件
添加日历安装 hexo-generator-calendar 插件1cnpm install --save git://github.com/howiefh/hexo-generator-calendar.git
下载 calendar.js 和 languages.js 文件,保存到 themes/Butterfly/source/js/ 目录
calendar.js 下载地址
languages.js 下载地址
编辑 calendar.js 文件,在文件最后}(jQuery)); 之前添加:
123$(document).ready(function () { $('#calendar').aCalendar('zh-CN');//'zh-CN'请根据自己博客的语言选择});
具体位置参考下图:编辑 butterfly.yml 文件, 在 inject->bottom 下面添加如下内容
12- <script src ...
hexo-butterfly美化 (持续更新)
樱花飘落背景12cd theme/Butterfly/source/jswget https://yremp.live/wp-content/uploads/resource/js/sakura.js
把下载好的Js文件放在theme/Butterfly/source/js文件夹下/Butterfly/layout/includes文件夹下找到head.pug文件,在最后引入
12if theme.sakura.enable script(src="/js/sakura.js")
在主题的主配置文件加入Butterfly/_config.yml
123# 页面樱花飘落动效sakura: enable: true
浏览器标题恶搞在theme/Butterfly/source/js文件夹下添加crash_cheat.js文件填入以下内容记得要修改你喜欢的标题
12345678910111213141516var OriginTitle & ...
gitlab配置域名并https访问
Gitlab默认Nginx80端口如果机器未占有80端口,可以直接替换成域名,解析后就可以直接访问。
12345grep "^external_url" /etc/gitlab/gitlab.rb #查看当前绑定的域名或者IPvim /etc/gitlab/gitlab.rb #打开配置文件# external_url 'http://192.168.174.131' #替换 #修改成域名访问external_url 'http://gitlab.inewmaker.com' gitlab-ctl reconfigure #重新跑一下配置
如果机器80端口以占有,需要修改gitlab端口。
1234grep "'listen_port" /etc/gitlab/gitlab.rb #查看默认端口vim /etc/gitlab/gi ...
Gitlab 403 forbidden
搭建的Gitlab。但今天打开页面的时候显示的是空白页面,上面还有一次文本Forbidden。
原因:Gitlab使用rack_attack做了并发访问的限制。
解决方案:将Gitlab的IP设置为白名单即可。步骤如下: * 打开/etc/gitlab/gitlab.rb文件。 * 查找gitlab_rails[‘rack_attack_git_basic_auth‘]关键词。 * 取消注释 * 修改ip_whitelist白名单属性,加入Gitlab部署的IP地址。 1234567gitlab_rails['rack_attack_git_basic_auth'] = { 'enabled' => true, 'ip_whitelist' => ["127.0.0.1","Gitlab部署的IP地址"], 'maxretry' => 300, ...
nginx expires配置详解
expires起到控制页面缓存的作用,合理的配置expires可以减少很多服务器的请求
要配置expires,可以在http段中或者server段中或者location段中加入
1234location ~ \.(gif|jpg|jpeg|png|bmp|ico)$ { root /var/www/img/; expires 30d; }
控制图片等过期时间为30天,当然这个时间可以设置的更长。具体视情况而定
比如
1234location ~ \.(wma|wmv|asf|mp3|mmf|zip|rar|swf|flv)$ { root /var/www/upload/; expires max; }
expires 指令可以控制 HTTP 应答中的“ Expires ”和“ Cache-Control ”的头标(起到控制页面缓存的作用)
语法:e ...
nginx之proxy_pass指令完全拆解
一、 功能12Nginx 的ngx_stream_proxy_module和ngx_http_proxy_module两个模块中,都有 proxy_pass 指令。其主要功能是为后端做代理,协议转发,请求转发等。
二、 用法和区别
官网介绍
ngx_stream_proxy_module 的 proxy_pass1234语法:proxy_pass address;默认值:—场景:server 段说明:设置代理服务器的地址。代理地址可以是域名或者IP加端口,也可以是一个UNIX的socket路径
ngx_http_proxy_module 的 proxy_pass1234语法:proxy_pass URL;默认值:—场景:location 段,location中的if段,limit_except段说明:设置后端代理服务器的地址和协议,还可以附加可选的URI映射。协议可以是 http 或者 https。地址可以是域名或者IP,可以附加指定端口,也可以是UNIX的socket路径,路径要放在unix: 和 : 之间
2. 区别从上面的各自说明可以看出两个 proxy_pass 指令都是做 ...
记一次Centos7.5升级OpenSSH8.0p1
服务器版本:12# cat /etc/redhat-releaseCentOS Linux release 7.5.1804 (Core)
升级前ssh版本:12# ssh -VOpenSSH_7.4p1, OpenSSL 1.0.2k-fips 26 Jan 2017
升级后ssh版本:12# ssh -VOpenSSH_8.0p1, OpenSSL 1.0.2k-fips 26 Jan 2017
为防止升级失败无法远程连接,安装telnet:1234# yum install -y telnet-server# yum install -y xinetd# systemctl start telnet.socket# systemctl start xinetd
允许root登录:123# echo 'pts/0' >>/etc/securetty# echo 'pts/1' >>/etc/securetty# systemctl resta ...
利用docker实现mysql主从同步读写分离,附赠docker搭建mycat读写分离
下载mysql镜像。
1docker pull mysql5.7
12345ps:如果下载太慢,请添加腾讯源,依次执行echo "OPTIONS='--registry-mirror=https://mirror.ccs.tencentyun.com'" >> /etc/sysconfig/dockersystemctl daemon-reloadservice docker restart或者直接去阿里仓库下https://dev.aliyun.com/search.html把上面的--registry-mirror=https://mirror.ccs.tencentyun.com换成你的专属源就可以
下载完输入
123docker imagesREPOSITORY TAG IMAGE ID CREATED ...