Skip to content

Instantly share code, notes, and snippets.

@psakievich
psakievich / vimdiff.md
Last active July 22, 2020 11:33 — forked from mattratleph/vimdiff.md
vimdiff cheat sheet

vimdiff cheat sheet

##git mergetool

In the middle file (future merged file), you can navigate between conflicts with ]c and [c.

Choose which version you want to keep with :diffget //2 or :diffget //3 (the //2 and //3 are unique identifiers for the target/master copy and the merge/branch copy file names).

:diffupdate (to remove leftover spacing issues)

:only (once you’re done reviewing all conflicts, this shows only the middle/merged file)

@psakievich
psakievich / cheat_sheet.txt
Created December 21, 2020 17:26
GDB cheat sheet
GDB commands by function - simple guide
---------------------------------------
More important commands have a (*) by them.
Startup
% gdb -help print startup help, show switches
*% gdb object normal debug
*% gdb object core core debug (must specify core file)
%% gdb object pid attach to running process
% gdb use file command to load object
@psakievich
psakievich / ssh_keys_new_mac.md
Last active April 12, 2024 22:30
The Pains of SSH Keys on a New Mac

GitHub's ssh keys are a bit of a pain on a new Mac. I've done this twice now. Making a gist so I don't forget again.

Step 1. Add GitHub as a known host

This will fail but it will add it to the ~/.ssh/known_hosts so you can see what type of key it is going to look for.

$ ssh -T git@github.com
$ cat ~/.ssh/known_hosts | grep github

Step 2. Create a new key based on the type GitHub is using