Skip to content

Instantly share code, notes, and snippets.

View itorr's full-sized avatar
🤕
为什么只能钉六个项目

卜卜口 itorr

🤕
为什么只能钉六个项目
View GitHub Profile
@itorr
itorr / gypError.bash
Last active July 29, 2024 08:43
2024-07-29 16:23 gypError.bash
PS F:\git\cs2-block> npm i pcap --python_mirror=https://registry.npmmirror.com/-/binary/python/ --msbuild_path="C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Current\Bin\MSBuild.exe"
npm error code 1
npm error path F:\git\cs2-block\node_modules\pcap
npm error command failed
npm error command C:\WINDOWS\system32\cmd.exe /d /s /c node-gyp rebuild
npm error pcap_binding.cc
npm error f:\git\cs2-block\node_modules\pcap\pcap_binding.cc(2): fatal error C1083: 无法打开包括文件: “pcap/pcap.h”: No such file or directory [F:\git\cs2-block\node_modules\pcap\build\pcap_binding.vcxproj]
npm error gyp info it worked if it ends with ok
npm error gyp info using [email protected]
npm error gyp info using [email protected] | win32 | x64
@itorr
itorr / 批量加速视频.ps1
Created June 29, 2023 22:53
批量加速视频.ps1
$outputDir = "./output_fast2"
if (!(Test-Path -Path $outputDir)) {
New-Item -ItemType Directory -Path $outputDir
}
Get-ChildItem -Path $sourceDir -Filter *.mp4 | ForEach-Object {
$outputFilename = Join-Path $outputDir ("$($_.BaseName)_fasted.mp4")
ffmpeg -i $_.FullName -vf "select='not(mod(n,300))',setpts=N/(FRAME_RATE*TB)" -r 60 -an -c:v libx264 -preset ultrafast -crf 20 -pix_fmt yuv420p $outputFilename
@itorr
itorr / itorr-anime-shooting.py3
Last active July 17, 2024 00:59
根据动画分镜头自动截图
# pip install opencv-python
# pip install opencv-contrib-python
# pip install Pillow
import cv2
import os
# 文件名
name = "Hibike! Euphonium S2 01 [BD 1920x1080 HEVC-10bit OPUS ASSx2].mkv"
@itorr
itorr / white-album-2.html
Last active February 11, 2023 05:51
白色相簿2 Logo with CSS
<!DOCTYPE html>
<meta charset="utf-8">
<title>WA2</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<style>
html{
background:#e6f9ff;
}
@itorr
itorr / bezier-point-grip.js
Last active January 27, 2016 07:25
通过前后两点计算中心点三次贝塞尔平滑时的手柄位置
var
calc={};
//通过两点计算斜率
calc.slope=function(A,B){
return (B.y-A.y)/(B.x-A.x);
};
//通过斜率+单点计算截距