После сборки появляется три бинаря:
- zerotier-cli -- утилитка для подключения
- zerotier-idtool -- генерилка ключиков
#!/bin/bash | |
GITLAB_URL="https://example.gitlab.com/" | |
PROJECT_ID="2" # get this id via the repo/project's overview page | |
ACCESS_TOKEN="glpat-abc" | |
# Create a new merge request | |
curl --header "Private-Token: $ACCESS_TOKEN" \ | |
"$GITLAB_URL/api/v4/projects/$PROJECT_ID/merge_requests" \ | |
--data "source_branch=my-branch" \ | |
--data "target_branch=main" \ |
#define WIN32_LEAN_AND_MEAN // just say no to MFC | |
#define INIT_GUID | |
#include "hge.h" | |
#include <hgesprite.h> | |
#include <hgefont.h> | |
#include <hgecolor.h> |
После сборки появляется три бинаря:
#include <atomic> | |
#include <cassert> | |
#include <iostream> | |
#include <list> | |
#include <memory> | |
#include <mutex> | |
#include <optional> | |
#include <thread> | |
#include <vector> |
CLIENT SIDE: | |
#include <iostream> | |
#include <winsock2.h> | |
using namespace std; | |
#pragma comment(lib,"ws2_32.lib") | |
#pragma warning(disable:4996) | |
#define SERVER "127.0.0.1" // or "localhost" - ip address of UDP server |
// From stackoverflow: https://stackoverflow.com/a/21429737 | |
#include <wincrypt.h> | |
class RandomSequence | |
{ | |
HCRYPTPROV hProvider; | |
public: | |
RandomSequence(void) : hProvider(NULL) { | |
if (FALSE == CryptAcquireContext(&hProvider, NULL, NULL, PROV_RSA_FULL, 0)) { |
#include "command_pattern.h" | |
/** private **/ | |
static int executorRun(ExecutorPtr executor) | |
{ | |
return executor->command->run(executor->command, executor->invoker); | |
} | |
static Executor executionContextInit(InvokerPtr invoker, CommandPtr command) |
#ifndef COMMAND_PATTERN_HPP | |
#define COMMAND_PATTERN_HPP | |
// declaration | |
namespace command | |
{ | |
/// | |
/// \brief The Invoker class |
#include <iostream> | |
#include <boost/utility/string_view.hpp> | |
const boost::string_view globalView = "123"; | |
int main() | |
{ | |
std::cout << globalView << std::endl; // 123 | |
return 0; | |
} |