Skip to content

Instantly share code, notes, and snippets.

View Voronenko's full-sized avatar
turning coffee into code since late 90s

Vyacheslav Voronenko

turning coffee into code since late 90s
View GitHub Profile
@Voronenko
Voronenko / fix_word_windows_10.cmd
Created November 6, 2025 08:56
The procedure entry point SetThreadDescription could not be located in the dynamic link library Office16\wwlib.dll
cd %ProgramFiles%\Common Files\Microsoft Shared\ClickToRun\
OfficeC2RClient.exe /update user updatetoversion=16.0.19231.20156
@Voronenko
Voronenko / open-table-driver-automap.sh
Created October 22, 2025 14:13
Script that automatically maps open table driver device to specific display
#!/usr/bin/env bash
# ~/bin/map-tablet.sh
OUTPUT="HDMI-3"
TABLET_ID=$(xinput list 2>/dev/null | grep -i "OpenTabletDriver" | grep "pointer" | grep -o "id=[0-9]*" | cut -d= -f2 | head -n1)
if [ -z "$TABLET_ID" ]; then
echo "No OpenTabletDriver pointer device found. Skipping."
exit 0
fi
@Voronenko
Voronenko / ability_cash.py
Created January 6, 2025 16:50
Example on accessing crypto ability cash db
import apsw
# https://pypi.org/project/apsw-sqlite3mc/
# https://github.com/utelle/apsw-sqlite3mc
print(apsw.mc_version)
con = apsw.Connection("base.cash")
con.pragma("cipher", "aes256cbc")
print(con.pragma("key", "DB_PASSWORD"))
@Voronenko
Voronenko / reset_harbor_password.py
Created January 3, 2025 21:14
Helps to reset harbor password
from hashlib import pbkdf2_hmac
salt = "J6Duybf2UcRhKchR06VbJWimv31xrlnN"
plain_text_password = "Harbor12345"
# plain_text_password "plain text password"
# salt "salt field in database"
# password "password field in database"
# hash_name "password_version field in database"
# iterations "fixed value 4096 in code"
@Voronenko
Voronenko / drop_all_tables.sql
Last active April 18, 2024 14:07
Drop all tables in mysql database
SET @tables = NULL;
SET GROUP_CONCAT_MAX_LEN=1048576;
SELECT GROUP_CONCAT('`', table_schema, '`.`', table_name, '`' SEPARATOR ',') INTO @tables
FROM information_schema.tables
WHERE table_schema = (SELECT DATABASE());
SELECT IF(@tables IS NULL,
'SELECT NULL FROM (SELECT NULL) AS `empty` WHERE 0=1',
CONCAT('DROP TABLE IF EXISTS ', @tables)) INTO @tables;
entryPoints:
web:
address: ":80"
websecure:
address: ":443"
http:
routers:
myrouter:
rule: "Host(`bchain.example.in`)"
# https://github.com/dannysteenman/aws-toolbox
#
# License: MIT
#
# This script deletes all inactive task definitions in the ECS service in all AWS Regions.
import boto3
def get_inactive_task_definition_arns(region):
@Voronenko
Voronenko / docker-compose-spark.yml
Created July 3, 2023 18:56
Quick local spark instance
version: '3'
services:
spark-master:
image: bde2020/spark-master:3.3.0-hadoop3.3
container_name: spark-master
ports:
- "8080:8080"
- "7077:7077"
environment:
- INIT_DAEMON_STEP=setup_spark
@Voronenko
Voronenko / cloudwatch_log_insights_mysql_slow_query_examples.md
Created June 23, 2023 12:38 — forked from qiangxue/cloudwatch_log_insights_mysql_slow_query_examples.md
CloudWatch Log Insights query examples for MySQL slow query log.

Filtering queries

Find slowest write queries

parse @message /Query_time: (?<queryTime>.*?) Lock_time: (<?lockTime>.*?) Rows_sent: (?<rowsSent>.*?) Rows_examined: (?<rowsExamined>.*?)\s(?<query>.*?)$/
  | filter @message like /(?i)insert/
  | sort queryTime desc
  | limit 10
@Voronenko
Voronenko / slow_query_log_dump.py
Created June 23, 2023 12:36 — forked from diafygi/slow_query_log_dump.py
Script to transform Amazon RDS slow log table into the MySQL slow query log format
"""
Queries the slowlog database table maintained by Amazon RDS and outputs it in
the normal MySQL slow log text format. Modified version of the script by
memonic (Thanks!) at https://gist.github.com/1481025
Things to change in this script for your own setup:
<root_user> to your mysql root user (e.g. "root")
<root_pass> to your mysql root password (e.g. "hunter2")
<host_domain> to your mysql root password (e.g. "prod-01.w3rfs2.us-east-1.rds.amazonaws.com")