Skip to content

Instantly share code, notes, and snippets.

@kfxhjz
kfxhjz / hex_dump.c
Created April 12, 2019 16:54
memory hex dump
void HexDump(const char *buf, int len, int addr) {
int i, j, k, n;
char binstr[80];
n = 0;
for (i = 0; i < len; i++) {
if (0 == (i % 16)) {
n += sprintf(binstr+n, "%08x -", i + addr);
}
n += sprintf(binstr+n, " %02x", (unsigned char)buf[i]);
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Directory\Background\shell\msys2_shell]
@="Open MSYS2 here"
"Icon"="\"D:\\msys64\\msys2.ico\""
[HKEY_CLASSES_ROOT\Directory\Background\shell\msys2_shell\command]
@="D:\\msys64\\msys2_shell.cmd -mingw -here"
[HKEY_CLASSES_ROOT\Folder\shell\msys2_shell]