Skip to content

Instantly share code, notes, and snippets.

View ByteNacked's full-sized avatar
🚀
feeling cute

Roman Maslennikov ByteNacked

🚀
feeling cute
View GitHub Profile
@ByteNacked
ByteNacked / .vimrc
Last active October 1, 2016 21:19
My .vimrc file
" VIM Configuration File
" Description: My vimrc config file, for C++, python dev etc.
" Author: Roman Maslennikov
" Based on: 'Minimal .vimrc for C/C++ developers'
set langmenu=en_US.UTF-8
set nocompatible " be iMproved, required
filetype off " required
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <errno.h>
#include <signal.h>
volatile sig_atomic_t got_usr1;
@ByteNacked
ByteNacked / class member as template parameter examples
Last active May 18, 2017 18:43
this syntax is killing me TT
struct Elem
{
int a;
int b;
} ee;
struct Cont
{
Elem e1;
@ByteNacked
ByteNacked / test1_ConcreteMachine.cpp
Last active August 19, 2017 13:52
State machine template w/o meta programming
//
// Created by romanm on 8/19/2017.
//
#include "ConcreteMachine.h"
struct State0 : BaseState<MyEvent>
{
};
import struct
TypeMap = {
"float": "f",
"int32": "l",
}
@ByteNacked
ByteNacked / lambda_w_mutable_state.cpp
Created January 15, 2018 03:17
lambda_w_mutable_state
#include <iostream>
#include <cstdint>
#include <string>
using namespace std;
auto enumerate()
{
return [=]() mutable { cout << "enumerate\n"; };
#include <iostream>
enum AlgSettings : int32_t
{
ONE_WAY = 0x01,
ANOTHER_WAY = 0x02,
BOTH_WAYS = 0x03,
};
// SomAlg.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <iostream>
enum AlgSettings
{
ONE_WAY = 0x01,
// TemplateStructure.cpp : Defines the entry point for the console application.
//
#include <cstdint>
#include <iostream>
#include <iostream>
enum AlgSettings
{
ONE_WAY = 0x01,
ANOTHER_WAY = 0x02,
BOTH_WAYS = 0x03,
};