Updated 4/30/2019
Where is the settings.json
{
"python.pythonPath": "C:\\Users\\username\\Programs\\Continuum\\anaconda3\\envs\\main\\python.exe"
}
{
"terminal.integrated.shell.windows": "C:\\Windows\\System32\\cmd.exe",
"terminal.integrated.shellArgs.windows": [
"/K","C:\\Users\\username\\Programs\\Continuum\\anaconda3\\Scripts\\activate.bat C:\\Users\\username\\Programs\\Continuum\\anaconda3\\envs\\main"
]
}
{
"shellLauncher.shells.windows": [
{
"shell": "C:\\Windows\\System32\\cmd.exe",
"args": ["/K", "C:\\Users\\username\\Programs\\Continuum\\anaconda3\\Scripts\\activate.bat C:\\Users\\username\\Programs\\Continuum\\anaconda3\\envs\\main"],
"label":"Anaconda Main",
"launchName":"Anaconda Main",
},
{
"shell": "C:\\Windows\\System32\\cmd.exe",
"label":"Cmd",
"launchName":"Windows Cmd",
},
{
"shell": "C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe",
"label":"PowerShell",
"launchName":"PowerShell",
},
{
"shell": "C:\\Program Files\\Git\\bin\\bash.exe",
"label":"Git Bash",
"launchName":"Git Bash",
},
]
}
{
"shellLauncher.shells.windows": [
{
"shell": "C:\\Windows\\System32\\cmd.exe",
"args": ["/K", "C:\\Users\\username\\Programs\\Continuum\\anaconda3\\Scripts\\activate.bat C:\\Users\\username\\Programs\\Continuum\\anaconda3\\envs\\main"],
"label":"Anaconda Main",
"launchName":"Anaconda Main",
},
{
"shell": "C:\\Windows\\System32\\cmd.exe",
"label":"Cmd",
"launchName":"Windows Cmd",
},
{
"shell": "C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe",
"label":"PowerShell",
"launchName":"PowerShell",
},
{
"shell": "C:\\Program Files\\Git\\bin\\bash.exe",
"label":"Git Bash",
"launchName":"Git Bash",
},
],
"terminal.integrated.shell.windows": "C:\\Program Files\\Git\\bin\\bash.exe",
"terminal.integrated.shellArgs.windows": [
"-l"
],
}
###
PUT http://10.62.224.11:9200/shakespeare/_settings HTTP/1.1 Content-Type: application/json’
{ “index” : { “number_of_replicas” : 0 } }
###
curl -X GET “http://10.62.224.11:9200/_cluster/health?pretty”
###
curl -X PUT “http://10.62.224.11:9200/_settings” -H ‘Content-Type: application/json’ -d’ { “index” : { “number_of_replicas” : 0 } } ‘
```
I installed SQL CL, which does not work with MINGW64 terminal (git bash) very well.
I modified ~/Programs/sqlcl/bin/sql and added MINGW64* line in following section
#
# Check for Cygwin
#
cygwin=false
case `uname` in
CYGWIN*) cygwin=true;;
MINGW64*) cygwin=true;;
esac
jupyter notebook --generate-config
It will generate .jupyter\jupyter_notebook_config.py, change the parameters in the file change parameter c.NotebookApp.notebook_dir = ‘/mnt/c/Users/me/linux_home/sources/github/’
It has been a frustration that anaconda put /cygdrive in all of its PATH. I tried to write script to remove the /cygdrive but it will not work when switch env.
I end up modify /etc/fstab ( need to run as administrator), so that c is actually mounted as /cygdrive/c. (git-bash by default mount it as /c ). This will make the conda stuff work.
the only cavity is I when I run python, i need to run “winpty python”
modify
none / cygdrive binary,posix=0,noacl,user 0 0
to
none /cygdrive cygdrive binary,posix=0,noacl,user 0 0
ente 2020/03 update #
export PYTHONPATH=/c/Users/username/Programs/Continuum/anaconda3/envs/main
export PATH=$PYTHONPATH:$PYTHONPATH/Scripts:$PATH
alias sql='sql user/pass@service'
alias sqlcmd='sqlcmd -S server_name -d database'
alias mssql-cli='mssql-cli -S server_name -d database -E'
# -E is for integrated authentication
Split window/terminal with tmux Here
I have 3 branches, master, office, and home. Let’s say home is behind master:
use following commands to switch proxy
alias gitoffice='git config --global http.proxy http://10.76.225.15:80'
alias githome='git config --global --unset http.proxy'
These are the tricks I can never remember. So I write it down here
* same line non-greedy match .\{-}
* multi line non-greedy match \_.\{-}
For example if I want to match
Alter table abc
drop constrains...
...
Go
I would use:
/Alter \_.\{-}GO
pip install –trusted-host pypi.org –trusted-host files.pythonhosted.org
pip –cert az-elasticsearch-dev.ca.pem install linkchecker
conda config –set ssl_verify az-elasticsearch-dev.ca.pem