Skip to content

Instantly share code, notes, and snippets.

Mārtiņš Možeiko mmozeiko

  • San Jose, CA
Block or report user

Report or block mmozeiko

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View rpi_gpu_usage_monitor.cpp
#include <stdio.h>
#include <errno.h>
#include <sys/types.h>
#include <unistd.h>
#include <string.h>
#include <assert.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <stdlib.h>
#include <sys/ioctl.h>
vurtun /
Last active Sep 13, 2019
Quarks: Graphical user interface
twoscomplement / TransientFunction.h
Last active Apr 15, 2018
TransientFunction: A light-weight alternative to std::function [C++11]
View TransientFunction.h
// TransientFuction: A light-weight alternative to std::function [C++11]
// Pass any callback - including capturing lambdas - cheaply and quickly as a
// function argument
// Based on:
// - No instantiation of called function at each call site
// - Simple to use - use TransientFunction<> as the function argument
// - Low cost: cheap setup, one indirect function call to invoke
mbinna /
Last active Sep 14, 2019
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](

vurtun / defl.c
Last active Mar 2, 2019
Full deflate/inflate implementation in ~250 LoC
View defl.c
/* ===============================================================
* ===============================================================
* public domain - no warranty implied; use at your own risk
* References:
#include <stdlib.h>
View gui.c
/* ===========================================================================
* =========================================================================== */
/* Proof of Concept GUI:
* - PoC UI implementation in ~2.5kLOC of C89 (ANSI C)
* => Core solutions has no external dependencies (removing standard library dependency is trival)
* => Does not use or require any special language constructs or macro constructs just pointers and enums
* - Combines both "retained" and "immediate mode" UI by providing control over update frequency
djg /
Last active Mar 14, 2019
Fabian's Recommened Reading List
ninjarobot / mkbundle-alpine-example.Dockerfile
Created Jun 19, 2017
A minimal Alpine image using a self-contained .NET executable built with mkbundle.
View mkbundle-alpine-example.Dockerfile
FROM alpine
RUN echo 'using System; \
namespace Program { \
public class MyClass { \
public static void Main(string[] args) { \
Console.WriteLine ("Hello from C#"); \
} \
} \
}' >> Program.cs
RUN apk add --virtual build-dependencies --repository --no-cache mono mono-dev musl-dev binutils gcc && \
bkaradzic /
Last active Sep 10, 2019
Why I think Immediate Mode GUI is way to go for GameDev tools

Why I think Immediate Mode GUI is way to go for GameDev tools


Before you continue, if you don't know what IMGUI is don't bother reading this post, just ignore it, don't write anything in comments section, etc. If you're curious about IMGUI see bottom of this post, otherwise continue whatever you were doing, this post it's not for you. Thanks!

If you know what IMGUI is, for context read following presentations and blog posts:

  • Insomniac’s Web Tools Postmortem
You can’t perform that action at this time.