把 package.json
中 node-sass
的版本号改为 "npm:sass"
或者 "npm:sass@x.y.z"
node-sass编译不过怎么办? - 方应杭的回答 - 知乎 https://www.zhihu.com/question/54937889/answer/2297706174
把 package.json
中 node-sass
的版本号改为 "npm:sass"
或者 "npm:sass@x.y.z"
node-sass编译不过怎么办? - 方应杭的回答 - 知乎 https://www.zhihu.com/question/54937889/answer/2297706174
将 webm 格式转换成 mp4 格式命令:
# 默认使用的是最高质量的转换设置
ffmpeg -i input.webm output.mp4
# 如果你想要更小的文件大小,可以通过添加比特率参数来降低质量, -b:v 是视频比特率,-b:a 是音频比特率
ffmpeg -i input.webm -b:v 1M -b:a 192k output.mp4
如果上述命令返回以下错误:
[libx264 @ 0x558605199840] height not divisible by 2 (1364x1015)
Error initializing output stream 0:0 -- Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
是由于视频的宽度或高度不能被2整除。H.264 编码(在 MP4 文件中常用)需要视频的宽度和高度都能被2整除。为了修复这个错误,你可以在FFmpeg命令中加入-vf "pad=ceil(iw/2)2:ceil(ih/2)2"来强制视频的宽度和高度都是偶数。 这个设置将自动将宽度和高度调整到最接近的偶数。命令如下:
ffmpeg -i input.webm -vf "pad=ceil(iw/2)*2:ceil(ih/2)*2" output.mp4
每个平台的下载地址格式:
在 Chrome 浏览器中使用以下代码:
document.body.addEventListener("touchmove", (e) => {
console.log(e);
})
会在控制台看到一个警告信息:
[Violation] Added non-passive event listener to a scroll-blocking 'touchmove' event. Consider marking event handler as 'passive' to make the page more responsive. See https://www.chromestatus.com/feature/5745543795965952
/Users/{username}/Library/Containers/com.tencent.xinWeChat/Data/Library/Application Support/com.tencent.xinWeChat/2.0b4.0.9/Backup
钉钉官方提供的Linux版本下载地址, 下载下来的钉钉不是最新的.
使用钉钉的检测到有更新, 点击下载又没反应:
ref serverfault
Short: use the save CLI command.
rsync
默认使用 22 端口号, 可以通过指定参数 -e "ssh --port"
修改默认端口号.
Gradle 默认使用 ~/.gradle
目录存放资源, 通过修改环境变量 GRADLE_USER_HOME
可以修改默认目录:
export GRADLE_USER_HOME="/dta/programs/gradle"
创建文件 $GRADLE_USER_HOME/init.gradle
, 内容如下:
allprojects{
repositories {
def ALIYUN_REPOSITORY_URL = 'https://maven.aliyun.com/repository/public'
def ALIYUN_JCENTER_URL = 'https://maven.aliyun.com/repository/public'
def ALIYUN_GOOGLE_URL = 'https://maven.aliyun.com/repository/google'
def ALIYUN_GRADLE_PLUGIN_URL = 'https://maven.aliyun.com/repository/gradle-plugin'
all { ArtifactRepository repo ->
if(repo instanceof MavenArtifactRepository){
def url = repo.url.toString()
if (url.startsWith('https://repo1.maven.org/maven2/')) {
project.logger.lifecycle "Repository ${repo.url} replaced by $ALIYUN_REPOSITORY_URL."
remove repo
}
if (url.startsWith('https://jcenter.bintray.com/')) {
project.logger.lifecycle "Repository ${repo.url} replaced by $ALIYUN_JCENTER_URL."
remove repo
}
if (url.startsWith('https://dl.google.com/dl/android/maven2/')) {
project.logger.lifecycle "Repository ${repo.url} replaced by $ALIYUN_GOOGLE_URL."
remove repo
}
if (url.startsWith('https://plugins.gradle.org/m2/')) {
project.logger.lifecycle "Repository ${repo.url} replaced by $ALIYUN_GRADLE_PLUGIN_URL."
remove repo
}
}
}
maven { url ALIYUN_REPOSITORY_URL }
maven { url ALIYUN_JCENTER_URL }
maven { url ALIYUN_GOOGLE_URL }
maven { url ALIYUN_GRADLE_PLUGIN_URL }
}
}
原文 Nginx location directive examples
Nginx server 块的 location 指令用来nginx如何根据URL寻找资源.