Skip to content

Instantly share code, notes, and snippets.

View vladdenisov's full-sized avatar
📚
Working from home

Vlad Denisov vladdenisov

📚
Working from home
View GitHub Profile
@vladdenisov
vladdenisov / Alert5MultiThread.java
Created October 21, 2025 13:39
denisov_parallel_v1
package org.itmo;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.UncheckedIOException;
import java.nio.charset.StandardCharsets;
import java.nio.file.*;
import java.util.*;
import java.util.concurrent.*;
@vladdenisov
vladdenisov / report.txt
Last active June 5, 2023 22:01
orbstack Sonoma report
-------------------------------------
Translated Report (Full Report Below)
-------------------------------------
Process: OrbStack [9948]
Path: /Applications/OrbStack.app/Contents/MacOS/OrbStack
Identifier: dev.kdrag0n.MacVirt
Version: 0.11.2 (1621)
Code Type: ARM-64 (Native)
Parent Process: launchd [1]
function tick() {
let time = 160; //seconds
let to_send = []
let MSG = document.getElementsByClassName("im-mess-stack")[document.getElementsByClassName("im-mess-stack").length - 1].getElementsByClassName("im-mess--text")[0].innerText
MSG = MSG.slice(MSG.indexOf(',') + 2, MSG.length)
if (MSG.indexOf("туалет") === 6) {
let min_water = parseInt(MSG.substring(MSG.indexOf("Воды потрачено:") + 16, MSG.indexOf("кубометров воды.") - 1 )) * 2
let water = parseInt(MSG.substring(MSG.indexOf("Вода:") + 6, MSG.length - 4))
let dirty = parseInt(MSG.substring(MSG.indexOf("В туалете грязно на") + 20, MSG.lastIndexOf("%")))
console.table({ water: water, dirty: dirty, min_water: min_water })
t = 0;
function fmtMSS(s){return(s-(s%=60))/60+(9<s?':':':0')+s}
[...document.getElementsByClassName("ap_layer")[0].getElementsByClassName('audio_row__duration')].map(el => {var a = el.innerText.split(':');
console.log([a, el.innerText]);
t = t + parseInt(a[0]) *60 + parseInt(a[1]);
})
console.log(fmtMSS(t))
@vladdenisov
vladdenisov / reshu-ege.js
Last active May 20, 2020 09:47
Solving ReshuOge/Ege tests
inps = document.getElementsByClassName('test_inp')
Array.from(document.getElementsByClassName('prob_nums')).map((e, i) => {
$.get('/problem?id=' + e.children[0].innerHTML).then(html => {
const answer_txt = $(html).find('.answer')[0].innerText
if (answer_txt.indexOf('|') !== -1) inps[i + 5].value = answer_txt.slice(7, answer_txt.indexOf('|'))
else inps[i + 5].value = answer_txt.slice(7)
}, (e) => console.error(e))
})