Jacky-wzj Blogs
chrome 极客插件 vimium
像极客一样用Chrome
Vimium 是一个 chrome 的扩展插件,提供基于键盘的 导航 和 控制 。
安装
####稳定版
- 通过 Chrome Extensions Gallery 搜索 ‘vimium’
####开发版
- 安装 Coffeescript
- 下载 Vimium 源代码
- 生成 Javascript
- 在 chrome 中输入 chrome://extensions
- 选择开发者模式
- 加载正在开发的扩展程序
- 选择 Vimium 目录
使用
####页面内操作
- ?——Vimium 帮助
- h——scroll left
- j——scroll down
- k——scroll up
- l——scroll right
- gg—–scroll to top of the page
- G——scroll to bottom of the page
- d——scroll down half a page
- u——scroll up half a page
- f——open a link in the current tab
- F——open a link in a new tab
- r——reload
- gs——view source
- i——enter insert mode – all commands will be ignored until you hit esc to exit
- yy——copy the current url to the clipboard
- yf——copy a link url to the clipboard
- gf——cycle forward to the next frame
####新开页面
- o——Open URL, bookmark, or history entry
- O——Open URL, bookmark, history entry in a new tab
- b——Open bookmark
- B——Open bookmark in a new tab
####查找
- n——cycle forward to the next find match
- N——cycle backward to the previous find match
####浏览历史
- H——go back in history
- L——go forward in history
####多标签操作
- J, gT go one tab left
- K, gt go one tab right
- g0—— go to the first tab
- g$—— go to the last tab
- t—— create tab
- yt—— duplicate current tab
- x—— close current tab
- X—— restore closed tab (i.e. unwind the ‘x’ command)
- T—— search through your open tabs
避免电脑休眠
公司工作电脑会被域策略强制休眠,从而导致在家无法远程连接.因此需要一个脚本,保证机器处于运行状态.
防止计算机休眠有三种方法:
- 基于Windows API
- 基于电源计划
- 模拟键盘/鼠标
基于Windows API (SetThreadExecutionState)
MSDN解释:Enables an application to inform the system that it is in use, thereby preventing the system from entering sleep or turning off the display while the application is running.
它就是用来干防止电脑休眠和锁屏的。有5个可选参数:
- ES_AWAYMODE_REQUIRED
- ES_CONTINUOUS
- ES_DISPLAY_REQUIRED
- ES_SYSTEM_REQUIRED
- ES_USER_PRESENT
要保持电脑不休眠,使用ES_CONTINUOUS | ES_SYSTEM_REQUIRED 就可以了
下面是PowerShell的实现:
1 打印机器启动时间
2 使用c#包装WinAPI,以供PowerShell调用
3 注册C#代码
4 以一定时间间隔循环调用SetThreadExecutionState
GitHub Source Code
下载
基于电源计划 (powercfg.exe)
利用powercfg.exe不停的执行设置电源计划,从而使计数清零并重新开始。
下面是Python的实现(感谢_吴鹏_同学的分享):
1 通过powercfg.exe 设置电源计划
2 以一定时间间隔循环调用
Understand Https
Convert pfx
- openssl pkcs12 -in domain.pfx -clcerts -nokeys -out domain.cer
- openssl pkcs12 -in domain.pfx -nocerts -nodes -out domain.key
- openssl pkcs12 -in domain.pfx -out domain.crt -nodes -nokeys -cacerts