Git Merge Branches

git checkout better_branch
git merge --strategy=ours master # keep the content of this branch, but record a merge
git checkout master
git merge better_branch # fast-forward master up to the merge

Um die Historie besser nachvollziehen zu können:

git merge --strategy=ours --no-commit master
git commit # add information to the template merge message

Quelle: Stackoverflow

System.Net.WebException: „Die Anfrage wurde abgebrochen: Es konnte kein geschützter SSL/TLS-Kanal erstellt werden..“

Sofern die Software auf älteren Systemen als Windows 10 verwendet wird, muss aktiv C#-Code:

ServicePointManager.Expect100Continue = true;
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;

gesetzt werden, denn der default Type des Protokolls setzt das Betriebssystem – und .NET verwendet dann das default gesetzte.

 

Quelle: mycsharp.de

Zeilenenden in Windows VSCode auf Unix umstellen

"files.eol": "\n"

How to make all line endings (EOLs) in all files in Visual Studio Code, UNIX like?

How to make all line endings (EOLs) in all files in Visual Studio Code, UNIX like?

I use Windows 10 home and I usually use Visual Studio Code (VSCODE) to edit Linux Bash scripts as well as PHP and JavaScript. I don’t develop anything dedicated for Windows and I wouldn’t mind tha…

Source: stackoverflow.com/questions/48692741/how-to-make-all-line-endings-eols-in-all-files-in-visual-studio-code-unix-lik


	

[Chrome] Registrierte EventListener anzeigen

Alle registrierten EventListener anzeigen lassen

Array.from(document.querySelectorAll('*'))
  .reduce(function(pre, dom){
    var evtObj = getEventListeners(dom)
    Object.keys(evtObj).forEach(function (evt) {
      if (typeof pre[evt] === 'undefined') {
        pre[evt] = 0
      }
      pre[evt] += evtObj[evt].length
    })
    return pre
  }, {})

Nur die registrierten Klick-Listener anzeigen lassen

Array.from(document.querySelectorAll('*'))
  .reduce(function(pre, dom){
    var clks = getEventListeners(dom).click;
    pre += clks ? clks.length || 0 : 0;
    return pre
  }, 0)

Windows // Globaler Git-SSH Key

If you use „Git for Windows“
>cd c:\Program Files\Git\etc\ssh\

add to ssh_config following:

AddKeysToAgent yes
IdentityFile ~/.ssh/id_rsa
IdentityFile ~/.ssh/id_rsa_test

ps. you need ssh version >= 7.2 (date of release 2016-02-28)

WICHTIG: Über Putty-Keygen muss der Private-Key über Conversions > Export OpenSSH Key (force new file format) exportiert werden

Mac VSCode aus Finder starten

– Open Automator
– File -> New -> Service
– Change „Service Receives“ to „files or folders“ in „Finder“
– Add a „Run Shell Script“ action
– Change „Pass input“ to „as arguments“
– Paste the following in the shell script box: open -n -b „com.microsoft.VSCode“ –args „$*“
– Save it as something like „Open in Visual Studio Code“

Quelle