Проверено на 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 | |
for tz in $(timedatectl list-timezones | grep -v 'UTC') | |
do | |
gmtoff=$(zdump -v "$tz" | grep 'gmtoff' | tail -n1 | grep -oE "[^ ]+$") | |
tz_offset="${gmtoff:7}" | |
if [[ "${gmtoff:0:7}" == "gmtoff=" ]]; then | |
echo "$tz;$tz_offset" | |
fi |
Проверено на 5 баксовом тарифе DigitalOcean
Создаём proxy пользователя для аутентификации по паролю:
useradd -d /dev/null teleg
passwd teleg
// | |
// CRTP. Double static polymorphism | |
// | |
// g++ -std=c++14 1.cpp && ./a.out | |
#include <iostream> | |
#include <string> | |
using std::cout; |
// | |
// May destructing variables for itarable types and tuples | |
// | |
module vlm.utils.destructing; | |
import std.range : empty, popFront, front; | |
import std.traits : isIterable; | |
import std.typecons : Tuple, tuple, isTuple; | |
import std.functional : forward; |
#include <vector> | |
#include <iostream> | |
class A | |
{ | |
private: | |
struct private_key {}; | |
// private constructor | |
A(int a) : | |
a(a) |
module StringManip; | |
import std.range : empty, popFront, front; | |
auto destr(Arg0, Args...)(ref Arg0 arg0, ref Args args) | |
{ | |
return DestrInstance!(Arg0, Args.length+1)(arg0, args); | |
} |
join :: Char -> [String] -> String | |
join _ [] = [] | |
join _ [s] = s | |
join gl arr = | |
head arr ++ gl : joingl (tail arr) | |
where | |
joingl = join gl | |
putStrLn (join ':' ["str1", "str2", "str3"]) |
#!/bin/sh | |
# | |
# | |
# Script to auto mount external device | |
# If for some reason you do not want to use the fstab file, this script will be a resolve | |
# | |
#include <iostream> | |
#include <string> | |
/** | |
* Optimized aggregating strings | |
* used Args pack | |
*/ | |
template <unsigned short size> | |
struct StrJoinInitializer | |
{ |