This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# curl https://gist.githubusercontent.com/proller/22597d546615eed04ec1/raw/e3f454e516335cd7adb37418a2b8ede524a41da1/gistfile1.sh | sh | |
# sudo apt-get -y install libsctp-dev libssl-dev autoconf | |
v=openssh-7.5p1 | |
p=extra-patch-sctp | |
wget -O $v.tar.gz http://ftp.eu.openbsd.org/pub/OpenBSD/OpenSSH/portable/$v.tar.gz -O $v.tar.gz | |
wget https://raw.githubusercontent.com/freebsd/freebsd-ports/master/security/openssh-portable/files/$p -O $p | |
tar -xzf $v.tar.gz | |
cat $p | patch -d $v | |
cd $v | |
autoconf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <shared_mutex> | |
int main(int argc, char *argv[]) { | |
std::shared_timed_mutex m; | |
std::shared_lock<std::shared_timed_mutex> lock(m); | |
lock.unlock(); | |
return 0; | |
} | |
//ok: | |
// gcc49 -std=c++1y -lstdc++ a.cpp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Использование ssh over sctp в freebsd | |
cd /usr/ports/security/openssh-portable | |
make config | |
# тут ставим галочку SCTP | |
make install clean | |
# заставляем работать портовый sshd только по протоколу sctp параллельно базовому sshd | |
ee /usr/local/etc/ssh/sshd_config | |
Port 22 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
astyle --style=attach --indent=tab --keep-one-line-blocks --keep-one-line-statements --pad-oper *.cpp *.h |