Проверено на 5 баксовом тарифе DigitalOcean
Создаём proxy пользователя для аутентификации по паролю:
useradd -d /dev/null teleg
passwd teleg
#pragma once | |
// Suppress warnings for AMQP-CPP | |
#if defined(__clang__) | |
#pragma clang diagnostic push | |
#pragma clang diagnostic ignored "-Wunused-parameter" | |
#pragma clang diagnostic ignored "-Wclass-conversion" | |
#pragma clang diagnostic ignored "-Wdeprecated-copy" | |
#include <amqpcpp.h> | |
#include <amqpcpp/libev.h> |
#!/bin/env bash | |
set -e | |
model="gpt-4-turbo-preview"; | |
temperature=0.8; | |
prompt="Here is the output of \`git diff HEAD\`. Please provide the perfect commit message."` | |
`" Use emjoi if it is possible. Use past tense in the title. "` | |
`"(# If there is an error in the code, report it in the comments to the commit please)." |
#!/bin/env bash | |
set -e | |
model="gpt-4-turbo-preview"; | |
temperature=0.8; | |
prompt="Here is the output of \`git log <latest_tag>..HEAD\`. Please provide the perfect tag message."` | |
`" Use emjoi if it is possible. Use past tense. "` | |
`"Provide a message ready for direct substitution "` |
#include <unistd.h> | |
// true if current user is not root | |
// or true if owner changing is not required (targ_uid == 0) | |
// or true if current user is root and uid changed | |
// false otherwise (owner changing was unsuccessful) | |
bool change_owner(unsigned int targ_uid) noexcept | |
{ | |
return | |
(0u != getuid()) || // made sure that src_uid == 0 (source is root) |
#include <stdio.h> | |
#include <assert.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <errno.h> | |
#include <event2/bufferevent.h> | |
#include <event2/buffer.h> | |
#include <event2/listener.h> | |
#include <event2/util.h> |
Проверено на 5 баксовом тарифе DigitalOcean
Создаём proxy пользователя для аутентификации по паролю:
useradd -d /dev/null teleg
passwd teleg
#!/usr/bin/rdmd --shebang= -I. -w -debug -g | |
// | |
// multithreading find and execute | |
// | |
/* | |
ldc2 -O3 -dw -release -w -boundscheck=off -fvisibility=hidden -c find_mt.d -of=find_mt.o && \ | |
ldc2 -O3 -dw -release -w -link-defaultlib-shared=false -L-l:libphobos2-ldc.a -L-l:libdruntime-ldc.a -L-l:libz.a find_mt.o -of=find_mt && \ | |
strip --strip-all find_mt && \ |
#!/bin/bash | |
### BEGIN INIT INFO | |
# Provides: fixdell | |
# Required-Start: $local_fs $syslog $named | |
# Required-Stop: $local_fs $syslog $named | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: Fix DELL freezes | |
# Description: startup script for Fix DELL freezes | |
### END INIT INFO |
#include <iostream> | |
#include <cmath> | |
#include <chrono> | |
struct BenchResult | |
{ | |
std::chrono::nanoseconds duration; | |
double sum; | |
}; |
#include <iostream> | |
#include <utility> | |
#include <vector> | |
// Равномерно разделяет диапазон значения | |
// Для балансировки нагрузки на ядра CPU | |
std::vector<std::pair<int, int>> | |
splitRange(int from, int to, uint threads) noexcept | |
{ | |
std::vector<std::pair<int, int>> pairs; |