Skip to content

Instantly share code, notes, and snippets.

@TBog
TBog / !readme.md
Last active March 7, 2024 00:04
Chage Garuda Arch linux distribution zram configuration
@TBog
TBog / android.log
Created December 23, 2023 20:03
logcat TBLauncher restart delay
01:56:41.182 29163-29163 HwViewRootImpl I removeInvalidNode all the node in jank list is out of time
01:56:46.218 29163-29163 I removeInvalidNode all the node in jank list is out of time
01:56:52.759 29163-29163 I removeInvalidNode all the node in jank list is out of time
01:57:01.792 29163-29163 I removeInvalidNode all the node in jank list is out of time
01:57:06.325 29163-29163 I removeInvalidNode all the node in jank list is out of time
01:57:24.958 29163-29163 I removeInvalidNode all the node in jank list is out of time
01:57:37.036 29163-29163 I removeInvalidNode all the node in jank list is out of time
01:57:45.599 29163-29163 I removeInvalidNode all the node in jank list is out of time
01:57:48.609 29163-29163
@TBog
TBog / !readme.md
Created July 10, 2023 09:42
Fake USB-Flash or SD-card

In recent years, the trend of cheating customers by unscrupulous Chinese sellers is gaining momentum with enormous speed.

H2testw

With H2testw, you can write and read how much data the storage device is actually capable of holding. This can work with network drives, hard drives, SD cards and USB sticks. https://www.softpedia.com/get/System/System-Miscellaneous/H2testw.shtml

AxoFlashTest

You'll need Administrator rights to run it, but thanks to this the process of testing is so fast that you'll be provided with the real information about your media health and speed in about 5 minutes. You can measure speed of your media and you can recover it in one click if it's fake. https://flashtest.alexkhoroshev.ru/?lang=en

#!/usr/bin/env bash
#####
# Generate a PNG file to use in i3lock
# we have 2 monitors
# 1. resolution 1440x2560 at offset +0+0
# 2. resolution 1920x1200 at offset +1440+1100
#####
# get 2 random files from this folder
@TBog
TBog / !readme.md
Created April 18, 2022 12:39
How to determine which packages need upgrading in Arch Linux

How to see what packages need an update without side-effects

The reason for not running pacman -Sy is to avoid installing packages from different package database updates.

Example: It's 5 days later when you've forgotten you ran pacman -Sy and run pacman -S nvidia that you're likely to break something

Solution

source The bash script checkupdates, included with the pacman-contrib package, provides a safe way to check for upgrades to installed packages without running a system update at the same time.

see: System maintenance

@TBog
TBog / !readme.md
Last active February 23, 2022 11:57
Screen region OCR

How can instantaneously extract text from a screen area using OCR tools?

  1. copy screen_region_ocr.sh file to your home folder
  2. chmod +x ~/screen_region_ocr.sh to make it executable
  3. copy screen_region_ocr.desktop to ~/.local/share/applications/ (change Exec path)

Dependencies: tesseract imagemagick spactacle xsel

You can now run Screen Region OCR from your application launcher, select a screen region then paste (Ctrl+V) the OCRed text where you need it

The next time X crashes, don't hit the hard reset button before trying a few other things first:

Try shutting down X gracefully with <Ctrl>+<Alt>+<Backspace>. You may have to first reconfigure your OS to re-enable this key combo, which recent distros have turned off by default. Instructions here: http://askubuntu.com/questions/367983/how-do-i-enable-ctrl-alt-backspace-to-kill-the-x-server If that doesn't work, try switching to a TTY console with <Ctrl>+<Alt>+<F1> and do:

reboot

or

poweroff
@TBog
TBog / replay.sh
Last active May 12, 2021 10:15
Replay an upgarde log. Send log archive name as parameter.
#!/bin/bash
UNPACK_THEN_EXIT=""
CLEANUP="yes"
TIMING="yes"
filename=""
POSITIONAL=()
while [[ $# -gt 0 ]]
do
@TBog
TBog / !readme.md
Last active April 28, 2021 10:01
Ideapad 5 15alc05