Skip to content

Instantly share code, notes, and snippets.

View LuxoftAKutsan's full-sized avatar

Alexander Kutsan (GitHub) LuxoftAKutsan

View GitHub Profile
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# generate_png.py
#
# Copyright 2015 akutsan <akutsan@akutsan>
#
# Generate PNG file with preloaded cycled content
#
import argparse
// Scripts :
ps u | grep smart | grep -v grep | awk -v time="$(date +'%r')" '{print time, $6 }'
// Plot graph :
reset;
G_dat = './release4.1.0_no_logs_memory_usage.txt'
G_pic_w = 1000
G_pic_h = 800
G_Title = "SDL memory usage without logs";
G_XLabel = "X - time";
function ready() {
cvlc ~/Downloads/Jobs\ Done.mp3 --play-and-exit
}
function bad_result() {
echo "Something is wrong" | festival --tts;
}
function notepad++ {
template <M>
class AsyncMessageProcessor {
Handle() = 0;
ProcessMessage(M m ) {
// put message in queue
}
Thread tread; // thread pop messages from queue and call Handle for each
void Stop() {
// forbid push
mobile_apis::Result::eType result_code = mobile_apis::Result::INVALID_ENUM;
const bool is_vr_invalid_unsupported =
Compare<hmi_apis::Common_Result::eType, EQ, ONE>(
vr_result_,
hmi_apis::Common_Result::INVALID_ENUM,
hmi_apis::Common_Result::UNSUPPORTED_RESOURCE);
const bool is_ui_invalid_unsupported =
Compare<hmi_apis::Common_Result::eType, EQ, ONE>(
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
typedef std::vector<std::string> EString;
template<class T>
struct Enum {
template<typename EType>
@LuxoftAKutsan
LuxoftAKutsan / gist:e756c2871a834a4a9858
Created November 11, 2015 15:59
Простудой навело
#include <iostream>
#include <string>
#include <vector>
template <class T>
struct Enum {
template <typename EType>
static const char* ToString(EType etype) {
return T::strType()[static_cast<int>(etype)];
}