Git Product home page Git Product logo

hj's Introduction

hj

wget -N --no-check-certificate https://raw.githubusercontent.com/veip007/hj/master/hj.sh && chmod +x hj.sh && bash hj.sh

测速

wget https://raw.githubusercontent.com/veip007/hj/master/speed.zip && unzip speed.zip && rm speed.zip && cd speed && chmod +x speedtest-backend && ./speedtest-backend

运行之后网页访问 IP:8989 即可测速, ssh里ctrl+c结束

Nginx守护

wget -N --no-check-certificate https://raw.githubusercontent.com/veip007/hj/master/ng.sh && chmod +x ng.sh && crontab -l > conf && echo "*/1 * * * * ./ng.sh" >> conf && crontab conf && rm -f conf 

Linux下载M3U8

先安装ffmpeg

update && aptapt install -y ffmpeg

使用方法:

ffmpeg -i https://http://example.com/index.m3u8 -c:v copy abc.mp4

自行更改连接和文件名

生成预览图

ffmpeg  -i input.mp4 -r 0.0033 -vf scale=-1:720 -vcodec png capture-%003d.png

其中input.mp4是需要生成预览图的视频

0.0033是间隔时间比率,这个数越小代表间隔时间越长,0.0033代表每5分钟左右截一张图片,如果调成0.0023大概就是7分钟一张图片

-1:720代表生成图片短边的长度,这里就是 ? x 720, ? 取决于视频的比例

capture-%003d.png代表文件名,生成的文件就以capture-001.png,capture-002.png.....为文件名,如果设置成capture-%002d.png,则文件名就是capture-01.png,capture-02.png.....

nginx子目录密码访问

1.运行下面脚本

wget -N --no-check-certificate https://raw.githubusercontent.com/veip007/hj/master/htpasswd.sh && chmod +x htpasswd.sh && ./htpasswd.sh

依次输入用户名、密码、文件名称

文件默认保存在root目录

2.把生成的文件复制到要加密的文件夹下

3.更改nginx的server配置文件

    location /zb {
index index.html index.htm index.php;#默认首页
auth_basic "Restricted";#访问权限类型
autoindex off;#显示文件列表
charset utf-8;#编码
auth_basic_user_file /www/wwwroot/www.qq.com/zb/htpasswd;#用户名单
}

其中htpasswd为生成的文件名称,location /zb 中的/zb为要加密的子目录;注意更换自己的域名

hj's People

Contributors

veip007 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

hj's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.