Skip to content

Instantly share code, notes, and snippets.

View etorth's full-sized avatar
🎯
Focusing

Etorth etorth

🎯
Focusing
  • USTC
View GitHub Profile
@etorth
etorth / gist:838ec3bedb6c8945e8883f24a9fbce35
Created December 15, 2022 02:34
vim script: get tabs
function! s:GetTabs()
" vim tab does not have name
" there is not a good way to detect if a diary is already open
redir => l:tabs_out
silent tabs
redir END
let l:tabs_out = split(l:tabs_out, '\n')
let l:tabs_len = len(l:tabs_out)
/*
* =====================================================================================
*
* Filename: fvThreadPool.h
* Created: 01/23/2016 13:46:24
* Description:
*
* Version: 1.0
* Revision: none
* Compiler: g++ -std=c++14
@etorth
etorth / scopedalloc.h
Created June 13, 2020 02:06
code review for allocator implementation
#pragma once
#include <cstdio>
#include <cstdlib>
#include <cstddef>
#include <cassert>
#include <vector>
#include <stdexcept>
#include "fflerror.h" // macro, same as std::runtime_error, but with file/function/line information
// #define SCOPED_ALLOC_USE_THROW