Skip to content

Instantly share code, notes, and snippets.

View byk0t's full-sized avatar

Pavel K. byk0t

  • Belarus, Spain, Europe, Earth
View GitHub Profile
@byk0t
byk0t / info.md
Created March 30, 2024 11:12
Ubuntu .desktop files locations

Check those directories:

  • ~/.local/share/applications/
  • /usr/share/applications/
@byk0t
byk0t / solution.md
Last active January 11, 2024 19:26
Python on Windows: fixing ".venv\Scripts\Activate.ps1cannot be loaded because running scripts is disabled on this system."
  1. Open PowerShell
  2. Run: Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy Unrestricted
@byk0t
byk0t / solution.md
Created October 12, 2023 17:58
Fixing libgdx androidx gradle build error

Libgdx team has fixed this issue in the latest SNAPSHOT version. To use it we should update gdxVersion variable in build.gradle file: gdxVersion = '1.12.1-SNAPSHOT'

@byk0t
byk0t / solution.sh
Created September 14, 2023 11:07
Fixing scaling/resing for libgdx gdx-setup.jar on high resolution ubuntu/linux display
java -Dsun.java2d.uiScale=2.0 -jar gdx-setup.jar
@byk0t
byk0t / solution.md
Last active November 29, 2022 12:04
Apache Superset permissions for Public role, manually or through cli
  1. You can add these permissions through superset ui.
  2. Or you can import them from the json file using superset cli: superset fab import-roles -p superset-public-permissions.json
  3. Tested with iframes in versions 1.3 and 1.5

  • can_read on DashboardFilterStateRestApi|
  • can_read on Dataset
  • can_read on Dashboard
  • can_read on CssTemplate
  • can_read on SavedQuery
@byk0t
byk0t / solution.sh
Last active May 14, 2022 23:46
libpcre3 error during libgtk-4-dev installation on ubuntu 22.04
# libgtk4 needed libpcre3 2:8.39-13build5, but on my ubuntu was installed 2:8.43-1+ubuntu19.10.1+deb.sury.org+1
# so, in my case the issue was fixed by downgrading libpcre3 to a needed version
# here is an algorithm
# Downgrade libpcre3
sudo apt-get install libpcre3=2:8.39-13build5
# Install libgtk-4-dev
sudo apt-get install libgtk-4-dev
@byk0t
byk0t / gist:65742db4a7f01ed858398e4ebea1382a
Created May 7, 2022 12:18
ubuntu 20.04: fixing stucked (freezed) cursor issue
I have found this working solution on this stackexchange thread https://askubuntu.com/a/1335747
1. sudo nano /etc/gdm3/custom.conf
2. Uncomment WaylandEnable=false
3. sudo service gdm restart
@byk0t
byk0t / solution.txt
Created November 5, 2021 22:11
Fixing Steam freezing on Ubuntu 20.04
Start steam from command line:
DRI_PRIME=1 steam
@byk0t
byk0t / chromedriver_test.md
Last active April 17, 2021 14:12
Using chromedriver binary in Selenium on MacOS
  1. Download the driver from https://chromedriver.chromium.org/downloads
  2. Unzip it somewhere and you get a binary named chromedriver
  3. Make this file trusted by MacOS: xattr -d com.apple.quarantine chromedrive
  4. You can test the result with the next python snippet:
    from selenium import webdriver
    driver = webdriver.Chrome('chromedriver')
    

driver.get('http://google.com')```

@byk0t
byk0t / install.sh
Created February 17, 2021 16:58
Install psycopg2 on a new M1 Mac
brew install postgresql
brew link openssl
export LDFLAGS="-L/opt/homebrew/opt/openssl@1.1/lib"
export CPPFLAGS="-I/opt/homebrew/opt/openssl@1.1/include"
export PKG_CONFIG_PATH="/opt/homebrew/opt/openssl@1.1/lib/pkgconfig"
pip install psycopg2-binary