Skip to content

Instantly share code, notes, and snippets.

View deliciouslytyped's full-sized avatar
🎩
🐱

deliciouslytyped

🎩
🐱
View GitHub Profile
@deliciouslytyped
deliciouslytyped / gitterroom-mirror.sh
Last active November 7, 2021 13:24
Download the text messages of a (public) gitter room without logging in, view it with some semi-readable output
#! /usr/bin/env bash
set -euo pipefail #NOTE I use a lot of functions and apparently -e is useless with functions?
#TODO simplify this back down by separating the render functionality
#TODO port to tcl?
# =========== utilities =========== #
# (root) -> ()
@deliciouslytyped
deliciouslytyped / enable_eval.bash
Last active August 25, 2022 23:17
Workaround gnome-shell disabling Eval by injecting js with gdb; no need to restart or poke the GUI!
#! /usr/bin/env nix-shell
#! nix-shell -p gdb psmisc fzf -i bash
# Workaround gnome-shell disabling Eval by injecting js with gdb; no need to restart or poke the GUI!
# https://askubuntu.com/questions/1201849/invoking-gnome-show-applications-from-command-line
# https://askubuntu.com/questions/1412130/dbus-calls-to-gnome-shell-dont-work-under-ubuntu-22-04
#TODO clean this up
#TODO extend this to load plugins at runtime? (well, unneeded once you have Eval access I guess, because you can then use it like lg.)
# References:
# file:///C:/Users/Lenovo/Downloads/vaszil_forditok.pdf
# Alfred V. Aho, Monica S. Lam, Ravi Sethi, Jeffrey D. Ullman - Compilers - Principles, Techniques, and Tools-Pearson_Addison Wesley (2006).pdf
from textwrap import dedent
import string
from collections import defaultdict
import z3
from itertools import combinations
import timeit
#from line_profiler_pycharm import profile
from collections import deque
from queue import PriorityQueue # minheap
from typing import *
import unittest
import timeit
# MyPy type aliases