Skip to content

Instantly share code, notes, and snippets.

View griwes's full-sized avatar

Michał Dominiak griwes

View GitHub Profile
// functional:
return boost::join(map(_name.id_expression_value, [](auto && elem) { return elem.string; }), ".");
// C++:
std::vector<std::string> tmp;
tmp.reserve(_name.id_expression_value.size());
std::transform(_name.id_expression_value.begin(), _name.id_expression_value.end(), std::back_inserter(tmp), [](auto && elem) { return elem.string; });
return boost::join(tmp, ".");
#include <string>
#include <memory>
#include <type_traits>
#include <iostream>
#include <mutex>
#include <condition_variable>
#include <atomic>
#include <thread>
#include <unordered_map>
@griwes
griwes / gist:9566641
Created March 15, 2014 12:43
Strzela mnie w krzyżu
sł./muz.: Jakub Kwaśniewski
kapo I
Wojna przyszła jak zawsze niespodziewanie e
W całej armii wywołując poruszenie a
Nawet sam kapelan nie wie co się stanie H7
Czy idziemy po triumf - czy na stracenie e H7
Zebraliśmy się w kapliczce przy koszarach
"Wyznanie kalifa, czyli o mocy baśni"
sł. i muz. Jacek Kaczmarski
Słowem drobnego wyjaśnienia - znak '+' przed akordem oznacza, że z akordu poprzedniego na oznaczony akord
(a więc w miejscu, gdzie znajduje się '+') znajduje się specjalne przejście między akordami, zależne rzecz
jasna od samych akordów (a też i od miejsca w tekście). Oznaczenia te bazują na wykonaniu, które znajduje
się na albumie "Dwie skały"; tam też (tj. w nagraniu) polecam poszukiwać dodatkowych informacji na temat
tychże przejść.
@griwes
griwes / gist:5736853
Last active December 18, 2015 05:59
Some concepts for Reaver Shell. Keep in mind that this is just a text-only sketch; many of the features that are planned for RSh will not be available in text mode - I'm talking, for example, about clickable buttons for directories after `list`. The exact behavior is not really decided yet; I was thinking like, single click == `enter <directory>…
ReaverShell 0.3.1, running on ReaverOS 0.1.1 alpha.
Hello there, Griwes!
griwes@Griwes-Reaver 11:19:10 PM /user/griwes $ list
desktop directory, 12.00 KiB in 12 elements
documents directory, 14.02 MiB in 33 elements
downloads directory, 55.42 GiB in 124 elements
music directory, 120.4 GiB in 2043 elements
griwes@Griwes-Reaver 11:20:55 PM /user/griwes $ hello, rvcs
griwes@Griwes-Reaver 11:21:40 PM /user/griwes > rvcs $ status
No repository initialized in directory /user/griwes.
griwes@Griwes-Linux ~/tests $ clang++ main.cpp -std=c++11 -stdlib=libc++ -lc++abi
griwes@Griwes-Linux ~/tests $ ./a.out
Attempts: 1000000000
Successes: 499975732
S/A: 0.499976
Attempts with change: 499990979
Successes with change: 333311610
S/A (changed): 0.666635
Attempts without change: 500009021
Successes without change: 166664122