Skip to content

Instantly share code, notes, and snippets.

View Wohlstand's full-sized avatar
🦊

Vitaly Novichkov Wohlstand

🦊
View GitHub Profile
@Wohlstand
Wohlstand / rescue-file-from-dying-hdd.py
Last active March 29, 2023 03:19
Copy a huge file with an ability to resume the copying after failure (to rescue it from a dying HDD)
#!/usr/bin/python3
# --------------------------------------------------------------------------------
# MIT License
# Copyright (c) 2023 by Vitaly Novichkov "Wohlstand"
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights to
@Wohlstand
Wohlstand / vb6_to_cpp.html
Last active October 8, 2021 07:51
The code piece used by me in early process of SMBX to TheXTech porting
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>VB6 to CPP</title>
<script type="text/javascript">
function replaceType(tpe)
{
tpe = tpe.trim();
@Wohlstand
Wohlstand / wohlstand's-policy.txt
Last active March 5, 2022 10:20
Privacy policy of WohlstandFox' Android applications
I don't collect any personal data at all,
I don't need them at all.
I do respect people's privacy and I don't
collect anything except anonymous debug logs
made by Google itself, and only these reports
people submit by themselves directly.
Most of my applications are fully standalone
and they don't require networking at all.
@Wohlstand
Wohlstand / keybase.md
Last active November 16, 2020 01:02
keybase.md

Keybase proof

I hereby claim:

  • I am wohlstand on github.
  • I am wohlstandfox (https://keybase.io/wohlstandfox) on keybase.
  • I have a public key ASBzRSz-8e1YdiVlBDAeOx3SCeE3RpDlxYhtixUkW_k1tAo

To claim this, I am signing this object:

@Wohlstand
Wohlstand / winapi_get_process_by_pid.c
Created September 24, 2019 20:19
C WinAPI Example of PIDs retrieving by absolute executable file path matching
#include <windows.h>
#include <psapi.h>
#include <stdio.h>
#include <wchar.h>
#ifdef _WIN64
/* This call is available since Windows Vista. It's useless on 32-bit builds. */
typedef BOOL (*call_EnumProcessModulesEx)(HANDLE, HMODULE*, DWORD, LPDWORD, DWORD);
static call_EnumProcessModulesEx g_EnumProcessModulesEx = NULL;
@Wohlstand
Wohlstand / pge-forums-rules-en.bbcode
Last active August 12, 2019 23:05
PGE Forums rules
[i][Version 12-aug-2019][/i]
[b]Welcome to the PGE project forum![/b]
For the purpose of order/maintenance at this forum, we have the following rules:
[list][*] [u][b]FORUM REGISTRATION[/b][/u].
- Once you have registered an account on this forum, [b]your first post will be pre-moderated[/b] to avoid spam.
- It's recommended (but is not required) to make an introduction of yourself in [url=https://wohlsoft.ru/forum/viewforum.php?f=6]this section[/url] as your first post.
[*] [u][b]THIS FORUM IS INTERNATIONAL[/b][/u].
@Wohlstand
Wohlstand / ss5.service
Created April 12, 2018 13:38
Systemd script for SS5 Socks proxy
[Unit]
Description=SS5 Socks Proxy
After=syslog.target network.target nss-lookup.target
[Service]
Type=forking
# The PID file is optional, but recommended in the manpage
# "so that systemd can identify the main process of the daemon"
PIDFile=/var/run/ss5.pid
ExecStart=/usr/sbin/ss5 -p /var/run/ss5.pid -u root -b 0.0.0.0:4781
@Wohlstand
Wohlstand / chmod-elfs.sh
Created November 10, 2017 11:59
Mark all ELF files as executable
#!/bin/bash
find . -exec file {} \; | grep -i ELF | cut -d':' -f1 | while read line; do chmod a+x $line; done
@Wohlstand
Wohlstand / merge_ts.php
Created August 14, 2017 09:56
Merge Qt Linguist TS files
<?php
$tsSrc = "editor_en_old.ts";
$tsToMerge = "editor_en.ts";
$tsDst = "newts.ts";
$xmlOld = simplexml_load_file($tsSrc);
$xmlHoe = simplexml_load_file($tsToMerge);
@Wohlstand
Wohlstand / .astylerc
Created December 26, 2016 22:50
My artistic style config (All-man breckints style, keep empty lines, add space between operators, etc.)
# ~/.astylerc
#
# Courtesy of HN's super_mario: http://news.ycombinator.com/item?id=5348401
#
# Use allman formatting style
--style=allman
--indent=spaces=4
--align-pointer=type
--align-reference=name