Skip to content

Instantly share code, notes, and snippets.

View konarev's full-sized avatar

Alexander Konarev konarev

  • Krasnodar, Russia
  • 11:44 (UTC +03:00)
View GitHub Profile
@konarev
konarev / fix-infinality.md
Created March 11, 2017 15:16 — forked from cryzed/fix-infinality.md
A set of instructions on how to fix the harfbuzz + Infinality issue and restoring good-looking, Infinality-like font rendering.

Disclaimer: Please follow this guide being aware of the fact that I'm not an expert regarding the things outlined below, however I made my best attempt. A few people in IRC confirmed it worked for them and the results looked acceptable.

Attention: After following all the steps run gdk-pixbuf-query-loaders --update-cache as root, this prevents various gdk-related bugs that have been reported in the last few hours. Symptoms are varied, and for Cinnamon the DE fails to start entirely while for XFCE the icon theme seemingly can't be changed anymore etc.

Check the gist's comments for any further tips and instructions, especially if you are running into problems!

Screenshots

Results after following the guide as of 11.01.2017 13:08:

# Maintainer: Patrick Burroughs (Celti) <celti@celti.name>
pkgname=nuvolaplayer
_pkgname=nuvolaruntime
pkgver=3.0.8
pkgrel=1
arch=('i686' 'x86_64')
license=('GPL')
pkgdesc='Cloud music integration for your Linux desktop.'
pkgname=diorite
pkgver=0.2.2
pkgrel=1
pkgdesc="Utility and widget library based on Glib and GTK3."
arch=('i686' 'x86_64')
url="https://github.com/tiliado/diorite"
license=('GPL')
provides=('diorite')
depends=('python' 'vala' 'glib2' 'gtk3')
source=(https://github.com/tiliado/${pkgname}/archive/${pkgver}.tar.gz)
@konarev
konarev / gist:0c8dda014ab0c87403f356a52b48c61a
Created February 1, 2018 07:00
~/.config/compton.conf
backend = "glx";
paint-on-overlay = true;
glx-no-stencil = true;
vsync = "opengl-swc";
unredir-if-possible = true;
# Shadow
shadow = true; # Enabled client-side shadows on windows.
no-dock-shadow = true; # Avoid drawing shadows on dock/panel windows.
no-dnd-shadow = true; # Don't draw shadows on DND windows.
@konarev
konarev / docker-cleanup-resources.md
Created February 21, 2018 14:15 — forked from bastman/docker-cleanup-resources.md
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see: https://github.com/chadoe/docker-cleanup-volumes

$ docker volume rm $(docker volume ls -qf dangling=true)

$ docker volume ls -qf dangling=true | xargs -r docker volume rm

Google Drive Sync Wine Scripting

This is a set of scripts that help running Google Drive Backup and Sync under Wine, with multiple Google accounts.

Each account is given its own Wine prefix (a separate wine configuration).

To install, run install-gdrive-sync google_account

List the accounts set up in ~/.config/gdrive-accounts

@konarev
konarev / WSL-ssh-server.md
Created January 6, 2020 20:15 — forked from dentechy/WSL-ssh-server.md
A step by step tutorial on how to automatically start ssh server on boot on the Windows Subsystem for Linux

How to automatically start ssh server on boot on Windows Subsystem for Linux

Microsoft partnered with Canonical to create Bash on Ubuntu on Windows, running through a technology called the Windows Subsystem for Linux. Below are instructions on how to set up the ssh server to run automatically at boot.

  1. Edit the /etc/ssh/sshd_config file by running the command sudo vi /etc/ssh/sshd_config and do the following
    1. Change Port to 2222 (or any other port above 1000)
    2. Change PasswordAuthentication to yes. This can be changed back to no if ssh keys are setup.
  2. Restart the ssh server:
    • sudo service ssh --full-restart
  3. With this setup, the ssh server must be turned on every time you run Bash on Ubuntu on Windows, as by default it is off. Use this command to turn it on:
@konarev
konarev / gist:deef14c43e8449b1ffca05a08f7ec9e6
Last active June 2, 2020 08:19
OpenWrt: Точечный обход блокировок
https://habr.com/ru/post/317354/#comment_9958456
Выгрузка ip адресов с rublacklist, должен выполняться по крону каждые n-минут/часов/дней:
#!/bin/sh
TARGET_SET=vpn-whitelist
TARGET_TMP=vpn-whitelist-tmp
ipset destroy -q ${TARGET_TMP} || true
ipset create -q ${TARGET_SET} hash:ip || true
ipset create ${TARGET_TMP} hash:ip

Исходные данные: роутер имеет адрес 192.168.1.1, tor и i2pd подняты на 192.168.1.10 (если роутер достаточно мощный, можно поднять их прямо на нём, соответственно скорректировав адреса)

В LEDE для загрузки списка заблокированных доменов проще всего использовать поставляемую по умолчанию утилиту uclient-fetch. Необходимо лишь добавить ей поддержку SSL:

opkg update
opkg install libustream-mbedtls

Впрочем, вы можете использовать wget или curl, если предпочитаете. Особенности wget см. ниже.

https://stackoverflow.com/a/30071634
Download MSYS2 from this page (choose 32 or 64-bit according to what version of Windows you are going to use it on, not what kind of executables you want to build, both versions can build both 32 and 64-bit binaries).
After the install completes, click on the newly created "MSYS2 Shell" option under either MSYS2 64-bit or MSYS2 32-bit in the Start menu. Update MSYS2 according to the wiki (although I just do a pacman -Syu, ignore all errors and close the window and open a new one, this is not recommended and you should do what the wiki page says).
Install a toolchain
a) for 32-bit:
pacman -S mingw-w64-i686-gcc
b) for 64-bit:
pacman -S mingw-w64-x86_64-gcc