工具集
- 截屏:Snipaste
- 取色:ScreenToolKit
- win桌面:Dynamic theme
- 数据库:Navicat
- 鼠标连点器:鼠大侠
- md文档:typora 0.9.96
- git工具:TortoiseGit
- PDF: 极速PDF阅读器
- vscode:1.50版本
- Beyond Compare: 文本比对工具
- 向日葵: 远程工具
- 抓包:Fiddler (http://www.pc6.com/softview/SoftView_51888.html)
- SVG: 预览 SVG_Explorer_Extension
- 远程工具:rustdesk https://rustdesk.com/zh/
- 设计稿转标注图: pxcook
- github加速: 应用商店watt toolkit, fastgithub
- 鼠标手势:Strokesplus
vscode插件:
- favorites
- Auto Rename Tag
- Beautify
- Bracket Pair Colorizer
- Code Runner
- Code Spell Checker
- ESLint
- Path Intellisense
- Prettier - Code formatter
- Tabnine
- live server
- GitLens
- CSScomb
- Turbo Console Log
vscode配置
//配置
{
"editor.tabSize": 2,
"explorer.confirmDelete": false,
"files.autoSave": "onWindowChange",
"update.mode": "manual",
// "terminal.integrated.tabs.enabled": false,
"editor.guides.bracketPairs": "active",
"editor.bracketPairColorization.enabled": true,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.fontSize": 16,
"settingsSync.ignoredSettings": ["editor.fontSize"],
"security.workspace.trust.untrustedFiles": "open",
// "editor.snippetSuggestions": "top", // 智能排序
"workbench.layoutControl.enabled": false, //隐藏布局栏
"code-runner.clearPreviousOutput": true,
"cSpell.showCommandsInEditorContextMenu": false,
"turboConsoleLog.includeFileNameAndLineNum": false,
"turboConsoleLog.insertEnclosingClass": false,
"turboConsoleLog.insertEnclosingFunction": false,
"remote.SSH.remotePlatform": {
"root": "linux"
}
}
autohotkey配置
// 将键绑定放在此文件中以覆盖默认值auto[]
[
{
"key": "ctrl+k ctrl+k",
"command": "workbench.action.closeOtherEditors"
},
{
"key": "ctrl+shift+c",
"command": "-workbench.action.terminal.openNativeConsole",
"when": "!terminalFocus"
},
{
"key": "ctrl+f",
"command": "list.find",
"when": "listFocus && listSupportsFind && explorerResourceIsRoot"
},
{
"key": "ctrl+f",
"command": "-list.find",
"when": "listFocus && listSupportsFind"
}
]
vs快捷键
ctrl + K ctrl + Q 上一次编辑
ctrl + shift + E 管理器中显示文件
alt + left/right 上一个位置
Ctrl+Shift+\ 代码块头/尾光标跳转
Shift+Alt+I 选中代码块后插入光标
Ctrl+Alt+left/right
shift+alt+右 区块选择
ctrl+shift+t 重新打开关闭的文件
alt + enter 选中匹配项
合并行(命令行)
谷歌浏览器插件:
- FeHelper(前端助手)
- iGG谷歌访问助手
- Dark Reader
- http://new.91jingtanhao.cyou/
- https://xn--4gq62f52gdss.com/#/knowledge
- https://www.mojie.pw/#/plan
- https://www.v2ny.top/#/login
autohotkey相关功能:short.ahk文件
#MenuMaskKey vkE8 ; 将掩码键改成未分配的按键, 如 vkE8 等.
#IfWinNotActive, ahk_exe Code.exe
$!WheelUp::
Send {WheelUp 10}
return
$!WheelDown::
Send {WheelDown 10}
return
#IfWinNotActive
; 将当前窗口置顶 shift+空格。第二次按会取消置顶。
+Space:: Winset, Topmost, , A
Return
; chrome快捷翻译
#IfWinActive ahk_exe chrome.exe
F4::
Send {AppsKey}
sleep, 20
Send {T}
return
; F2::send, ^{PGUP}
; F3::send, ^{PGDN}
#IfWinActive
; 有道词典中将驼峰转成带空格
#IfWinActive ahk_exe YoudaoDict.exe
F4::
ClipSaved := ClipboardAll
Clipboard := ""
send ^c
ClipWait
Select_Text := Clipboard
Clipboard := ClipSaved
ClipSaved := ""
; MsgBox , %Select Text%
Select_Text := RegExReplace(Select_Text, "[_-]", " ")
Select_Text := RegExReplace(Select_Text, "([a-z])([A-Z])", "$1 $2")
Send , %Select_Text%
Send , {Enter}
return
#IfWinActive
; edge快捷翻译
#IfWinActive ahk_exe msedge.exe
global isTrans
isTrans = 0
F4::
if(isTrans < 1){
Send {AppsKey}
sleep, 20
Send {T}
isTrans = 2
return
}
if(isTrans > 1){
CoordMode, Mouse, Screen
MouseGetPos, xpos, ypos
WinGetPos,x,y,w,h
MouseClick, Left, x + w - 200, y + 60
MouseClick, Left, x + w - 230, y + 250
MouseMove, xpos, ypos
isTrans = 0
return
}
#IfWinActive
; 使用Snipaste和node及百度ocr识别图片上的文字
RemoveToolTip:
ToolTip
return
^F4::
; PROGRA~1是Program Files简写,可在cmd中通过 dir /x命令获取
C_basexeTmp:= "node C:/PROGRA~1/img2text/index.js"
RunWait, %C_basexeTmp%, ,Hide
ToolTip, success
SetTimer, RemoveToolTip, -1000
return
CapsLock::Delete
#IfWinActive ahk_exe Code.exe
;CapsLock::^+k
;CapsLock::Delete
;LWin::^Enter
#IfWinActive
return
#IfWinActive ahk_exe Xshell.exe
F1::^Ins
F4::+Ins
#IfWinActive
// autoHotKeyl加载的js脚本
const fs = require("fs");
const path = require("path");
const clipboard = require("clipboardy");
const AipOcrClient = require("baidu-aip-sdk").ocr;
// Snipaste所有目录
const dir = "D:/Users/80320952/Desktop";
const files = fs.readdirSync(dir);
let file = files.find((item) => /^Snipaste.+png$/.test(item));
if (!file) return;
file = path.join(dir, file);
const bitmap = fs.readFileSync(file);
const base64 = Buffer.from(bitmap, "binary").toString("base64"); // base64编码
if (!base64) return;
const APP_ID = "25399111";
const API_KEY = "OYuCOAuBML4y5gGkrndVIQfw";
const SECRET_KEY = "MTmr7D0hHWGKPGXK3jQfsz9rWvB8T46Y";
// 新建一个对象,建议只保存一个对象调用服务接口
const client = new AipOcrClient(APP_ID, API_KEY, SECRET_KEY);
client
.generalBasic(base64)
.then((res) => {
let str = "";
const { words_result } = res;
words_result.forEach((item) => {
str += item.words + "\n";
});
clipboard.writeSync(str);
fs.unlinkSync(file);
})
.catch(function (err) {
clipboard.writeSync(err);
});
//对应的package.json
{
"name": "img2text",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"baidu-aip-sdk": "^4.16.8",
"clipboardy": "^2.3.0"
}
}
Whistle.bat
将 <-loopback> 添加到非代理列表中
@echo off
cmd /c "w2 start" & cmd /c "w2 proxy" & start http://127.0.0.1:8899
pause
w2 stop & w2 proxy off
自动切换node版本
echo $profile获取powserShell配置地址,新增Microsoft.PowerShell_profile.ps1文件,内容:
$nodePath = (Get-Command node).Source
$nodeVersion = & $nodePath -v
if ((Get-Location).Path -like "D:\001-project*") {
if($nodeVersion -ne "v14.5.0"){
nvm use 14.5.0
}
} else {
if($nodeVersion -ne "v18.16.0"){
nvm use 18.16.0
}
}
# http-server命令简写成hs
function hs() { http-server $args --cors}