Skip to content

Instantly share code, notes, and snippets.

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

Vasiliy Bukharev bvp

🏠
Working from home
View GitHub Profile
@iamlostshe
iamlostshe / habr_api.py
Last active September 28, 2025 15:27
Сгружаем статьи с habr.ru
import asyncio
from pathlib import Path
from aiohttp import ClientSession
from bs4 import BeautifulSoup
from html_to_markdown import convert_to_markdown
from loguru import logger
ALLOWED_ALPHABET = " qwertyuiopasdfghjklzxcvbnmйцукенгшщзфывапролджэячсмитьбюхъё"
BASE_URL = "http://habr.com/"
@ihatecsv
ihatecsv / README.md
Last active March 1, 2023 14:14
RGB VSCode
  1. Follow the instructions to install Custom CSS and JS Loader for VSCode

  2. Make a file with the rgbcode.css content, and follow the instructions in the above link to add the file path to the settings.json. For example, mine is:

"vscode_custom_css.imports": ["file:///C:/Users/drake/Documents/rgbcode/rgbcode.css"]
@onegreyonewhite
onegreyonewhite / readme.md
Last active April 6, 2024 17:52
Example of script inventory

Example of script inventory

This is an example script for implementing dynamic inventory in Ansible. It could have been written in bash, but python is much easier to read.

How to use

  1. Copy inventory script to any path like $HOME/test_inventroy.py
  2. Make file executable: chmod +x $HOME/test_inventroy.py
  3. Change store to your needs.
@stillya
stillya / jooq-conventions.gradle.kts
Created November 19, 2022 20:43
It's example of configuration convention plugin for jOOQ+TC+Gradle+Flyway. V2
import nu.studer.gradle.jooq.JooqEdition
import org.jooq.meta.jaxb.ForcedType
import nu.studer.gradle.jooq.JooqGenerate
import org.flywaydb.gradle.task.FlywayMigrateTask
import org.testcontainers.containers.PostgreSQLContainer
plugins {
id("java")
id("org.flywaydb.flyway")
id("nu.studer.jooq")
@TheAndrey
TheAndrey / ReadMe.md
Last active September 4, 2024 13:14
Блокировка самой назойливой рекламы в мире.

Yandex AdBlock

Блокировка самой назойливой рекламы в мире.
Этот user.css старается максимально аккуратно скрывать назойливые рекламные баннеры в сервисах яндекса чтобы не быть обнаруженным.

Яндекс применяет обфуксацию кода рекламных баннеров при обнаружении факта использования блокировщика рекламы, что позволяет ему успешно обходить фильты блокировщиков.

Установка

  1. В вашем браузере должно присутствовать любое расширение, позволяющее устанавливать пользовательские стили. Например, Stylus для Firefox или Chrome.
@itsfolf
itsfolf / vnc.md
Last active August 16, 2025 16:57
How to setup VNC on Wayland (Sway) + SDDM for unattended access

How to setup VNC on Wayland (Sway) + SDDM for unattended access

1. Install both x11vnc and wayvnc

Since SDDM runs under X11 we will be running two separate vnc services, each on it's own port. x11vnc will take care of SDDM, while wayvnc will handle our desktop session. Both services are set up with SSL encryption.

While it's technically possible to run a single service with some scripting magic to switch between the two, this was by far the easiest and most reliable way.

2. Set up x11vnc

Set a password

So it's been a while since I set up a #FreeBSD desktop from scratch, and things have gotten easier? :rising-intonation: :confused-dog-face: Curious? Read on!

Maybe I overcomplicated things last time (you can see the script here https://bit.ly/freebsd-bootstrap), it seems some steps are now redundant. Anyway, here's the simplest way I know to get a capable desktop system set up.

I'm doing this on an M1 Mac with VMware Fusion Tech Preview and FreeBSD 13.1-RELEASE. After (or during) install create a user and add it to the groups video, wheel and operator with

% pw usermod $USER -G wheel,operator,video
@mateuszkwiatkowski
mateuszkwiatkowski / vscode-remote-ssh-freebsd.md
Last active October 8, 2025 19:18
Configure FreeBSD to work with VScode's remote ssh extension

This procedure was tested on FreeBSD-CURRENT build from d8819d88af52.

  1. Enable linuxulator and install linux userland:
    # sysrc linux_enable="YES"
    # service linux start
    # pkg install linux_base-c7
    
@Mostly-BSD
Mostly-BSD / FreeBSD-Nvidia-510.md
Last active August 17, 2025 08:48
Step-by-step instructions on installing the latest NVIDIA drivers on FreeBSD 13.0 and above.

How to get the Latest NVIDIA drivers on FreeBSD

Step-by-step instructions on installing the latest NVIDIA drivers on FreeBSD 13.0 and above.

1.0 Clean Up Existing Drivers

IMPORTANT: Log out of X session. Make sure you Desktop Manager (sddm|slim) is off. You need to be on the console.

# Create a boot env incase we need to rollback
sudo bectl create `date +%Y%m%d`-BeforeNvidia-Upgrade
@sussycatgirl
sussycatgirl / mailcow_wg.md
Created February 27, 2022 14:49
Tunneling a Mailcow server through a remote server using Wireguard

Tunneling a Mailcow server through Wireguard

Mailcow is a easy to set up Mailserver running in Docker.

Unfortunately, most ISPs block port 25. In addition to that, residential IP addresses are generally blacklisted, making it impossible to self-host a mailserver at home. Mailcow by itself requires at least 6GB of RAM, which makes hosting it on a VPS rather expensive.

The solution: Running Mailcow at home and tunneling it's traffic through a cheap VPS.

The final setup will look like this: