windows 使用记录

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
复制代码

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

# 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
复制代码

转载于:https://juejin.im/post/5c4f0eb2e51d4551e9611cbc

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值