Skip to content

Instantly share code, notes, and snippets.

@brotchie
brotchie / main.cpp
Created July 18, 2012 06:32
Minimal C++ implementation of Functor, Monad and Maybe using c++0x variadic templates and lambda expressions.
/*
* Minimal C++ implementation of Functor, Monad and Maybe.
*
* Requires c++0x variadic templates and lambda expressions:
*
* g++ -std=c++0x main.cpp -o main
*
* fmap, monadic bind and return implementations for std::vector
* and Maybe.
*
@mbinna
mbinna / effective_modern_cmake.md
Last active July 30, 2024 03:54
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

@yun-cloud
yun-cloud / common-log-func.sh
Last active January 8, 2020 07:58
some common used function, to show the infomation.
BLACK="$(tput setaf 0; tput bold)"
RED="$(tput setaf 1; tput bold)"
GREEN="$(tput setaf 2; tput bold)"
YELLOW="$(tput setaf 3; tput bold)"
BLUE="$(tput setaf 4; tput bold)"
MAGENTA="$(tput setaf 5; tput bold)"
CYAN="$(tput setaf 6; tput bold)"
WHITE="$(tput setaf 7; tput bold)"
BOLD="$(tput bold)"
RESET="$(tput sgr0)"