分类 默认分类 下的文章

转载,仅作笔记之用,原文地址:https://segmentfault.com/a/1190000039168072

文中提到一个工具

TimelineLite/TimelineMax 工具
如果单纯通过id、className 来使用 CSS 或JavaScript 自行处理动画,难度还是颇高,更重要的是,要耗费大量的时间

所以我们得借用工具,Timeline(Lite|Max)跟TweenMax是知名的GreenSock Animation Platform(简称GSAP)推出的可创建时间轴(timeline)作为动画或其他时间轴的容器,这使得整个动画控制和精确管理时间变得简单。

GSAP甚至为我们提供了Ease Visualizer来展示每种Ease function的效果

MaxScale 出手于 MariaDB 开源社区,品质有保障,以下配置摘自6.4.0版本,此版本与网上搜索得到的文章中的配置2.X版本,有很大的区别,且我没有找到可以在重启前进行配置检查的方法,重启不成功则服务就停了,尬

使用maxscale前先搭建好数据库主从复制服务,数据库同步复制正常。
配置生成工具https://sc.toolnb.com/tools/mysqlslave.html
主从复制错误修复工具:https://github.com/hcymysql/pt-slave-repair

如果在使用读写分离时,主库也想参与读查询,需要使用 master_accept_reads=true (允许使用主服务器进行读取,默认是false)

读写分离模块的文档参考:https://mariadb.com/kb/en/mariadb-maxscale-6-readwritesplit

# MaxScale documentation:
# https://mariadb.com/kb/en/mariadb-maxscale-6/

# Global parameters
#
# Complete list of configuration options:
# https://mariadb.com/kb/en/mariadb-maxscale-6-mariadb-maxscale-configuration-guide/

[maxscale]
threads=auto

# Server definitions
#
# Set the address of the server to the network
# address of a MariaDB server.
#

[server1]
type=server
address=172.19.0.10
port=3306
protocol=MariaDBBackend

[server2]
type=server
address=172.19.0.14
port=3306
protocol=MariaDBBackend

[server3]
type=server
address=172.19.0.15
port=3306
protocol=MariaDBBackend

# Monitor for the servers
#
# This will keep MaxScale aware of the state of the servers.
# MariaDB Monitor documentation:
# https://mariadb.com/kb/en/maxscale-6-monitors/

[MariaDB-Monitor]
type=monitor
module=mariadbmon
servers=server1,server2,server3
#servers=server1
user=scalemon
password=rseEk2zHc2nFTEz7
monitor_interval=2000


# Service definitions
#
# Service Definition for a read-only service and
# a read/write splitting service.
#

# ReadConnRoute documentation:
# https://mariadb.com/kb/en/mariadb-maxscale-6-readconnroute/

#[Read-Only-Service]
#type=service
#router=readconnroute
#servers=server1
#user=maxscale
#password=maxscale
#router_options=slave

# ReadWriteSplit documentation:
# https://mariadb.com/kb/en/mariadb-maxscale-6-readwritesplit/

[Read-Write-Service]
type=service
router=readwritesplit
servers=server1,server2,server3
user=teaidata
password=rseEk2zHc2nFTEz7
#允许使用主服务器进行读取
master_accept_reads=true

# Listener definitions for the services
#
# These listeners represent the ports the
# services will listen on.
#

#[Read-Only-Listener]
#type=listener
#service=Read-Only-Service
#protocol=MariaDBClient
#port=4008

[Read-Write-Listener]
type=listener
service=Read-Write-Service
protocol=MariaDBClient
port=4006
address=0.0.0.0

官方网址:https://lnmp.org

LNMP一键安装包是一个用Linux Shell编写的可以为CentOS/RHEL/Fedora/Debian/Ubuntu/Raspbian/Deepin/Alibaba/Amazon/Mint/Oracle/Rocky/Alma/Kali/UOS/银河麒麟/openEuler/Anolis OS Linux VPS或独立主机安装LNMP(Nginx/MySQL/PHP)、LNMPA(Nginx/MySQL/PHP/Apache)、LAMP(Apache/MySQL/PHP)生产环境的Shell程序。
安装包集成了一些维护工具,比如切分nginx日志文件的脚本等,本文主要是作者收藏之用

LNMP一键安装包 V1.9正式版
主要增加了对rocky linux 、alma linux、CentOS Stream 9及国产Linux(UOS统信、银河麒麟、华为openEuler、龙蜥Anolis OS)的支持;增加了exif、fileinfo、ldap、bz2、sodium、imap和swoole PHP模块选项,安装前可通过修改lnmp.conf中的对应选项的值为y开启或安装完成后./addons.sh 进行单独安装。增加了MySQL 5.7、8.0 二进制安装选项;增加了目前最新版的PHP 8.1支持及PHP扩展组件对8.1的支持;lnmp.conf增加了nginx模块ngx_fancyindex安装选项;lnmp管理脚本增加301选项及IPv6开启选项,泛域名SSL证书增加ZeroSSL免费SSL选项及一些安装代码优化。

安装教程:https://lnmp.org/install.html
问题反馈及使用交流论坛:https://bbs.vpser.net/forum-25-1.html
打赏捐赠:https://lnmp.org/donation.html

V1.9正式版更新记录

增加rocky linux 和alma linux支持;
增加PHP 8.1支持;
增加PHP模块exif、fileinfo、ldap、bz2、sodium、imap、swoole和SourceGuardian Loader的支持安装,安装lnmp前lnmp.conf 中开启后安装lnmp或 ./addons.sh 安装以上模块;
增加ngx_fancyindex模块,lnmp.conf中开启后,安装lnmp或升级nginx;
增加nginx模块--with-stream_ssl_preread_module,方便使用stream ssl相关配置;
增加UOS统信桌面家庭版、桌面专业版、服务器版支持;
增加银河麒麟服务器操作系统和桌面系统支持;
增加华为openEuler支持;
增加阿里巴巴龙蜥Anolis OS支持;
增加CentOS Stream 9支持;
增加Alma Linux 9支持;
增加MySQL 5.7、8.0 二进制安装和升级方式;
增加PHP 7.4+ webp支持;
lnmp管理脚本增加HTTP 301跳转HTTPS的选项;
lnmp管理脚本增加是否启用IPv6选项;
移除mariadb 10.1, 10.2增加mariadb 10.5, 10.6;
泛域名SSL增加了ZeroSSL支持;
优化AlibabaCloud支持;
优化部分SSL添加代码;
优化FTP用户添加部分代码;
优化离线安装;
优化部分EOL Linux发行版的安装;
优化OpenSSL支持;
优化RHEL 9系下uw-imap支持情况;
调整MariaDB升级下载地址;
更新诸多软件版本;
其他一些功能优化及调整......

protected/config/main.php

...
    'components' => array(

        'log' => array(
            'class' => 'CLogRouter',
            'routes' => array(
                array(
                    'class' => 'CFileLogRoute',
                    'levels' => 'error, warning',
                ),
                array( // configuration for the toolbar
                    'class'=>'CFileLogRoute',
                    'levels' => 'trace',
                    'categories' => 'system.db.*',          #只是显示关于数据库信息
                    'logFile'=>'db.log',
                ),
            ),
        ),
),
...

方法已失效,仅作笔记

获取用户主页数据,更换 sec_uid 参数即可,sec_uid PC版用户主页链接中也有
https://www.douyin.com/user/MS4wLjABAAAAM_k4ZhuDZ1k-nT1EXml5moYfsAYsC5U2xpdTDmgO8Io

https://www.iesdouyin.com/web/api/v2/aweme/post/?sec_uid=MS4wLjABAAAAFTNkHANuPtZKteVQsBaMwaIHoSMh3nxqJDOXEDHUnlg&count=21&max_cursor=0&aid=1128&_signature=fJp6thAXIkOb7YKwZF36KXyaeq&dytk=fd2ba6076e7bb73e31504e51bc4baf08

获取视频数据,只需要替换 item_ids 参数即可,item_ids 是视频ID,分享链接中可获得

https://www.iesdouyin.com/web/api/v2/aweme/iteminfo/?item_ids=7108929990414044447

拿到水印视频地址后,把playwm换成play即为无水印地址

以视频https://v.douyin.com/JTBpb4L/为例
1.直接访问获得原始链接https://www.iesdouyin.com/share/video/6925270560700108032/?region=CN&mid=……(url中无关内容已省略)
2.取出videoID 6925270560700108032
3.拼接地址 https://www.iesdouyin.com/web/api/v2/aweme/iteminfo/?item_ids=6925270560700108032 访问后得到json
4.json中'item_list''video''url_list'为有水印地址 https://aweme.snssdk.com/aweme/v1/playwm/?video_id=v0d00f7b0000c0do1njj3ie1jhkhicfg&ratio=720p&line=0
5.将有水印地址中的playwm替换为play 即https://aweme.snssdk.com/aweme/v1/play/?video_id=v0d00f7b0000c0do1njj3ie1jhkhicfg&ratio=720p&line=0