command
tasklist
taskkill /f /pid <pid_num>
taskkill /f /im <app_name>
findstr
netstat -ano -p tcp
复制代码
键盘鼠标
M186
K120
复制代码
安装系统,发现磁盘问题
1. 在系统提示无法安装的那一步按住"shift+f10"呼出"cmd"命令符
2. 输入diskpart回车
3. 输入list disk回车
4. 输入select disk 0回车
5. 输入clean回车
6. 输入convert mbr回车
7. 输入create partition primary size = xxx回车
8. 输入format fs=ntfs quick回车
9. 输入exit
复制代码
wireshark
websocket
(ip.addr == x.x.x.x or ip.addr == x.x.x.x) && tcp
复制代码
technet.microsoft.com/en-us/windo…
1. Disk Management -> Create VHD -> Initialize Disk -> New Simple Volume Wizard -> Assign the drive letter V to the volume
2. Command Prompt -> DISM /Apply-Image /ImageFile:D:\install.esd /Index:1 /ApplyDir:V:\
3. Command Prompt -> CD V:\Windows\System32 -> BCDBoot V:\Windows
or
1. bcdedit /copy {currunt} /d "Ubuntu"
2. bcdedit /set {UUID} device vhd=[D:]\{FILEPATH}
3. bcdedit /set {UUID} osdevice vhd=[D:]\{FILEPATH}
复制代码
pycharm
ctrl + shift + num
ctrl + num
:set visualbell
复制代码
pycharm use docker
docker-machine create -d hyperv --hyperv-virtual-switch "Primary Virtual Switch" default
download boot2docker.iso
docker image
python
...
Setting -> Project Interpreter -> Docker (New: Docker-machine with my-docker container) + python interpreter
Setting -> Project Interpreter
Tool -> Deployment -> Connection + Mapping (Automatic upload)
复制代码
git bash disable beep
复制代码
git bash
alias docker='winpty docker.exe'
alias ipconfig='winpty ipconfig.exe'
alias ping='winpty ping.exe'
alias python='winpty python'
alias pip='winpty pip'
alias gitgo='git add . && git commit -m up && git push'
alias vi='winpty /usr/bin/vim'
alias vim='winpty /usr/bin/vim'
alias svn='winpty svn'
Options > Text
Locale: zh_CN
Character: GBK || UTF-8
Linux terminal: UTF-8 ( 65001 )
Windows CMD: gb2312 ( cmd -> chcp 936 )
复制代码
clion
cmake_minimum_required(VERSION 3.9)
project(<project> C)
set(CMAKE_C_STANDARD 99)
复制代码
phpstorm debug setting
ubuntu 16.04
phpstorm 2017.2.4 (win10)
apt-get install vim git
apt-get install php7.0-fpm
apt-get install openssh-server
apt-get install nginx
service php7.0-fpm start
service nginx start
127.0.0.1
copy page content to https://xdebug.org/wizard.php (check xdebug version)
wget http://xdebug.org/files/xdebug-2.5.4.tgz
[xdebug]
zend_extension=/usr/lib/php/20151012/xdebug.so
xdebug.remote_enable=1
xdebug.remote_host=192.168.3.167
xdebug.remote_port=9000
https://www.jetbrains.com/phpstorm/marklets/
复制代码
vbox startup
cd /d D:\VirtualBox
VBoxManage.exe startvm db --type headless
pause
iexpress (admin)
Install Program: cmd /c D:\VMStartup\VMStartup.bat
executed: D:\VMStartup\VMStartup.exe
sc create VMStartup Displayname="VMStartup" binpath="D:\VMStartup\VMStartup.exe" start=auto
nssm install VMStartup D:\VMStartup\VMStartup.exe
python vboxapisetup.py install
pip install pyvbox
pip install pywin32
from time import sleep
import virtualbox
vbox = virtualbox.VirtualBox()
session = virtualbox.Session()
vm = vbox.find_machine('db')
vm.launch_vm_process(session, 'headless', '')
while 1:
sleep(1)
python regServ.py --startup auto install
python regServ.py remove
复制代码
lua
curl -R -O http://www.lua.org/ftp/lua-5.3.5.tar.gz
tar zxf lua-5.3.5.tar.gz
cd lua-5.3.5
make mingw
cp -a src c:/lua-5.3.5
%LUA_DIR% : c:/lua-5.3.5
%LuaScript% : %LUA_DIR%/lua.exe
PATH: + C:\lua-5.3.5
git clone https://github.com/keplerproject/luarocks
cd luarocks
win32pack
cd wininst
cmd -> install /MW /P c:\luarocks /INC %LUA_DIR% /LIB %LUA_DIR% /BIN %LUA_DIR%
PATH: + C:\luarocks
复制代码
openssl
复制代码
change rdp port
注册表修改默认端口
防火墙 -> 高级设置 -> 入站规则 [新建规则] 允许新端口(TCP)
添加路由器端口映射
reboot
复制代码