Skip to content

Instantly share code, notes, and snippets.

View sxiii's full-sized avatar
🐧
Ask me any questions on free and open source software!

Dennis Ivanov sxiii

🐧
Ask me any questions on free and open source software!
View GitHub Profile
@sxiii
sxiii / gist:f5f092d024748107a973d52f2381aab0
Last active January 7, 2024 17:04
Fix OpenSCAD Dark Theme and other wrong GTK / QT styles on Garuda Linux (probably arch as well)
Super easy fix - first, install qt5ct and do a test openscad launch like this:
```
QT_STYLE_OVERRIDE=qt5ct-style openscad
```
Instead of `qt5ct-style` you can use any of your own installed styles (some examples might be: kvantum-dark, kvantum, Fusion)
Which styles are installed you can check by running `qt5ct` or use kvantum as theme and then choose theme in kvantummanager.
Might work with some other apps GTK/QT apps, too.
@sxiii
sxiii / scrapers-parsers.md
Last active December 28, 2021 09:22
Scrapers, Parsers, Spiders
@sxiii
sxiii / run-satisfactory-linux.md
Created December 20, 2021 16:50
Run Satisfactory on Linux (Arch, Garuda, Manjaro)

To properly run Satisfactory on Linux, only one change is needed.

Add this:

[/script/windowstargetplatform.windowstargetsettings]
DefaultGraphicsRHI=DefaultGraphicsRHI_Vulkan

Into the file $HOME/.steam/steam/steamapps/compatdata/526870/pfx/drive_c/users/steamuser/Local Settings/Application Data/FactoryGame/Saved/Config/WindowsNoEditor/Engine.ini

Run the game from Steam as usual without nay more tweaks.

@sxiii
sxiii / nvidia-archlinux-dxvk-debug.md
Last active December 19, 2021 05:50
Nvidia Arch Linux DXVK Debug (run World War Z Aftermatch on Arch Linux with hardware directx/proton acceleration)

Story

I've got some games stopped working on ArchLinux (Garuda) via Steam -> Vulkan/Proton -> DXVK It was hard to debug but finally I did it

Originally I tried to reinstall steam, game, proton, try different versions etc but nothing helped At some point I found out that game launches with PROTON_USE_WINED3D=1 %command% argument in steam game properties However, the performance of the game was really bad and textures was kinda wrong and too dark

So I found out the problem: Nvidia does not like amd vulkan files to be installed.

@sxiii
sxiii / convert-zip-win-lin.sh
Created December 6, 2021 20:16
Convert ZIP with Windows filepaths to Linux (/ instead of \)
# Convert ZIP archive with Windows paths inside it to UNIX paths (backslashes \ to normal slashes / in paths)
# You need 7zip package for that matter
# Archive in this example is called windows.zip -> don't forget to change it in two places
# The script works well even with large files (I tested on 8 GB file; it took couple of seconds)
# Resuling file can be unpacked OK with normal Linux tools
7z rn windows.zip $(7z l windows.zip | grep '\\' | awk '{ print $6, gensub(/\\/, "/", "g", $6); }' | paste -s)
@sxiii
sxiii / cliread.py
Last active February 19, 2022 18:58
Linux - v4l2-ctl - Load Webcam Settings From Text File (saved by camset)
#!/usr/bin/python
# Back story
# v4l2-cli by itself does not accept config file
# camset allows us to save setting to text file, but it requires GUI to load it, which is inconvinient
# What I've done
# So I've written script that allows us to load settings from the config file, created with camset earlier
# Code is based on Camset (https://github.com/azeam/camset/)
# Run like: `python cliread.py myconfig.txt` (using myconfig.txt saved by camset)
# Change card to fit your video device
@sxiii
sxiii / mrtg-install-arch.md
Last active October 24, 2021 00:08
Install MRTG into Arch

Let's say you want to install MRTG to Archlinux...

  1. First things first, you need Apache, PHP, PHP-GD, GD library on itself. sudo pacman -S gd autoconf apache php-gd perl
  2. Install development version of GD: pikaur -S gd-git (instead of pikaur you can use yay or any other AUR helper)
  3. Then enable mod_fcgi in Apache: https://wiki.archlinux.org/title/Apache_HTTP_Server/mod_fcgid

I will not include this in the manual as this is covered by ArchWiki and a lot of articles

  1. After that, you can either follow steps here: https://wiki.archlinux.org/title/Multi_Router_Traffic_Grapher or here:
  2. Add mrtg user:
@sxiii
sxiii / windscribe-openrc.md
Created September 26, 2021 22:51
How to add Windscribe VPN to OpenRC (rc init service, rc-service)

Using Artix Linux or any other OpenRC-based distro?

It's pretty easy to add Windscribe to OpenRC:

  1. sudo nano /etc/init.d/windscribe Paste the following into the file and save it with ctrl+o; enter:
#!/usr/bin/openrc-run

name=$RC_SVCNAME
description="Windscribe VPN CLI Service"
@sxiii
sxiii / p2p-vpns.md
Created September 10, 2021 07:13
P2P VPN List
@sxiii
sxiii / README-Remove-Locales.md
Last active March 8, 2024 17:41
Remove Unnecessary Locales Fedora

Small guide that helps to free up space by removing unneccessary locales from Fedora
With some additional information on how to make more space on your system (advices in the end)
Tried on Fedora 34, but should work on other distros as well (RPM-Based?)

Step 0. Bonus step -- check available space before procedure:

df -lh

Step 1. Enter the locales directory

cd /usr/share/locale/

Step 2. Check that there is files to remove

ls