Skip to content

Instantly share code, notes, and snippets.

View MichaelNesterenko's full-sized avatar

Mykhailo Nesterenko MichaelNesterenko

View GitHub Profile
@MichaelNesterenko
MichaelNesterenko / sqlserver-cert.groovy
Created September 23, 2020 20:52
sql server certificate chain
package mn
import java.nio.ByteBuffer
import java.nio.channels.SocketChannel
import java.security.cert.Certificate
import java.security.cert.CertificateException
import java.security.cert.X509Certificate
import javax.net.ssl.SSLContext
import javax.net.ssl.SSLEngine
#!/usr/bin/env bash
###
### Inspired by https://newbedev.com/redirecting-pulseaudio-sink-to-a-virtual-source
### with help from https://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/Modules
###
MODULE_REGISTRY="modules.txt"
function load_module() {
@MichaelNesterenko
MichaelNesterenko / dependencies.sh
Last active November 1, 2024 11:07
maven transfer dependencies
#!/usr/bin/env bash
set -eEuo pipefail
shopt -s inherit_errexit
trap "echo command failed 1>&2" ERR
repo_url="$1"
export DEPLOYMENT_TARGET_USERNAME="$2"
export DEPLOYMENT_TARGET_PASSWORD="$3"
shift 3
@MichaelNesterenko
MichaelNesterenko / dict_to_obj.py
Created November 13, 2024 11:06
python dict to obj
from dataclasses import dataclass
from inspect import get_annotations
@dataclass
class MySubData:
value: str
@dataclass
class MyData:
list_value: list[MySubData]