Skip to content

Instantly share code, notes, and snippets.


Oganesyan Levon ilev4ik

  • HSE
  • Moscow
Block or report user

Report or block ilev4ik

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

I believe the article was originally written by fede.tft.

It appears they have copied source code to github and updated it for C++11:


The serial port protocol is one of the most long lived protocols currently in use. According to wikipedia, it has been standadized in 1969. First, a note: here we're talking about the RS232 serial protocol. This note is necessary because there are many other serial protocols, like SPI, I2C, CAN, and even USB and SATA.

Some time ago, when the Internet connections were done using a 56k modem, the serial port was the most common way of connecting a modem to a computer. Now that we have ADSL modems, the serial ports have disappeared from newer computers, but the protocol is still widely used.

In fact, most microcontrollers, even the newer ones have one or more peripherals capable of communicating using this protocol, and from the PC side, all operating system

baiwfg2 / CMakeLists.txt
Created Sep 29, 2018
How to use add_custom_target and add_custom_command correctly in cmake
View CMakeLists.txt
# References:
cmake_minimum_required(VERSION 3.10)
mbinna /
Last active Feb 23, 2020
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](

View git-commit-prefixes
[test]: Update test/* files
[dist]: Changes to submodules, version bumps, updates to package.json
[minor]: Small changes
[doc]: Updates to documentation
[fix]: Bug fixes
[bin]: Update binary scripts associated with the project
[refactor]: Refactor of existing code
[nit]: Small code review changes mainly around style or syntax
[feat]: New features
jonlabelle /
Last active Feb 11, 2020
Windows to UNIX Command Cheat Sheet

Windows to UNIX Command Cheat Sheet

Windows PowerShell has several transition aliases that allow UNIX and CMD users to use familiar command names in Windows PowerShell. The most common aliases are shown in the table below, along with the Windows PowerShell command behind the alias and the standard Windows PowerShell alias if one exists.

CMD Command UNIX Command PowerShell Command PowerShell Alias
dir ls Get-ChildItem gci
gubatron /
Last active Feb 19, 2020
Things to remember when compiling and linking C/C++ programs

Things to remember when compiling/linking C/C++ software

by Angel Leon. March 17, 2015; August 29, 2019.

Include Paths

On the compilation phase, you will usually need to specify the different include paths so that the interfaces (.h, .hpp) which define structs, classes, constans, and functions can be found.

With gcc and llvm include paths are passed with -I/path/to/includes, you can pass as many -I as you need.

In Windows, cl.exe takes include paths with the following syntax: /I"c:\path\to\includes\ you can also pass as many as you need.

antiagainst / function-argument.cmake
Created Dec 28, 2014
View function-argument.cmake
cmake_minimum_required(VERSION 2.8)
function(use_llvm TARGET)
rmartinho / future.c++
Created Mar 24, 2013
Sample implementation of std::future
View future.c++
#include <wheels/concurrency/locker_box.h++>
#include <chrono>
#include <exception>
#include <future>
#include <memory>
#include <mutex>
#include <type_traits>
#include <utility>
jeromyanglim / example-r-markdown.rmd
Created May 17, 2012
Example of using R Markdown
View example-r-markdown.rmd
This post examines the features of [R Markdown](
using [knitr]( in Rstudio 0.96.
This combination of tools provides an exciting improvement in usability for
[reproducible analysis](
Specifically, this post
(1) discusses getting started with R Markdown and `knitr` in Rstudio 0.96;
(2) provides a basic example of producing console output and plots using R Markdown;
(3) highlights several code chunk options such as caching and controlling how input and output is displayed;
(4) demonstrates use of standard Markdown notation as well as the extended features of formulas and tables; and
(5) discusses the implications of R Markdown.
pksunkara / .gitconfig
Last active Feb 23, 2020
Sample of git config file (Example .gitconfig)
View .gitconfig
name = Pavan Kumar Sunkara
email =
username = pksunkara
editor = vim
whitespace = fix,-indent-with-non-tab,trailing-space,cr-at-eol
excludesfile = ~/.gitignore
smtpencryption = tls
You can’t perform that action at this time.