Skip to content

Instantly share code, notes, and snippets.

View bschwb's full-sized avatar

Bernd Schwarzenbacher bschwb

View GitHub Profile
@joepie91
joepie91 / no-your-cryptocurrency-cannot-work.md
Last active July 5, 2024 10:43
No, your cryptocurrency cannot work

No, your cryptocurrency cannot work

Whenever the topic of Bitcoin's energy usage comes up, there's always a flood of hastily-constructed comments by people claiming that their favourite cryptocurrency isn't like Bitcoin, that their favourite cryptocurrency is energy-efficient and scalable and whatnot.

They're wrong, and are quite possibly trying to scam you. Let's look at why.

What is a cryptocurrency anyway?

There are plenty of intricate and complex articles trying to convince you that cryptocurrencies are the future. They usually heavily use jargon and vague terms, make vague promises, and generally give you a sense that there must be something there, but you always come away from them more confused than you were before.

@mbinna
mbinna / effective_modern_cmake.md
Last active July 25, 2024 18:43
Effective Modern CMake

Effective Modern CMake

Getting Started

For a brief user-level introduction to CMake, watch C++ Weekly, Episode 78, Intro to CMake by Jason Turner. LLVM’s CMake Primer provides a good high-level introduction to the CMake syntax. Go read it now.

After that, watch Mathieu Ropert’s CppCon 2017 talk Using Modern CMake Patterns to Enforce a Good Modular Design (slides). It provides a thorough explanation of what modern CMake is and why it is so much better than “old school” CMake. The modular design ideas in this talk are based on the book [Large-Scale C++ Software Design](https://www.amazon.de/Large-Scale-Soft

@dnmiller
dnmiller / GoogleTest.cmake
Last active April 21, 2019 10:08
CMake custom target for adding Python tests and GoogleTest unit tests to compiled libraries. Tests are run via nose.
# Custom cmake target for creating a target using gtest for unit testing.
function(add_gtest_target TARGET_NAME TARGET_LIB)
set(TEST_EXEC _${TARGET_LIB}_test)
# Build the test executable.
add_executable(${TEST_EXEC} ${ARGN})
target_link_libraries(${TEST_EXEC} ${TARGET_LIB})
# gtest was not found with a find_package command and must be linked to