新老用户都可能遇到陷阱。下面我们列出频繁出现的问题,以及如何解决。 在 Freenode IRC #nginx 频道,我们经常看到这些问题。
[TOC]
最常见的是有人试图从其他指南拷贝配置片段。并非所有的指南是错误的,但绝大部分是有问题的。
function wp_iframe_handler_m163( $matches, $attr, $url, $rawattr ) { | |
$iframe = '<iframe width="430" height="200" src="http://miantiao.jd-app.com/m163player/'. esc_attr($matches[1]) . '" allowtransparency scrolling="0" frameborder="0" ></iframe>'; | |
return apply_filters( 'iframe_m163', $iframe, $matches, $attr, $url, $rawattr ); | |
} | |
wp_embed_register_handler( 'm163_iframe', '#http://music.163.com/\#/song\?id=([\d]+)(.*?)#i', 'wp_iframe_handler_m163' ); |
root = true | |
[*] | |
indent_style = space | |
indent_size = 2 | |
end_of_line = lf | |
charset = utf-8 | |
trim_trailing_whitespace = true | |
insert_final_newline = true |
/** | |
* multi offline task add for pan.baidu.com | |
* 执行代码前必须 点一下 **离线下载** 按钮 | |
**/ | |
(function () { | |
var R = require('function-widget-1:offlineDownload/util/newOfflineDialog.js'); | |
var r = R.obtain(); | |
var timer = 600; | |
var add = function (url) { | |
r.setVisible(1); |
一、备份常用操作基本命令 | |
1、备份命令mysqldump格式 | |
格式:mysqldump -h主机名 -P端口 -u用户名 -p密码 –database 数据库名 > 文件名.sql | |
2、备份MySQL数据库为带删除表的格式 | |
备份MySQL数据库为带删除表的格式,能够让该备份覆盖已有数据库而不需要手动删除原有数据库。 | |
mysqldump --add-drop-table -uusername -ppassword -database databasename > backupfile.sql |
新老用户都可能遇到陷阱。下面我们列出频繁出现的问题,以及如何解决。 在 Freenode IRC #nginx 频道,我们经常看到这些问题。
[TOC]
最常见的是有人试图从其他指南拷贝配置片段。并非所有的指南是错误的,但绝大部分是有问题的。
打开 https://github.com/Dreamacro/maxmind-geoip/releases/latest 下载最新的 Country.mmdb
虽然查看的 cpu 信息是 ARMv7 但是 clash 还是只能运行 armv5 的,
cat /proc/cpuinfo | grep ARM
Processor : ARMv7 Processor rev 0 (v7l)
打开 https://github.com/Dreamacro/clash/releases/latest 下载 clash-linux-armv5-v1.1.0.gz
,并解压该文件
In production, it is recommended to minify any JavaScript code that is included with your application. Minification can help your website load several times faster, especially as the size of your JavaScript source code grows.
Here's one way to set it up:
npm init -y
in your project folder (don't skip this step!)npm install terser
Now, to minify a file called like_button.js
, run in the terminal:
# Example nginx + git HTTP Smart mode (git-http-backend) + HTTP Authentication + HTTPS redirect | |
# jeroen@massar.ch - http://jeroen.massar.ch | |
server { | |
listen 192.0.1.1:80; | |
listen [2001:db8::1]:80; | |
# Redirect all non-HTTPS traffic to the HTTPS variant | |
return 301 https://$host$request_uri; | |
} |
I am running a WordPress multisite network with sub-directory setup. When I check my error.log file, it is full of entries like this one:
Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'Limit InternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.
The problem was, in my case, one specific rewrite rule in the .htaccess file.