https://github.com/dotnet-architecture/eShopOnWeb
https://docs.microsoft.com/en-us/dotnet/standard/modern-web-apps-azure-architecture/
| # abort merge with diverged remote branch | |
| git merge --abort | |
| # https://stackoverflow.com/questions/6591213/how-do-i-rename-a-local-git-branch | |
| # rename local branch | |
| git branch -m tutorial | |
| # https://stackoverflow.com/questions/35591887/how-to-undo-git-fetch | |
| # discard fetched changes | |
| git remote remove origin |
| # https://stackoverflow.com/questions/15773278/dquote-result-of-a-execution-a-program-in-linux-shell | |
| " |
| git log --graph --decorate --oneline | |
| git log --all --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit | |
| git config --global alias.lg "log --all --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit" |
| sudo apt install zookeeperd | |
| sudo service zookeeper start | |
| sudo service zookeeper status | |
| # https://linuxconfig.org/how-to-install-and-configure-zookeeper-in-ubuntu-18-04 | |
| # https://stackoverflow.com/questions/29016986/best-way-to-start-zookeeper-automatically-on-ubuntu-server-14-04 |
| set global local_infile=1; | |
| quit | |
| # sh | |
| sudo mysql --local-infile=1 -u root | |
| # https://dzone.com/articles/mysql-57-utf8mb4-and-the-load-data-infile | |
| # https://www.percona.com/blog/2016/07/05/mysql-5-7-utf8mb4-and-the-load-data-infile/ | |
| # https://stackoverflow.com/questions/14127529/mysql-import-data-from-csv-using-load-data-infile |
| # install mysql server | |
| sudo apt-get install mysql-server | |
| # start mysql server | |
| sudo /etc/init.d/mysql start | |
| # log into mysql server | |
| sudo mysql -u root | |
| host = 'SOME_GUID.southeastasia.azure.elastic-cloud.com' #without 'https' | |
| basicAuth = ('USERNAME', 'PASSWORD') | |
| es = elasticsearch.Elasticsearch( | |
| hosts=[{'host': host, 'port': 9243}], | |
| http_auth=basicAuth, | |
| use_ssl=True, | |
| verify_certs=True, | |
| connection_class=elasticsearch.RequestsHttpConnection | |
| ) |
| # Open a PowerShell console as Administrator | |
| Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V -All | |
| # Restart Windows | |
| # Open a cmd as administrator | |
| # Install choco | |
| @"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin" |
| az account list | |
| az account set --subscription {guid} | |