Skip to content

Instantly share code, notes, and snippets.

@mistificator
mistificator / repair_qt_in_wsl.sh
Created March 21, 2025 12:21
libQt6Core.so.6
#!/bin/sh
strip --remove-section=.note.ABI-tag libQt6Core.so.6
@mistificator
mistificator / print_all_defined.cmake
Created March 15, 2025 19:45
Print everything defined in CMake project
get_cmake_property(_variableNames VARIABLES)
list (SORT _variableNames)
foreach (_variableName ${_variableNames})
message(STATUS "${_variableName}=${${_variableName}}")
endforeach()
#!/bin/sh
curl -sf -L https://static.rust-lang.org/rustup.sh | sh
@mistificator
mistificator / install-grun.sh
Last active August 26, 2024 20:16
alias for GUI single application run (uses X and TWM)
#!/bin/sh
alias grun="(x &) && (sleep 0.1s) && (twm &) && (sleep 0.1s) &&"
#!/bin/sh
find . -type f -print0 | xargs -0 dos2unix
@mistificator
mistificator / smb.reg
Last active October 25, 2023 14:20
.reg file that registers URL protocol "smb://" for SMB shared folders
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\smb]
"URL Protocol"=""
[HKEY_CLASSES_ROOT\smb\shell]
[HKEY_CLASSES_ROOT\smb\shell\open]
[HKEY_CLASSES_ROOT\smb\shell\open\command]
@="powershell -WindowStyle Hidden -Command \"& { Invoke-Expression $(-join('cmd /c', [URI]::UnescapeDataString('start %1').Replace('smb://', '//').Replace('/', '\\'))) }\""
@mistificator
mistificator / readme.md
Last active August 10, 2024 18:02
How to run ESXDOS in Fuse emulator of ZX Spectrum

How to run ESXDOS in Fuse emulator of ZX Spectrum

1. Preparing disk image

1.1 Getting HdfMonkey, building and installing it

sudo apt install autoconf automake debhelper

git clone https://github.com/gasman/hdfmonkey.git

dpkg-source -b hdfmonkey

@mistificator
mistificator / async_start_gui_remote.sh
Last active December 7, 2022 10:05
command to asynchronously start GUI app on remote host inside XRDP session
#!/bin/sh
# command to asynchronously start GUI app on remote host inside XRDP session (batch command is part of "at" package)
ssh user@host "echo 'DISPLAY=:10 app_name' | at now"
@mistificator
mistificator / torrc
Created March 23, 2022 08:31
Sample torrc configuration file for using with Tor
#
# torrc configuration file that allows to setup Tor-proxy on port 8080 through another proxy in LAN on port 3128 with obfs4 transport
#
# 1. On Windows install Tor as service
# tor -service install --options -f "c:\Users\user\AppData\Roaming\tor\torrc" | more
#
# 2. Check Tor is working (SOCKS port checking)
# netstat -aon | findstr ":9050"
#
# 3. Set proxy in browser to 127.0.0.1:8080 for both HTTP and HTTPS
@mistificator
mistificator / extended_view.sql
Created March 15, 2022 07:35
PL/pgSQL procedure that makes view of data with rows transponded to columns. In this code %1 is placeholder for table suffix and %2 is placeholder for object number.
DO $$
DECLARE
objs INTEGER[];
r RECORD;
i INTEGER;
subquery_str TEXT;
with_str TEXT;
from_str TEXT;
query_str TEXT;
where_str TEXT;