Skip to content

Instantly share code, notes, and snippets.

View pomo-mondreganto's full-sized avatar
🎯
Focusing

Roman Nikitin pomo-mondreganto

🎯
Focusing
  • Moscow
View GitHub Profile
@pomo-mondreganto
pomo-mondreganto / SETUP.md
Last active March 14, 2024 12:12
Script to install zsh & docker on a new Ubuntu machine

Script to setup zsh + zsnap + p10k + docker on a new (ubuntu-like) machine

@pomo-mondreganto
pomo-mondreganto / ssld.py
Created December 25, 2020 19:42
SSL Destroyer
#!/usr/bin/env python3
import argparse
import subprocess
from threading import Event
def run_command(cmd):
return subprocess.Popen(cmd)
@pomo-mondreganto
pomo-mondreganto / how-to.md
Created November 12, 2020 13:07
Wireguard installation for older kernels

First, try to install wireguard:

# this should fail with module compilation error
sudo apt update && sudo apt install -y wireguard wireguard-dkms wireguard-tools linux-headers-$(uname -r) build-essential

Then, go to /usr/src/wireguard-<version here> and comment out lines 96,97,99 in compat/compat.h to have

@pomo-mondreganto
pomo-mondreganto / resource_usage.py
Created August 28, 2020 12:54
Measure function resource usage (cpu time, max memory consumption)
import platform
from contextlib import closing
from multiprocessing import Process, Pipe
import math
import resource
from functools import wraps
from multiprocessing.connection import Connection
from pydantic import BaseModel
from typing import Callable, Any
@pomo-mondreganto
pomo-mondreganto / runge-kutta.ipynb
Created May 21, 2020 19:37
Runge-Kutta algorithm of rank 4
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@pomo-mondreganto
pomo-mondreganto / GradSolve.ipynb
Created April 11, 2020 11:08
БДЗ задание 16(9)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@pomo-mondreganto
pomo-mondreganto / GradDescent.ipynb
Created April 11, 2020 11:06
БДЗ задание 15(4)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@pomo-mondreganto
pomo-mondreganto / submit.py
Created April 11, 2020 09:32
Script for submitting flags to ForcAD
#!/usr/bin/env python3
import time
import socket
SYSTEM_IP = '10.10.10.10'
SYSTEM_PORT = 31337
TEAM_TOKEN = '<your team token>'
@pomo-mondreganto
pomo-mondreganto / setup.sh
Created April 10, 2020 13:36
Script for setting up Docker + Docker Compose + OpenVPN
#!/bin/sh
apt-get update
apt-get install -y \
apt-transport-https \
ca-certificates \
curl \
gnupg-agent \
software-properties-common \
openvpn
@pomo-mondreganto
pomo-mondreganto / install_docker.sh
Created March 15, 2020 14:50
Script for Docker + Docker-compose installation
#!/bin/sh
apt-get update
apt-get install \
apt-transport-https \
ca-certificates \
curl \
gnupg-agent \
software-properties-common