git直接push提交代码到线上生产环境
为方便开发过程中随时预览线上效果,需考虑git提交数据时直接将代码同时push到线上生产环境中。
project.git/hooks新建
post-receive#!/bin/sh
git --work-tree=/www/project --git-dir=/data/git/project.git checkout -fchown +x post-receive- 注意赋予project项目目录git写入权限
为方便开发过程中随时预览线上效果,需考虑git提交数据时直接将代码同时push到线上生产环境中。
project.git/hooks新建post-receive
#!/bin/sh
git --work-tree=/www/project --git-dir=/data/git/project.git checkout -f
chown +x post-receiveTHINKPHP5开发API接口路由容易影响后台管理系统访问,需在route.php中使用路由变量规则定义API路由Route::pattern('ver','^v\d+');
此时定义API路由Route::get(':ver/version', "api/common/get_version");
nginx安装rtmp模块参考上篇文章内容:https://www.r1989.com/linux-1097.html
nginx通过rtmp模块提供rtmp服务, ffmpeg推送一个rtmp流到nginx, 客户端通过访问nginx来收看实时视频流。HLS也是差不多的原理,只是最终客户端是通过HTTP协议来访问的,但是ffmpeg推送流仍然是rtmp的。
nginx直播推流需安装rtmp模块
/usr/local/nginx/sbin/nginx -Vgit clone https://github.com/arut/nginx-rtmp-module.git./configure xxxxx --add-module=/usr/local/src/nginx-rtmp-modulemake 切记不可使用make install否则为覆盖安装cp /usr/local/nginx/sbin/nginx /usr/local/nginx/sbin/nginx_bakcp objs/nginx /usr/local/nginx/sbin/nginx/usr/local/nginx/sbin/nginx -t/usr/local/nginx/sbin/nginx -Vnginx第三方模块:https://www.nginx.com/resources/wiki/modules/index.html
$ 匹配输入字符串的结尾位置。如果设置了 RegExp 对象的 Multiline 属性,则 $ 也匹配 ‘\n' 或 ‘\r'。要匹配 $ 字符本身,请使用 \$
( ) 标记一个子表达式的开始和结束位置。子表达式可以获取供以后使用。要匹配这些字符,请使用 和
* 匹配前面的子表达式零次或多次。要匹配 * 字符,请使用 \*
+ 匹配前面的子表达式一次或多次。要匹配 + 字符,请使用 \+
. 匹配除换行符 \n之外的任何单字符。要匹配 .,请使用 \
[ ] 标记一个中括号表达式的开始。要匹配 [,请使用 \[
? 匹配前面的子表达式零次或一次,或指明一个非贪婪限定符。要匹配 ? 字符,请使用 \?
\ 将下一个字符标记为或特殊字符、或原义字符、或向后引用、或八进制转义符。例如, ‘n' 匹配字符 ‘n'。'\n' 匹配换行符。序列 ‘\\' 匹配 “\”,而 ‘\(' 则匹配 “(”
^ 匹配输入字符串的开始位置,除非在方括号表达式中使用,此时它表示不接受该字符集合。要匹配 ^ 字符本身,请使用 \^
{ } 标记限定符表达式的开始。要匹配 {,请使用 \{
| 指明两项之间的一个选择。要匹配 |,请使用 \| 记录工作中常用的几个脚本命令,方便后期查阅。注:以下大部分脚本基于多个同一系统不同文件目录场景。
<!DOCTYPE HTML>
<html lang="en-US">
<head>
<meta charset="UTF-8">
<title>css3二维码扫描动画效果</title>
<style type="text/css">
.scan-box{
width: 200px;
height: 200px;
background: url('http://project.icphp.com/assets/images/icecry613.jpg');
}
.scan{
animation-name: saoma;
-webkit-animation-name: saoma;
animation-duration: 5s;
-webkit-animation-duration: 5s;
animation-timing-function: linear;
-webkit-animation-timing-function: linear;
-webkit-animation-iteration-count: infinite;
animation-iteration-count: infinite;
width: 200px;
height: 200px;
position: absolute;
top: -225px;
background: rgba(26, 132, 190, 0.3);
border-bottom: 3px solid #4AB86A;
}
@keyframes saoma{0%{top:-205px;}100%{top:0;}}
@-webkit-keyframes saoma{0%{top:-205px;}100%{top:0;}}
@-moz-keyframes saoma{0%{top:-205px;}100%{top:0;}}
</style>
</head>
<body>
<div class="scan-box">
<div class="scan"></div>
</div>
</body>
</html>