Skip to content

Instantly share code, notes, and snippets.

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 / scrapers-parsers.md
Last active Dec 28, 2021
Scrapers, Parsers, Spiders
View scrapers-parsers.md
@sxiii
sxiii / run-satisfactory-linux.md
Created Dec 20, 2021
Run Satisfactory on Linux (Arch, Garuda, Manjaro)
View run-satisfactory-linux.md

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 Dec 19, 2021
Nvidia Arch Linux DXVK Debug (run World War Z Aftermatch on Arch Linux with hardware directx/proton acceleration)
View nvidia-archlinux-dxvk-debug.md

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 Dec 6, 2021
Convert ZIP with Windows filepaths to Linux (/ instead of \)
View convert-zip-win-lin.sh
# 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 Feb 19, 2022
Linux - v4l2-ctl - Load Webcam Settings From Text File (saved by camset)
View cliread.py
#!/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 Oct 24, 2021
Install MRTG into Arch
View mrtg-install-arch.md

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 Sep 26, 2021
How to add Windscribe VPN to OpenRC (rc init service, rc-service)
View windscribe-openrc.md

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"
View p2p-vpns.md
@sxiii
sxiii / README-Remove-Locales.md
Last active May 14, 2022
Remove Unnecessary Locales Fedora
View README-Remove-Locales.md

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

@sxiii
sxiii / README.md
Created Jul 31, 2021
Fedora 34 AMDGPU OpenCL Pro Driver (Based On Ubuntu Driver)
View README.md

If you need to get working OpenCL on AMD Navi on Fedora, follow this steps:

sudo dnf -y groupinstall 'RPM Development Tools'
rpmdev-setuptree
cd ~/rpmbuild/SOURCES
wget --referer https://support.amd.com/en-us/kb-articles/Pages/AMDGPU-PRO-Driver-for-Linux-Release-Notes.aspx https://drivers.amd.com/drivers/linux/amdgpu-pro-20.45-1188099-ubuntu-20.04.tar.xz
cd ~/rpmbuild/SPECS
git clone https://github.com/secureworkstation/rpm-amdgpu-pro-opencl amdgpu-pro-opencl
cd amdgpu-pro-opencl
rpmbuild -ba amdgpu-pro-opencl.spec