Skip to content

Instantly share code, notes, and snippets.

View olegchir's full-sized avatar

Oleg Chirukhin olegchir

View GitHub Profile
---
version: "2.1"
services:
wireguard:
image: lscr.io/linuxserver/wireguard
container_name: wireguard
cap_add:
- NET_ADMIN
- SYS_MODULE
environment:

Purpose

I want to check claims that V is very slow, by comparing it with Golang: https://christine.website/blog/v-vaporware-2019-06-23

Assumptions

The test from the source article uses 1.2 million lines. V can't compile this number of lines. Go used 25G RAM on my machine, and was compiling it ~30 mins before I interrupted this hopless process.

Самое сложное - дожить до утра. Утро случается в девять часов, иногда чуть раньше или позже. Между серединой залитой дождём питерской ночи и первыми лучами нового дня есть как минимум шесть часов, зеленый чай и чистый лист.

Каждый час состоит из 60 минут, каждая минута - из 60 секунд, каждая секунда - из тысячи мгновений, и к каждому следующему мгновению можно перейти ничуть не раньше того, как проживёшь предыдущее.

Каждое в отдельности - как в магазин патрон. Приложить, надавить пальцем, защелкнуть за изгиб. Щёлк, щёлк, щёлк.

Меня в детстве завораживала загадка про "последний момент перед девятью часами". Очевидно, что девять часов наступят только после самого последего момента. Но ведь мы можем любое оставшееся время поделить напопоплам, одну из половинок - снова напополам, и так бесконечно.

Девять часов никаким образом наступить не могут, но каждый раз наступают. Предельный переход достигается тем особым состоянием души, когда все накопленные внутри мгновения вдруг сливаются в единое целое.

@olegchir
olegchir / private_fork.md
Created May 9, 2021 12:42 — forked from 0xjac/private_fork.md
Create a private fork of a public repository

The repository for the assignment is public and Github does not allow the creation of private forks for public repositories.

The correct way of creating a private frok by duplicating the repo is documented here.

For this assignment the commands are:

  1. Create a bare clone of the repository. (This is temporary and will be removed so just do it wherever.)

git clone --bare git@github.com:usi-systems/easytrace.git

#include <iostream>
using namespace std;
std::string unfuck_windows_path(std::string path);
int main() {
auto in = "C:\\Users\\Мистер Йож\\Мои Документы\\Мои Игры";
auto out = unfuck_windows_path(in);
std::cout << out << std::endl;
return 0;
}
package com.olegchir.jlt;
import java.util.concurrent.atomic.AtomicReference;
public class Main {
static AtomicReference<String> haystack = new AtomicReference<>("8".repeat(184));
public static void main(String[] args) {
while ( find("222") || find("888") ) {
if ( find("222") ) {
package com.olegchir.bpmscan;
import javax.imageio.ImageIO;
import java.awt.*;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.*;
if (window.NodeList && !NodeList.prototype.forEach) {
NodeList.prototype.forEach = function (callback, thisArg) {
thisArg = thisArg || window;
for (var i = 0; i < this.length; i++) {
callback.call(thisArg, this[i], i, this);
}
};
}
//package com.example.helloworld;
//public final class HelloWorld {
// public static void main(String[] args) {
// System.out.println("Hello, JavaPoet!");
// }
//}
MethodSpec main = MethodSpec.methodBuilder("main")
.addModifiers(Modifier.PUBLIC, Modifier.STATIC)
.returns(void.class)
Class<?> dynamicType = new ByteBuddy()
.subclass(Object.class)
.method(ElementMatchers.named("toString"))
.intercept(FixedValue.value("Hello World!"))
.make()
.load(getClass().getClassLoader())
.getLoaded();
assertThat(dynamicType.newInstance().toString(), is("Hello World!"));