Skip to content

Instantly share code, notes, and snippets.

View ryzhovau's full-sized avatar
💤
I may be slow to respond.

Alexander Ryzhov ryzhovau

💤
I may be slow to respond.
View GitHub Profile
@ryzhovau
ryzhovau / Aegis-Bitwarden.ps1
Last active May 15, 2023 18:27
Aegis → Bitwarden Migration
<#
.SYNOPSIS
Converts Aegis data file to Bitwarden format
.DESCRIPTION
This is a way to import Aegis TOTP records to Bitwarden
.NOTES
* Export unencrypted *.JSON file from Aegis App
* Edit $AegisExportFile
* Run script
* Import *.JSON.Bitwarden.csv as Bitwarden CSV format
# Creds goes to https://github.com/farag2/Office
# It is needed to remove these keys not to bypass Russian and Belarusian region blocks
Remove-Item -Path HKCU:\SOFTWARE\Microsoft\Office\16.0\Common\Experiment -Recurse -Force -ErrorAction Ignore
Remove-Item -Path HKCU:\SOFTWARE\Microsoft\Office\16.0\Common\ExperimentConfigs -Recurse -Force -ErrorAction Ignore
Remove-Item -Path HKCU:\SOFTWARE\Microsoft\Office\16.0\Common\ExperimentEcs -Recurse -Force -ErrorAction Ignore
# Set location to Ukraine
Set-WinHomeLocation -GeoId 241
@ryzhovau
ryzhovau / extract_cities_from_tg_posts.py
Last active November 12, 2021 05:29
Выделение нормализованных названий городов из Telegram-сообщений и вывод наиболее часто встречающиеся. Использует библиотеку natasha для native language processing'а https://habr.com/ru/post/516098/
#!/usr/bin/env python3
import json, re
from collections import Counter
from natasha import (
Segmenter,
MorphVocab,
NewsEmbedding,
NewsMorphTagger,
@ryzhovau
ryzhovau / gist:505785a38d4abb81ca78355e49f8a8af
Last active January 31, 2019 06:14
qt5, entware, built libs sizes
~/Entware/build_dir/target-mipsel_mips32r2_glibc-2.27/qt-everywhere-src-5.12.0$ find . -name *.so -exec du -hLs {} \;
384K ./qtbase/lib/libQt5Sql.so
440K ./qtbase/lib/libQt5Test.so
1.8M ./qtbase/lib/libQt5Network.so
7.9M ./qtbase/lib/libQt5Core.so
36K ./qtbase/lib/libQt5Concurrent.so
320K ./qtbase/lib/libQt5Xml.so
1.4M ./qtbase/plugins/sqldrivers/libqsqlite.so
136K ./qtbase/plugins/bearer/libqgenericbearer.so
4.0K ./qtbase/tests/auto/corelib/plugin/qpluginloader/elftest/garbage5.so
@ryzhovau
ryzhovau / Makefile
Created December 28, 2018 07:48
dnscrypt-proxy2 with BUILD_VARIANT
#
# Copyright (C) 2011-2018 Entware
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=dnscrypt-proxy2
@ryzhovau
ryzhovau / configs_compare.sh
Created December 25, 2018 07:41
Entware configs comparison
#!/bin/sh
if [ -z "$1" ]; then
echo 'Please, provide target config for comparison with others.'
exit 1
fi
grep -h '^CONFIG' ~/Entware/configs/*.config | sort | uniq > /tmp/all.config
grep '^CONFIG' $1 | sort > /tmp/target.config
@ryzhovau
ryzhovau / Optware_start_scripts.txt
Created April 8, 2018 18:03
Optware start scripts list. We keep it to give Entware start scripts the same names
K12myrapbookd
K30qpopper
K31postfix
K41cyrus-imapd
K70mysqld
K80squid
myrapbookd
S01denyhosts
S01modutils
S01ntop
@ryzhovau
ryzhovau / dehydrated_yandex_pdd.sh
Last active October 5, 2023 09:30
Dehydrated hook script for pdd.yandex.com DNS challenge
#!/usr/bin/env bash
# dns-01 challenge for Yandex PDD
domain='domain.com'
# domain alias as in dehydrated config
domain_alias='wildcard_domain_com'
# Get token at https://pddimp.yandex.ru/token/index.xml?domain=$domain
token='xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'