Skip to content

Instantly share code, notes, and snippets.

View byteoncaffeinehigh's full-sized avatar
:octocat:

Maria Berestovaya byteoncaffeinehigh

:octocat:
  • Airvoice
  • Belgrade
View GitHub Profile
#!/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
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
#include <stdio.h>
#include <unistd.h>
#include <pthread.h>
pthread_mutex_t global_malloc_lock;
struct header
{
size_t size;
unsigned is_free;
class PromiseCancelable extends Promise {
constructor(promiseMethod) {
let res, rej, onCancel;
super((resolve, reject) => {
res = resolve;
rej = reject;
promiseMethod(resolve,reject,(func) => {
onCancel = func;
});
});
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++) {
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'));
#include <iostream>
#include <string>
#include <queue>
#include <unordered_map>
using namespace std;
struct Node {
char ch;
int freq;
#include <stdio.h>
int main() {
for(float x = 16000000; x < 17000010; x++) {
printf("%f\n", x);
}
return 0;
}
from requests import Session
s = Session()
TOKEN = 'token'
v = 5.95
params = {
'access_token': TOKEN,
'v': v,
'key': 'online',
'value': '373844327'
'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) {