This file contains hidden or 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
| #!/bin/bash | |
| set -e | |
| WG_IP="${1:?Укажи WireGuard IP: sudo bash setup.sh 10.0.0.10}" | |
| VPS_PUBLIC_KEY="tkJLwBaa5FnJD3XdTEJpkorCmJ+Dp2Dvl4sWFziULT0=" | |
| VPS_ENDPOINT="135.181.62.229:17548" | |
| echo "[*] Устанавливаем WireGuard..." | |
| apt update && apt install -y wireguard |
This file contains hidden or 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
| sudo cryptsetup open /dev/sda1 my_usb | |
| sudo mount /dev/mapper/my_usb /mnt/usb | |
| sudo umount /mnt/usb | |
| sudo cryptsetup close usb | |
| sudo dmsetup ls |
This file contains hidden or 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 <stdio.h> | |
| #include <unistd.h> | |
| #include <pthread.h> | |
| pthread_mutex_t global_malloc_lock; | |
| struct header | |
| { | |
| size_t size; | |
| unsigned is_free; |
This file contains hidden or 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
| class PromiseCancelable extends Promise { | |
| constructor(promiseMethod) { | |
| let res, rej, onCancel; | |
| super((resolve, reject) => { | |
| res = resolve; | |
| rej = reject; | |
| promiseMethod(resolve,reject,(func) => { | |
| onCancel = func; | |
| }); | |
| }); |
This file contains hidden or 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
| const crypto = require('crypto'); | |
| const util = require('util'); | |
| // const os = require('os'); | |
| // process.env.UV_THREADPOOL_SIZE = os.cpus().length; | |
| const start = process.hrtime(); | |
| for (let i = 0; i < 8; i++) { |
This file contains hidden or 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
| const os = require('os'); | |
| const fs = require('fs'); | |
| process.env.UV_THREADPOOL_SIZE = os.cpus().length; | |
| console.log('start'); | |
| setTimeout(() => console.log('setTimeout 1'), 0); | |
| setImmediate(() => console.log('setImmediate')); |
This file contains hidden or 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 <iostream> | |
| #include <string> | |
| #include <queue> | |
| #include <unordered_map> | |
| using namespace std; | |
| struct Node { | |
| char ch; | |
| int freq; |
This file contains hidden or 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 <stdio.h> | |
| int main() { | |
| for(float x = 16000000; x < 17000010; x++) { | |
| printf("%f\n", x); | |
| } | |
| return 0; | |
| } |
This file contains hidden or 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
| from requests import Session | |
| s = Session() | |
| TOKEN = 'token' | |
| v = 5.95 | |
| params = { | |
| 'access_token': TOKEN, | |
| 'v': v, | |
| 'key': 'online', | |
| 'value': '373844327' |
This file contains hidden or 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
| 'use strict'; | |
| function Collector() {} | |
| const collect = (expected) => { | |
| const collector = (key, value) => { | |
| if (collector.finished) return collector; | |
| collector.count++; | |
| collector.data[key] = value; | |
| if (value instanceof Error) { |
NewerOlder