Bash Cheat Sheet
Some bash utils that I almost always to forget. Ctrl-o - used when browsing history command (Ctrl-r), it will execute the command, and fetch the next one from the history. To copy some files to ...
Some bash utils that I almost always to forget. Ctrl-o - used when browsing history command (Ctrl-r), it will execute the command, and fetch the next one from the history. To copy some files to ...
Code for std ranges to transform from a collection to another collection after some ranges operations, available in c++23. Doing this we can have AAA style. #include <vector> #include <st...
Code for scoped timer. Once a block goes out of a scope, duration will be printed. #include <iostream> #include <string> #include <chrono> struct ScopedTimer { std::chrono::st...
Code for using filtered / transformed view over some existing containers This is similar to range-v3, a feature that will be in c++20. #include <iostream> #include <vector> #include &...
Code for printing stack at a particular point Reference: Stack Overflow #include <iostream> #define BOOST_STACKTRACE_USE_ADDR2LINE #include <boost/stacktrace.hpp> using namespace st...
First post here