$ curl -X PUT http://localhost:5984/koi
{"ok":true}
$ curl -X POST http://localhost:5984/koi -d '{"name":"alice","age":25}' -H'Content-Type:application/json'
#if _WIN32_WINNT < 0x0500 | |
# error "should be NT" | |
#endif | |
#include <windows.h> | |
#include <tlhelp32.h> | |
#include <winternl.h> | |
#include <stdio.h> | |
DWORD getppid() | |
{ |
# List all [sections] of a .INI file | |
sed -n 's/^[ \t]*\[\(.*\)\].*/\1/p' | |
# Read KEY from [SECTION] | |
sed -n '/^[ \t]*\[SECTION\]/,/\[/s/^[ \t]*KEY[ \t]*=[ \t]*//p' | |
# Read all values from SECTION in a clean KEY=VALUE form |
The method described in this gist has been deprecated/superceeded by kiler129/early-vfio-pci-isolate
tool.
It is more robust, configurable, and doesn't hack around scripts that are sometimes overwritten by system updates. The tool uses similar methods to the ones described below, but extends the capabilities by e.g. easy NVMe passthrough by S/N.
The description below has been preserved for historical context. At the time of writing, the tool above has been tested for ~6 months across multiple systems.