Skip to content

Instantly share code, notes, and snippets.

View alberand's full-sized avatar
🏠
Working from home

Andrew Albershtein alberand

🏠
Working from home
View GitHub Profile
@alberand
alberand / iptables.rules
Last active November 13, 2023 17:45
NixOS VPN Split tunnel with Wireguard and OpenVPN
${pkgs.iptables}/bin/iptables -A INPUT -s 19.29.79.10 -d 192.168.0.100 \
-m state --state NEW,ESTABLISHED -j ACCEPT
${pkgs.iptables}/bin/iptables -I OUTPUT -s 192.168.0.100 -d 19.29.79.10 \
-m state --state NEW,ESTABLISHED -j ACCEPT
@alberand
alberand / .config
Last active February 9, 2024 14:17
kernel-config-xfstests
#
# Automatically generated file; DO NOT EDIT.
# Linux/x86 6.6.0-rc3 Kernel Configuration
#
CONFIG_CC_VERSION_TEXT="gcc (GCC) 12.2.0"
CONFIG_CC_IS_GCC=y
CONFIG_GCC_VERSION=120200
CONFIG_CLANG_VERSION=0
CONFIG_AS_IS_GNU=y
CONFIG_AS_VERSION=24000
@alberand
alberand / dnf-fail-update-itself.md
Last active June 26, 2023 09:55
Fedora - DNF fails to update itself

If you get following error while running dnf update or dnf upgrade:

Problem: The operation would result in removing the following protected packages: dnf

Then, it could be solved by installing newer version of dnf by explicitily specifying the version. Find out which version you need:

FSTYP=ext4
[xfs_1k]
KEEP_DMESG=yes
USE_KMEMLEAK=no
RESULT_BASE=/root/results
TEST_DIR=/mnt/test
SCRATCH_MNT=/mnt/scratch
MKFS_OPTIONS="-f -b size=1024"
FSTYP=xfs
@alberand
alberand / tiktok-gifts-list.json
Created February 19, 2022 15:15
[02.2022] TikTok Stream Gifts list
{
"gifts": [
{
"action_type": 0,
"app_id": 0,
"business_text": "",
"color_infos": [],
"combo": false,
"deprecated10": false,
"deprecated11": false,
@alberand
alberand / prague-districts.py
Last active May 8, 2020 13:10
Python dictionary with all Prague districts
districts = {
'Praha 1': [
'Praha 1'
],
'Praha 2': [
'Praha 2'
],
'Praha 3': [
'Praha 3'
],
@alberand
alberand / selenium_sandbox.py
Created February 12, 2019 08:30
Selenium sandbox
# -*- coding: utf-8 -*-
import time
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.chrome.options import Options
from selenium.webdriver.common.by import By
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.firefox.firefox_binary import FirefoxBinary