Skip to content

Instantly share code, notes, and snippets.

View ErykDarnowski's full-sized avatar
🔧
Tinkering

Eryk Darnowski ErykDarnowski

🔧
Tinkering
View GitHub Profile
@ErykDarnowski
ErykDarnowski / README.md
Last active May 19, 2023 06:13
Node check files amount vs each file (`access`) vs each file (`readdir`) - benchmark

Node check files amount vs each file (access) vs each file (readdir) - benchmark

image

Usage

  1. Download all files
git clone https://gist.github.com/ErykDarnowski/2fa0d64d44f1d5616fa9d0851f60c135 'Node check files amount vs access vs readdir - benchmark'
@ErykDarnowski
ErykDarnowski / README.md
Created May 12, 2023 23:13
How to install an `.rpm` file on Fedora Linux

How to install an .rpm file on Fedora Linux

  1. Download the file (here I'm using rustdesk as an example):
wget https://github.com/rustdesk/rustdesk/releases/download/1.1.6/rustdesk-1.1.6-fedora28-centos8.rpm
  1. Install the package:
@ErykDarnowski
ErykDarnowski / README.md
Last active December 5, 2023 18:00
GOG % rating converter [Userscript]

GOG % rating converter [Userscript]

A script that converts gog.com ratings from: 4.5 / 5 to: 90%.

Instructions

  1. Install a Userscript browser extension
@ErykDarnowski
ErykDarnowski / README.md
Last active June 15, 2023 07:17
How to easily, quickly and temporarily (without playing around with `mount` and `fstab`) mount a filesystem on Linux

How to easily, quickly and temporarily (without playing around with mount and fstab) mount a filesystem on Linux

  1. Install sshfs

    apt (Ubuntu / Debian / Mint)
    sudo apt update -y
    sudo apt upgrade -y
    
@ErykDarnowski
ErykDarnowski / README.md
Last active May 12, 2023 17:04
What does Fedora's `rpm -E` do

What does Fedora's rpm -E do

According to the rpm man page, the --eval flag is used to print the macro expansion of an expression³. This means that when you use this flag with an expression, rpm will evaluate any macros present in the expression and print the result (you can see an example of this in the RPM Fusion repos' install commands).

Bing

Resources

@ErykDarnowski
ErykDarnowski / README.md
Created May 1, 2023 13:59
How to install `sftp` on Linux

How to install sftp on Linux

The package is simply automatically installed with openssh, so it can't be installed alone! 😅

apt (Ubuntu / Debian / Mint)
sudo apt update -y
sudo apt upgrade -y
@ErykDarnowski
ErykDarnowski / README.md
Last active May 1, 2023 13:36
How to setup & use `mitmproxy` on Linux + Firefox / iOS

How to setup & use [mitmproxy][1] on Linux + Firefox / iOS

  1. Install it

    apt (Ubuntu / Debian / Mint)
    sudo apt update -y
    sudo apt upgrade -y
@ErykDarnowski
ErykDarnowski / fix.sh
Last active May 1, 2023 14:03
How to fix `/bin/bash^M: bad interpreter: No such file or directory` error (not being able to execute a `.sh` file because of Window's line endings)
sed -i -e 's/\r$//' <name_of_file>
@ErykDarnowski
ErykDarnowski / README.md
Last active April 30, 2023 11:38
How to install `tesseract` OCR for any langauge on Linux

How to install tesseract OCR for any langauge on Linux

Simply replace <lang> with a valid language code!

apt (Ubuntu / Debian / Mint)
sudo apt update -y
sudo apt upgrade -y
@ErykDarnowski
ErykDarnowski / README.md
Last active April 11, 2024 01:03
Print multi-line output one the same line

Print multi-line output one the same line

output

Instructions

NEW

Soo, after finding out about xargs I got this solution instead 😅: