Skip to content

Instantly share code, notes, and snippets.

View tim77's full-sized avatar

Artem Polishchuk tim77

View GitHub Profile
@e7d
e7d / remove-obsolete-gpg-key-from-dnf.md
Last active June 26, 2024 11:37
Remove obsolete GPG key from DNF (Fedora)
@gasinvein
gasinvein / flatpak-cleanup-local-repo.py
Last active November 16, 2021 16:21
Remove all refs from a local flatpak repository, except installed ones
#!/usr/bin/env python3
import argparse
import logging
import subprocess
import typing as t
import gi
gi.require_version('GLib', '2.0')
gi.require_version('Gio', '2.0')
@gasinvein
gasinvein / flatpak-remote-metadata.py
Last active March 27, 2021 13:41
Retrieves all apps metadata from flathub and prints it as json array
#!/usr/bin/env python3
import json
import sys
import re
import gi
gi.require_version("GLib", "2.0")
gi.require_version("Flatpak", "1.0")
@ZaWertun
ZaWertun / colors_konsole2alacritty.rb
Last active August 19, 2023 15:34
Script to convert Konsole color schema to Alacritty color schema
require 'yaml'
def parse_ini(lines)
data = {}
section = nil
lines.each do |line|
if line =~ /\[(.+)\]/
section = $1
elsif section && line =~ /(.+)=(.*)/
data[section] ||= {}

glxgears

Однопоточное расширение списка случайными числами, Debian 9, memtotal=10G, swap on zram 10G.

None

54s
299 frames in 5.0 seconds = 59.679 FPS
161 frames in 5.7 seconds = 28.364 FPS
1 frames in 29.5 seconds =  0.034 FPS
@hakavlad
hakavlad / comparison.md
Last active November 15, 2020 13:26
Low-memory handlers comparison case

Low-memory handlers comparison case

None vs uresourced vs prelockd vs memavaild

Running tail /dev/zero on Fedora 33 Workstation on VM

MemTotal=3.8G, SwapTotal=7.7G (2 MemTotal), swap on zram

vm.swappiness=100, vm.min_free_kbytes=40225

Look at the memory and swap lines on the system monitor. Smooth lines mean more responsiveness.

None

@hakavlad
hakavlad / memavaild.md
Last active November 21, 2020 22:51
Настройка memavaild для сохранения отзывчивости при запуске жирных фоновых процессов

Настройка memavaild 0.6 для сохранения отзывчивости при запуске жирных фоновых процессов

Конфигурация memavaild.conf

Для соответствующей настройки memavaild нужно добавить в конфиг /etc/memavaild.conf следующую строку:

@LIMIT  CGROUP=user.slice/user-$UID.slice/user@$UID.service/idle.slice  MIN_MEM_HIGH_PERCENT=5  RELATIVE_SHARE=0.2

Добавляем alias

@probonopd
probonopd / Wayland.md
Last active June 30, 2024 13:49
Think twice about Wayland. It breaks everything!

Think twice before abandoning Xorg. Wayland breaks everything!

Hence, if you are interested in existing applications to "just work" without the need for adjustments, then you may be better off avoiding Wayland.

Wayland solves no issues I have but breaks almost everything I need. Even the most basic, most simple things (like xkill) - in this case with no obvious replacement. And usually it stays broken, because the Wayland folks mostly seem to care about Automotive, Gnome, maybe KDE - and alienating everyone else (e.g., people using just an X11 window manager or something like GNUstep) in the process.

Wayland proponents make it seem like Wayland is "the successor" of Xorg, when in fact it is not. It is merely an incompatible alternative, and not even one that has (nor wants to have) feature parity (missing features). And unlike X11 (the X Window System), Wayland protocol designers actively avoid the concept of "windows" (making up incompr

@gasinvein
gasinvein / flathub_stats.py
Last active April 24, 2020 11:59
Retrieve download counts per day for given apps on Flathub and saves it to CSV
#!/usr/bin/python3
from urllib import request
from urllib.error import HTTPError
import json
import csv
import datetime
import os
import argparse
import logging
@contyk
contyk / use-macros.md
Last active April 27, 2020 14:04
Fedora Feature Macros

Fedora Feature Macros

Fedora feature macros (also dubbed USE macros) provide a simple way to configure common package build-time options, affecting available features, dependencies, or subpackages provided.

Reasoning

Packages are the main building blocks of our distribution. Introducing build-time, configurable options allows for additional packaging flexibility, greater potential testing, encourages cleaner dependencies and passing explicitly defined build-time options preventing unexpected build results when upstream defaults or the build environment change. Futhermore it gives our users, as well as downstream distributions or other variants, freedom to easily rebuild our packages without modification simply by adjusting the macros they provide.

USE macros define build features in a uniform manner for the entire buildroot and can be defined either globally or per package, enabling the usage of package-specific, non-standard features or explicit overrides of the default settings. The advantage of