Create a template service file at /etc/systemd/system/secure-tunnel@.service. The template parameter will correspond to the name
of target host:
[Unit]
Description=Setup a secure tunnel to %I
After=network.target| // const WebSocket = require('ws'); | |
| export class DockerWS | |
| { | |
| oWebSocket = null | |
| bConnected = false | |
| oResultsGroupedByMethods = {} | |
| oCallbacksGroupedByMethods = {} |
| function find_git_branch() | |
| { | |
| local branch | |
| if branch=$(git rev-parse --abbrev-ref HEAD 2> /dev/null); then | |
| if [[ "$branch" == "HEAD" ]]; then | |
| branch='detached*' | |
| fi | |
| git_branch="($branch)" | |
| else | |
| git_branch="" |
| apt update | |
| apt upgrade | |
| apt install build-essential | |
| apt install pkg-config | |
| apt install libnet-dev python-yaml libaio-dev | |
| apt install libprotobuf-dev libprotobuf-c0-dev protobuf-c-compiler protobuf-compiler python-protobuf libnl-3-dev libcap-dev python-future | |
| # criu install | |
| curl -O -sSL http://download.openvz.org/criu/criu-3.10.tar.bz2 | |
| tar xjf criu-3.10.tar.bz2 |
| var dgram = require('dgram'); | |
| var server = dgram.createSocket("udp4"); | |
| server.on("message", function (msg, rinfo) { | |
| console.log("server got: " + msg + " from " + | |
| rinfo.address + ":" + rinfo.port); | |
| }); | |
| server.on("listening", function () { |
| // https://www.typescriptlang.org/play/?experimentalDecorators=true&emitDecoratorMetadata=true&target=1&ssl=1&ssc=1&pln=72&pc=24#code/JYOwLgpgTgZghgYwgAgIIHkAOZgHsQDOyA3gFCkC+5oksiKAQljvkWch8nAPwBcyIAK4BbAEbQA3KU7JRfASPFQpVUjWjwkyAJIAJOAWZ5CAHgAqAPhLTOAEwjxBAGzBHW-M1Jm5sxgh5VyGEEQBBYQZHsYHzBzZAgAD0gQWyI9AzdTAAULABpkHIAKWwA3fiyASmsZKAgwQSgIwrA4KABzOo98gGsIAE9+Xr7cGGQzfPsCBChgbFwocqgfaDA+gBEIKZm5qCqAXit2GU4EVlwnCAA6J1w25taOsB7+ic3p2bB5iq9jjhLW5D-JyCCDlZB7SIlKQ2X7oUQAKwgYUuUVAECyS0wKz693adWefXyR1+Mke-EK+ysQJBuRhJI4BE6yGCoXCyGaAAtgP4xvkSlVifTjqdCOcrjc7gAiRlgWiSgl8-JgLkEJUqlEOODOVy+VjfOlCzgGw2AuDAlAQqHGw3K7mXGJ+cHIW0Ee26wg-Q0UWkm+JCYTQOCiC78MBQEHW5AUfX0gD0scm7x2l2pFpIyEumZaeLAGscLkyqozmcT20+UBTZpBUc9x3jpY+80r5rpVFULLCxmQMTiiWSqR0+kM7oIJhy+SKpXKArptXqjXZ2bJvOQQ0G-RGK4bO0Wyygqw2W0bu3Bh0jIoIYuut1xjwVkTeZa+tZk-ygpvNYIhpWh9LhiORVEQHRTFsVvfFVxeaoTWXClTw-GlIxkGV+A7NlOW5LpARnX0ZAvK8JUKaU6jle8SjVbkKNdKItQLEcY1wjgkJJVMnWIYtLhdPNaJ1cIi0zFMa2YjhvWEv0REDYNQWdcMIEjaMX04etH2PZtqwhdiBKXOpuO1Qt8gE7dyzUlAKEUjhlKPZNU1bShyAQJwDCIVBzC |
h1. Коллекция сниппетов SQL
h2. Сайты для тестирования SQL
h2. Создать таблицу с возможностью сохранять дату изменения строки
| <?php | |
| class WebsocketClient{ | |
| public static function send($host, $data){ | |
| $client = stream_socket_client($host, $errorNumber, $errorString, 1); | |
| fwrite($client, "GET /msg/ HTTP/1.1\r\nHost: localhost\r\nUpgrade: websocket\r\nConnection: Upgrade\r\nSec-WebSocket-Key: tQXaRIOk4sOhgoq7SBs43g==\r\nSec-WebSocket-Version: 13\r\n\r\n"); | |
| $return=fread($client, 1024); | |
| fwrite($client, self::hybi10Encode(json_encode($data))); | |
| //fwrite($client, hybi10Encode(json_encode(array('action'=>'rework','request'=>'1369051', 'login'=>'Хунвейбин')))); |
There is a lot of hidden treasure lying within university pages scattered across the internet. This list is an attempt to bring to light those awesome CS courses which make their high-quality material i.e. assignments, lectures, notes, readings & examinations available online for free.