Skip to content

Instantly share code, notes, and snippets.

View AgainPsychoX's full-sized avatar

Patryk Ludwikowski AgainPsychoX

  • R&G Plus
  • Poland 🇵🇱
  • 10:51 (UTC +02:00)
View GitHub Profile
@AgainPsychoX
AgainPsychoX / DNS-WDM-instrukcja.md
Last active August 4, 2026 16:26
Nie działa DNS u operatora (WDM)? Obejście przechwytywania UDP/53 — lokalny resolver Unbound z DNS-over-TLS na Windows

Nie działa DNS (WDM)? Jak to obejść — lokalny resolver Unbound z DNS-over-TLS

Important

Zastrzeżenie. To jest opis mojego własnego przypadku, spisany po tym, jak sam przez to przeszedłem. Nie jest to materiał oficjalny: nie powstał we współpracy z WDM ani żadnym innym operatorem, nie został przez nikogo z nich potwierdzony ani zatwierdzony, i nie wypowiadam się w niczyim imieniu.

Nie twierdzę też, że każdy klient tego operatora ma ten sam problem, ani że przyczyna leży dokładnie tam, gdzie ją obstawiam — opisuję objawy, które u siebie zaobserwowałem, oraz obejście, które u mnie zadziałało. Wnioski o przechwytywaniu UDP/53 wyciągnąłem z zachowania własnego łącza, nie z żadnego oficjalnego źródła.

Konkretnie chodzi o łącze WDM Sp. z o.o. (Mielec, podkarpackie). Sprawdź najpierw u siebie (patrz „Szybka diagnoza" niżej) i korzystaj na własną odpowiedzialność. Jeśli u Ciebie objawy albo rozwiązanie wyglądają inaczej — daj znać, chętnie poprawię.

Objaw

@AgainPsychoX
AgainPsychoX / convert_sysincludes.py
Last active April 8, 2024 21:45
Disabling vendor (library/framework/not my code) warnings PlatformIO RP2040/Pico with Arduino earlephilhower core
# Script to help hide warnings from framework & libraries
# From https://community.platformio.org/t/silence-warnings-for-dependencies-external-libraries/33387/8
from pathlib import Path
import shlex
import sys
# PlatformIO injected stuff (I wish it was typed... https://github.com/platformio/platformio-docs/issues/342)
Import('env' ,'projenv') # type: ignore
env, projenv, DefaultEnvironment = env, projenv, DefaultEnvironment # type: ignore
@AgainPsychoX
AgainPsychoX / .ps1
Last active October 8, 2024 13:54
Sorting the same way Windows Explorer does
$array = @('1a2a5773', '0fe68296', '01b7f045')
$expected = @('0fe68296', '01b7f045', '1a2a5773')
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
Write-Host 'Bad:' # from https://stackoverflow.com/a/5429048/4880243
$array | Sort-Object { [regex]::Replace($_, '\d+', { $args[0].Value.PadLeft(20) }) }
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
@AgainPsychoX
AgainPsychoX / .css
Created May 3, 2023 11:40
Utility code to fix transition animations when closing HTML5 dialog
dialog {
margin: auto;
width: 100%;
min-width: 30vw;
min-height: 20vw;
border: none;
box-shadow: 0 0 16px -4px rgba(0, 0, 0, 0.7);
opacity: 0;
}

This is normal text.


This gets indented, without enumeration nor dots.

@AgainPsychoX
AgainPsychoX / PaintStyle.dart
Last active June 6, 2019 12:53
`PaintStyle` for `Paint` of `sky_engine`
import 'dart:ui';
/// A description of the style to use when drawing on a [Canvas].
///
/// Most APIs on [Canvas] take a [Paint] object to describe the style
/// to use for that operation. [PaintStyle] allows to be const
/// constructed and later in runtime forged into the [Paint] object.
class PaintStyle {
/// Whether to apply anti-aliasing to lines and images drawn on the
/// canvas.
@AgainPsychoX
AgainPsychoX / main.dart
Created May 29, 2019 14:25
Dart: Convert a `String` to a `Uint8List` and `Uint8List` to `String` (UTF-16)
import 'dart:typed_data';
void main() {
// Source
String source = 'Hello! Cześć! 你好! ご挨拶!Привет! ℌ𝔢𝔩𝔩𝔬! 🅗🅔🅛🅛🅞!';
print(source.length.toString() + ': "' + source + '" (' + source.runes.length.toString() + ')');
// String (Dart uses UTF-16) to bytes
var list = new List<int>();
import 'dart:typed_data';
void main() {
String source = 'Błonie';
List<int> list = source.codeUnits;
Uint8List bytes = Uint8List.fromList(list);
String outcome = String.fromCharCodes(bytes);
@AgainPsychoX
AgainPsychoX / automake-1-avoids-deprecated-syntax.patch
Created June 10, 2018 14:00
Patch for `automake` from `native` plugin of MXE, issue #2140
This file is part of MXE. See LICENSE.md for licensing information.
Contains ad hoc patches for cross building.
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Patryk (PsychoX) Ludwikowski <psychoxivi@gmail.com>
Date: Sun, 10 Jun 2018 06:49:41 +0000
Subject: [PATCH 1/1] Avoids deprecated syntax that causes failure in newer versions of Perl.
Contains patch for using too new Perl. Avoids deprecated syntax that causes failure in newer versions of Perl. More info at https://github.com/mxe/mxe/issues/2140
@AgainPsychoX
AgainPsychoX / Running `make --debug ffmpeg`
Last active June 10, 2018 01:49
Logs for issue with MXE: Package `ffmpeg` for `x86_64-w64-mingw32.static.posix` fails to build at `gnutls`
bash://PsychoX@PsychoX/mnt/e/Libraries/MXE/mxe
$ make --debug ffmpeg
GNU Make 4.1
Built for x86_64-pc-linux-gnu
Copyright (C) 1988-2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Reading makefiles...
Updating goal targets....