command
tasklist
taskkill /f /pid <pid_num>
taskkill /f /im <app_name>
findstr
netstat -ano -p tcp
键盘鼠标
# Logitech
M186
K120
安装系统,发现磁盘问题
# http://jingyan.baidu.com/article/08b6a591c82df414a8092224.html
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
# filter
websocket
(ip.addr == x.x.x.x or ip.addr == x.x.x.x) && tcp
https://technet.microsoft.com/en-us/windows/dn858566.aspx
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
# add tag
ctrl + shift + num
# jump to tag
ctrl + num
# Editor -> General -> Editor tabs
# Editor -> General \[ Change font size (Zoom) with Ctrl + Mouse Wheel \]
# File > Settings > Editor > General > Appearance > 'Use block caret'
# IdeaVim
:set visualbell
pycharm use docker
# windows 10 (开启 Hyper-V)
docker-machine create -d hyperv --hyperv-virtual-switch "Primary Virtual Switch" default
download boot2docker.iso
# open vswitch
# docker-machine start/stop default
# docker-machine regenerate-certs default
# entry the VM
#install
docker image
python
...
# pycharm start by Administrator
Setting -> Project Interpreter -> Docker (New: Docker-machine with my-docker container) + python interpreter
# container map ssh&... ports to VM;
# VM ssh public key to login container
# set remote python interpreter
Setting -> Project Interpreter
# set Deployment (Django server)
Tool -> Deployment -> Connection + Mapping (Automatic upload)
git bash disable beep
# echo "set bell-style none" >> ~/.inputrc
git bash
# ~/.bashrc
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'
# git-bash 中文问题
# https://docs.microsoft.com/en-us/windows/desktop/Intl/code-page-identifiers
Options > Text
Locale: zh_CN
Character: GBK || UTF-8
Linux terminal: UTF-8 ( 65001 )
Windows CMD: gb2312 ( cmd -> chcp 936 )
clion
# download & install mingw-get-setup.exe
# update mingw32-gcc mingw32-gcc-c++ mingw-libz mingw32-make
# install CLion and create project with default file main.c
# create CMakeLists.txt in the project
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 libterm-readline-gnu-perl
apt-get install php7.0-fpm
apt-get install openssh-server
apt-get install nginx
# config ssh
# config nginx default (/etc/nginx/sites-enabled/)
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
\# /etc/php/7.0/fpm/php.ini
\[xdebug\]
zend_extension=/usr/lib/php/20151012/xdebug.so
xdebug.remote_enable=1
xdebug.remote_host=192.168.3.167
xdebug.remote_port=9000
# toolbar
https://www.jetbrains.com/phpstorm/marklets/
#https://confluence.jetbrains.com/display/PhpStorm/Browser+Debugging+Extensions
# PHPSTORM
# Run -> Deployment -> sftp path mapping
# -> Setting-> Language ... -> PHP -> Debug
# Validate debugger configuration on the Web Server
# Listen PHP Debug Connections
vbox startup
# ------------------------------------
# batch script
cd /d D:\\VirtualBox
VBoxManage.exe startvm db --type headless
pause
# VBoxHeadless -startvm db
# ------------------------------------
# iexpress: bat -> exe
iexpress (admin)
#Extract files and run an installation command
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
# ------------------------------------
# download virtualbox sdk
python vboxapisetup.py install
pip install pyvbox
pip install pywin32
# py3 main
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)
# ------------------------------------
# 1053 ...
python regServ.py --startup auto install
python regServ.py remove
lua
# https://www.lua.org/download.html
# https://gist.github.com/moteus/6823437
# https://searchcode.com/codesearch/view/59361256/
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 # .h exe .o .c
%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
# install openssl by MinGW Installation Manager
# https://www.tbs-certificates.co.uk/FAQ/en/openssl-windows.html
change rdp port
注册表修改默认端口
防火墙 -> 高级设置 -> 入站规则 [新建规则] 允许新端口(TCP)
添加路由器端口映射
reboot