Skip to content

Instantly share code, notes, and snippets.

View mersinvald's full-sized avatar

Mike Lubinets mersinvald

View GitHub Profile
fn main() {
use std::time::SystemTime;
let mut timers = Vec::with_capacity(10);
let mut hash = 0;
for _ in 0..10 {
// Starting timer
let before_time = SystemTime::now();
/* Нода дека */
typedef struct DNode {
int num;
int group;
char FIO[64];
struct DNode *left; // Указатель на элемент слева
struct DNode *right; // Указатель на элемент справа
} DNode;
typedef struct {
#include <libexplain/popen.h>
#include <stdio.h>
#include <stdarg.h>
bool
run_shell(char* out_buffer, const size_t out_buffer_size, const char* command_fmt, ...) {
va_list va;
va_start(va, command_fmt);
char command[strlen(command_fmt) + 256];
@mersinvald
mersinvald / example.cpp
Last active March 6, 2016 23:32
Simple (dumb) and small logger
/* This is free and unencumbered software released into the public domain.
* Anyone is free to copy, modify, publish, use, compile, sell, or
* distribute this software, either in source code form or as a compiled
* binary, for any purpose, commercial or non-commercial, and by any
* means.
* In jurisdictions that recognize copyright laws, the author or authors
* of this software dedicate any and all copyright interest in the
* software to the public domain. We make this dedication for the benefit
* of the public at large and to the detriment of our heirs and
* successors. We intend this dedication to be an overt act of