Skip to content

Instantly share code, notes, and snippets.

View lenosi's full-sized avatar

Dominik Lenosi lenosi

View GitHub Profile
@lenosi
lenosi / example_output.yaml
Last active May 19, 2023 11:06
Scraper for ActiveMQ Artemis releases
2.28.0:
release_date: '2023-02-03'
jdk_compatibility: 11+
2.27.1:
release_date: '2022-12-01'
jdk_compatibility: 11+
2.27.0:
release_date: '2022-11-14'
jdk_compatibility: 11+
2.26.0:
@lenosi
lenosi / CertificateValidityX509TrustManager.java
Last active February 27, 2023 13:03
Custom implementation of the javax.net.ssl.X509TrustManager interface, which is responsible for verifying the authenticity of SSL/TLS certificates in Java applications. The CertificateValidityX509TrustManager class provides a custom implementation of the checkClientTrusted and checkServerTrusted method, which is called by the TLS infrastructure …
import javax.net.ssl.X509TrustManager;
import java.security.cert.CertificateException;
import java.security.cert.CertificateExpiredException;
import java.security.cert.X509Certificate;
/**
* A custom implementation of the javax.net.ssl.X509TrustManager interface that includes a check for certificate validity.
* This implementation can be used to deny expired certificates and protect against attacks that rely on exploiting
* certificate validity periods.
*/
@lenosi
lenosi / find_unused_tests.py
Created October 10, 2022 20:36
Script to find potentially ignored JUnit tests by Maven(Surefire Plugin)
#!/usr/bin/env python3
import os
import sys
import re
import argparse
from pathlib import Path
# Here's an example of usage
@lenosi
lenosi / Redme.md
Last active August 19, 2020 07:54
Fix issue with Intel Corporation Wi-Fi 6 AX200 on Linux 5.x

Linux and Intel Corporation Wi-Fi 6 AX200

Problem with PCI Message Signaled Interrupts

Check the dmesg

I'm including my logs

Issues

Linux frozen for while and then crashed.. all after few hours in loop with 'pci=nomsi' and AX200 (iwlwifi driver).

How to fix

@lenosi
lenosi / README.md
Last active May 20, 2023 07:58
MIUI bloatware

Get list of system apps on the device:

adb shell "echo 'apps:' && pm list packages -f | grep /system/app/ | sed 's/.*=/  - /'"

Remove application command

pm uninstall -k --user 0 app
@lenosi
lenosi / README.md
Last active June 18, 2019 08:33
Fix hostname address with FQDN
echo $(ifconfig eth0 | awk '$1 == "inet" {print $2}') \
$(nslookup $(ifconfig eth0 | awk '$1 == "inet" {print $2}') | \
awk '{ print $4; exit }') $(hostname) >> /etc/hosts
@lenosi
lenosi / README.md
Created January 12, 2018 12:06
Configure qpid-dispatch for Kerberos based authentication
@lenosi
lenosi / README.md
Last active May 12, 2021 11:41
How to speed up Ansible a lot

Introduction

I'm working with Ansible and many of servers every day, so let me show you, how can waste less of your time! :)

What Ansible do? 

  • Connects, runs, check, sends back, processes it, runs, checks, sends back and voila!
  • Connects... again... and again... and again...

What you can do to fix on node/remote server

Edit sshd config and disable UseDNS, it's mainly used only for logging and authentication. But.. only when you have set IgnoreRhosts in your config. So who doesn't know, should use it with clean mind. Because this has truly so far with security. :)

@lenosi
lenosi / README.md
Last active November 26, 2017 11:22
Debug Qpid Proton

How to debug Qpid Proton

If you need debug Qpid Proton, use these enviroments variables:

Log driver related events, initialization, end of stream

PN_TRACE_DRV = true # or 1

Log frames into/out of the transport

PN_TRACE_FRM = true # or 1
@lenosi
lenosi / README.md
Created November 7, 2017 21:17
How to use Python 3.x on RHEL/CentOS 6.x

Using Software Collections

RHEL 6.x

$ yum-config-manager --enable rhel-server-rhscl-6-rpms
$ yum-config-manager --enable rhel-server-rhscl-beta-7-rpms
$ yum install rh-python36 # Or rh-python37

CentOS 6.x

@TODO