Skip to content

Instantly share code, notes, and snippets.

@ShaneEverittM
ShaneEverittM / bin.vim
Created November 12, 2021 01:56
Hex Edit FTDetect
" ex command for toggling hex mode - define mapping if desired
command -bar Hexmode call ToggleHex()
" helper function to toggle hex mode
function ToggleHex()
" hex mode should be considered a read-only operation
" save values for modified and read-only for restoration later,
" and clear the read-only flag for now
let l:modified=&mod
let l:oldreadonly=&readonly
@ShaneEverittM
ShaneEverittM / Result.hpp
Created June 27, 2021 09:53
Simple Result
namespace DB {
class Result {
public:
enum Value : uint8_t {
Success,
Failure
};
constexpr Result() = default;