Skip to content

Instantly share code, notes, and snippets.

View listvin's full-sized avatar

listvin

View GitHub Profile
@listvin
listvin / instance.sh
Created February 21, 2023 16:48
vanilla Telegram Desktop primitive profile manager
#!/bin/bash
cd /opt/Telegram
function check-vpn {
echo 'vpn?'
nordvpn status | grep Connected
return $?
}
function check-single {
@listvin
listvin / AVL.kt
Last active June 19, 2019 22:22
AVL-tree, unit-tested and random tested with op sequences of length up to 2e6
package algo
import toInt
import kotlin.math.absoluteValue
class AVL<K : Comparable<K>, V : Any> {
private var Node?.diff
get() = this?._diff ?: 0
set(value) {