Skip to content

Instantly share code, notes, and snippets.

View iRhonin's full-sized avatar
🌱

Arash Fatahzade iRhonin

🌱
  • Nobitex
View GitHub Profile
This file has been truncated, but you can view the full file.
[?2004h
Node name (default=entertaining-farmer):
[?2004l
[2020-12-16T18:28:34Z ERROR golemsp] Interrupted
[2020-12-16T18:29:22Z INFO yagna] Using data dir: "/home/rhonin2/.local/share/yagna"
[2020-12-16T18:29:22Z INFO yagna] Starting yagna service! Version: 0.5.0 (d33058bb 2020-12-01 build #96).
[2020-12-16T18:29:22Z INFO ya_sb_router] Router listening on: 127.0.0.1:7464
[2020-12-16T18:29:22Z INFO ya_persistence::executor] using database at: /home/rhonin2/.local/share/yagna/yagna.db
[2020-12-16T18:29:22Z INFO ya_persistence::executor] using database at: /home/rhonin2/.local/share/yagna/market.db
[2020-12-16T18:29:22Z INFO ya_persistence::executor] using database at: /home/rhonin2/.local/share/yagna/activity.db
@iRhonin
iRhonin / pydantic_phone_number_field.py
Last active August 1, 2024 09:47
Pydantic Phone Number Field
import phonenumbers
from pydantic.validators import strict_str_validator
class PhoneNumber(str):
"""Phone Number Pydantic type, using google's phonenumbers"""
@classmethod
def __get_validators__(cls):
yield strict_str_validator
yield cls.validate
@iRhonin
iRhonin / pydantic_password_field.py
Last active March 17, 2025 05:09
Pydantic Password Field
from typing import Any
from typing import Dict
from typing import Set
from typing import Type
from pydantic import SecretStr
from pydantic.utils import update_not_none
class Password(SecretStr):
@iRhonin
iRhonin / set-apt-proxy.md
Created September 17, 2022 17:16 — forked from wonderbeyond/set-apt-proxy.md
[ubuntu][socks5][proxy] Set proxy for apt

Writing an apt proxy conf file /etc/apt/apt.conf.d/proxy.conf as below.

Acquire::http::Proxy "socks5h://127.0.0.1:1080";
Acquire::https::Proxy "socks5h://127.0.0.1:1080";
Acquire::socks::Proxy "socks5h://127.0.0.1:1080";

And the proxy settings will be applied the next time we run apt.