Git Snippets

Show commits from another branch not contained in current branch git cherry -v otherbranch + f7d6a569bb6912aac97fce9ac92c4302863fb0d9 thecommit Cherry pick without commit git cherry-pick -n HASH Using vimdiff for diff set it via git config git config --global diff.tool vimdiff git config --global merge.tool vimdiff set it via ~/.gitconfig [diff] tool = vimdiff [merge] tool = vimdiff Using vscode as diff and mergetool You need to have the shell integration installed (code binary in PATH) ...

March 1, 2010 · 4 min · 827 words · Micha Kops

Kubernetes Snippets

Rerun existing completed Job kubectl replace deletes the old job, if there is any error, your job definition is lost, don’t forget to save it first! Replace an existing Job with itself kubectl get job JOBNAME -o yaml | kubectl replace --force -f - Sometimes there are errors importing the job template due to auto-generated labels or selectors .. a quick and dirty hack is to filter them out using jq ...

March 1, 2010 · 10 min · 1924 words · Micha Kops

Windows Snippets

Autostart Verzeichnis aufrufen Run from the command line (⊞+R) shell:startup List Processes on the Command Line tasklist | more Find by name tasklist /FI "IMAGENAME eq notepad.exe" Abbildname PID Sitzungsname Sitz.-Nr. Speichernutzung ========================= ======== ================ =========== =============== notepad.exe 23496 Console 3 14.516 K Kill Processes by PID or Name on the Command Line Kill by PID taskkill /F /PID PID_NUMBER Kill by Name taskkill /IM "notepad.exe" /F Find Process by Port used E.g. finding processes using port 9000. ...

March 1, 2010 · 1 min · 126 words · Micha Kops