Skip to content

Instantly share code, notes, and snippets.

View zeionara's full-sized avatar
🥮
hey you want some brownies bitch?

dima zeionara

🥮
hey you want some brownies bitch?
View GitHub Profile
@zeionara
zeionara / message-unblurring-example.txt
Created February 7, 2024 11:37
Example of unblurring a message in slack
<div role="presentation" class="c-message_kit__background c-message_kit__hidden_message_blur p-message_pane_message__message c-message_kit__message" data-qa="message_container" data-qa-unprocessed="false" data-qa-placeholder="false"><div class="c-message_kit__actions c-message_kit__actions--default" style="position: relative;"><div class="c-message_kit__gutter"><div role="presentation" class="c-message_kit__gutter__left" data-stringify-ignore="true"><span class="p-member_profile_hover_card" role="presentation"><button class="c-button-unstyled c-message_kit__avatar c-avatar c-avatar--interactive" aria-hidden="true" aria-label="View Liubov’s Profile" tabindex="-1" type="button" style="height: 36px; width: 36px;"><span class="c-base_icon__width_only_container" style="height: 36px; width: 36px;"><img src="https://ca.slack-edge.com/T03HVCZ5QK0-U03J29DP99Q-gb6734234f8b-48" srcset="https://ca.slack-edge.com/T03HVCZ5QK0-U03J29DP99Q-gb6734234f8b-72 2x" class="c-base_icon c-base_icon--image" aria-hidden="true" role="im
@zeionara
zeionara / history-sorter.sh
Created November 6, 2023 17:47
Sort recent commands by frequency in the history and show top results
#!/bin/bash
history | cut -c 27- | sort | uniq -c | sort -nr | head
@zeionara
zeionara / lsmod-diff.py
Created November 5, 2023 13:02
Show difference between two files with lsmod output
# Function to read driver names from an lsmod output file
def read_lsmod_file(file_path):
driver_names = []
with open(file_path, 'r') as file:
for line in file:
# Split each line and take the first column as the module name
columns = line.strip().split()
if columns:
driver_names.append(columns[0])
return driver_names
(gnome-shell:11435): GLib-DEBUG: 01:11:59.832: unsetenv() is not thread-safe and should not be used after threads are created
libmutter-Message: 01:11:59.832: Running GNOME Shell (using mutter 44.3) as a Wayland display server
(gnome-shell:11435): GLib-GIO-DEBUG: 01:11:59.834: Using cross-namespace EXTERNAL authentication (this will deadlock if server is GDBus < 2.73.3)
(gnome-shell:11435): GLib-GIO-DEBUG: 01:11:59.841: _g_io_module_get_default: Found default implementation dconf (DConfSettingsBackend) for ‘gsettings-backend’
(gnome-shell:11435): dconf-DEBUG: 01:11:59.841: watch_fast: "/org/gnome/desktop/interface/" (establishing: 0, active: 0)
(gnome-shell:11435): dconf-DEBUG: 01:11:59.841: watch_fast: "/org/gnome/desktop/privacy/" (establishing: 0, active: 0)
(gnome-shell:11435): dconf-DEBUG: 01:11:59.841: watch_fast: "/org/gnome/mutter/" (establishing: 0, active: 0)
(gnome-shell:11435): dconf-DEBUG: 01:11:59.841: watch_fast: "/org/gnome/mutter/wayland/" (establishing: 0, active: 0)
(gnome-shell:11435): dco
@zeionara
zeionara / greeter.log
Last active November 1, 2023 20:59
GNOME suspension problem
libmutter-Message: 23:29:32.635: Running GNOME Shell (using mutter 44.3) as a Wayland display server
libmutter-Message: 23:29:33.088: Device '/dev/dri/card0' prefers shadow buffer
libmutter-Message: 23:29:33.110: Added device '/dev/dri/card0' (radeon) using non-atomic mode setting.
libmutter-Message: 23:29:33.137: Device '/dev/dri/card1' prefers shadow buffer
libmutter-Message: 23:29:33.138: Added device '/dev/dri/card1' (radeon) using non-atomic mode setting.
libmutter-Message: 23:29:33.147: Created gbm renderer for '/dev/dri/card0'
libmutter-Message: 23:29:33.150: Created gbm renderer for '/dev/dri/card1'
libmutter-Message: 23:29:33.150: Boot VGA GPU /dev/dri/card0 selected as primary
dbus-daemon[2273]: [session uid=32 pid=2273] Activating service name='org.a11y.Bus' requested by ':1.10' (uid=32 pid=2333 comm="/usr/bin/gnome-shell" label="kernel")
dbus-daemon[2273]: [session uid=32 pid=2273] Successfully activated service 'org.a11y.Bus'
@zeionara
zeionara / chess.pas
Created October 27, 2023 11:41
Chess game implementation in pascal
program chess;
label
m,n;
const
wf:array[1..6] of char = ('p','l','k','s','+','*');
bf:array[1..6] of char = ('п','л','к','с','-','#');
dx:array[1..8] of integer = (-2,-1,1,2,2,1,-1,-2);
dy:array[1..8] of integer = (-1,-2,-2,-1,1,2,2,1);
var
ca:array[1..6] of char;
@zeionara
zeionara / parse.py
Created October 12, 2023 13:36
Get lexemes for a word
from pymorphy3 import MorphAnalyzer
morph = MorphAnalyzer()
def parse(item):
return [word.word for word in morph.parse(item)[0].lexeme]
@zeionara
zeionara / observe.ts
Created October 2, 2023 21:39
Track textarea size updates
new ResizeObserver(debounce(refreshLayout, 10)).observe(markupRef.value.$el)
@zeionara
zeionara / go-online.sh
Created June 11, 2023 14:29
Zero tier client is offline
sudo systemctl restart zerotier-one.service
@zeionara
zeionara / setup-swift.sh
Created May 5, 2023 22:14
Install swift toolkit
#!/bin/bash
version=${1:-5.8}
ubuntu=${2:-22.04}
extracted_folder_name_input=swift-$version-RELEASE-ubuntu$ubuntu
extracted_folder_name_output=swift-$version
compressed_data_path=${3:-/tmp/$extracted_folder_name_output.tar.gz}
installation_path=${4:-/usr/local}