Posts

Showing posts from August, 2018

Add SSL on IIS Self-Certification

Open PowerShell with Administrator right, change subject and DnsName you need and run # setup certificate properties including the commonName (DNSName) property for Chrome 58+ $certificate = New-SelfSignedCertificate `     -Subject abc.com `     -DnsName abc.com `     -KeyAlgorithm RSA `     -KeyLength 2048 `     -NotBefore (Get-Date) `     -NotAfter (Get-Date).AddYears(2) `     -CertStoreLocation "cert:CurrentUser\My" `     -FriendlyName "Localhost Certificate for .NET Core" `     -HashAlgorithm SHA256 `     -KeyUsage DigitalSignature, KeyEncipherment, DataEncipherment `     -TextExtension @("2.5.29.37={text}1.3.6.1.5.5.7.3.1") $certificatePath = 'Cert:\CurrentUser\My\' + ($certificate.ThumbPrint)  # create temporary certificate path $tmpPath = "C:\tmp" If(!(test-path $tmpPath)) { New-Item -ItemType Directory -Force -Path $tmpPath } # set certificat...

Npm update window lastest version

Open Power shell with Administrator permission: Set - ExecutionPolicy Unrestricted - Scope CurrentUser - Force npm install - g npm - windows - upgrade npm - windows - upgrade

Git – Resolve Merge Conflicts

Git – Resolve Merge Conflicts Many time, when we do git push/pull or git merge, we end up with conflicts. In most cases, solution to merge-conflict is as simple as discarding local changes or remote/other branch changes. Following is useful in those cases… Resolving merge conflicts Find files with merge conflict Change working directory to project folder. cd project-folder Search for all conflicting files. grep -lr '<<<<<<<' . Above will list all files which has marker special marker  <<<<<<<  in them. Resolve easy/obvious conflicts At this point you may review each files. If solution is to accept local/our version, run: git checkout --ours PATH/FILE If solution is to accept remote/other-branch version, run: git checkout --theirs PATH/FILE If you have multiple files and you want to accept local/our version, run: grep -lr '<<<<<<<' . | xargs git checkout --ours If you have mul...