Skip to content

Instantly share code, notes, and snippets.

C++ ❤️

Sonkeng Maldini sdmg15

C++ ❤️
View GitHub Profile
View dataModel.cpp
// A helper function to determine the data model of the current platform
[[nodiscard]] constexpr const char* dataModelPlatform() {
if constexpr (sizeof(int) == 2 && sizeof(long int) == 8) {
if (sizeof(int*) == 2) {
return "ILP32";
return "LLP64";
View printTuple.cpp
#include <iostream>
#include <utility>
#include <tuple>
template<typename T>
void printWithSpace(T v) {
std::cout << v << " ";
View newordersingle.proto
syntax = "proto3";
package FIX;
import "executionreport.proto";
message NewOrderSingle {
string ClOrdID = 1;
string Instrument = 2;

Keybase proof

I hereby claim:

  • I am sdmg15 on github.
  • I am sdmg15 ( on keybase.
  • I have a public key ASDReENYgSw8E69a3p0qpf5v0cVPm2RgcwULuZiCw58bMgo

To claim this, I am signing this object:

sdmg15 / gist:fa6f6b3f69117e363bc7a15f8b88cc4a
Created Jul 19, 2019 — forked from bessarabov/gist:674ea13c77fc8128f24b5e3f53b7f094
One-liner to generate data shown in post 'At what time of day does famous programmers work?' —
View gist:fa6f6b3f69117e363bc7a15f8b88cc4a
git log --author="Linus Torvalds" --date=iso | perl -nalE 'if (/^Date:\s+[\d-]{10}\s(\d{2})/) { say $1+0 }' | sort | uniq -c|perl -MList::Util=max -nalE '$h{$F[1]} = $F[0]; }{ $m = max values %h; foreach (0..23) { $h{$_} = 0 if not exists $h{$_} } foreach (sort {$a <=> $b } keys %h) { say sprintf "%02d - %4d %s", $_, $h{$_}, "*"x ($h{$_} / $m * 50); }'
sdmg15 /
Created May 23, 2019
Libraries and resources made by Cameroonians

A list of libraries and resources made by Cameroonians

CLI utils


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](


Code of Conduct

All participants of DevOfFuture are expected to abide by our Code of Conduct, both online and during in-person events that are hosted and/or associated with DevOfFuture. The Pledge

In the interest of fostering an open and welcoming environment, we pledge to make participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. The Standards

Examples of behaviour that contributes to creating a positive environment include:

sdmg15 / attributes.rb
Created Apr 22, 2019 — forked from lizthegrey/attributes.rb
Hardening SSH with 2fa
View attributes.rb
default['sshd']['sshd_config']['AuthenticationMethods'] = 'publickey,keyboard-interactive:pam'
default['sshd']['sshd_config']['ChallengeResponseAuthentication'] = 'yes'
default['sshd']['sshd_config']['PasswordAuthentication'] = 'no'

Dev of Future - A community of developers solving problems and learning together

What Dev Of Future is about

Dev of Future is an open source community where programmers share ideas and help each other grow. It was created in the middle of 2016 to connect more developers and designers to an ever-expanding network to foster software development excellence.

We believe it takes a village to raise a coder. We have created our virtual village for sharing and discovering great ideas, having debates, making friends, and also solve problems. Anyone can share articles, questions, discussions, etc. We make sure everyone is learning and are also motivated to become the world-class developers they desire to become.

Our mission is to connect developers, and anyone who wants to learn and share his knowledge with others. We also provide access to the best learning resources (contests, tutorials, blogs, etc.) from around the world. The community is in fact made of passionate developers sharing same ideas and who want