Skip to content

Instantly share code, notes, and snippets.

View ivarkol's full-sized avatar
🏠
Working from home

Ivan ivarkol

🏠
Working from home
  • Kazan
View GitHub Profile
def pattern = Pattern.compile("ru/home/generated/${opt.specService}/(?:rest|configuration)/(\\w*)/?.*")
exclude { tree ->
def matcher = pattern.matcher(tree.path)
matcher.matches() ? matcher.group(1) != opt.apiType : false
}
sudo setfacl -m user:$USER:rw /var/run/docker.sock
@ivarkol
ivarkol / oracle_export_import.txt
Created September 7, 2023 14:00
Oracle export/import
1. Скачать и распаковать архивы
https://download.oracle.com/otn_software/linux/instantclient/1920000/instantclient-basic-linux.x64-19.20.0.0.0dbru.zip
https://download.oracle.com/otn_software/linux/instantclient/1920000/instantclient-tools-linux.x64-19.20.0.0.0dbru.zip
2. выполнить команды
export LD_LIBRARY_PATH=/<path_to_instant_client>/instantclient_19_20:${LD_LIBRARY_PATH}
@ivarkol
ivarkol / yum_proxy.txt
Last active July 27, 2023 07:21
yum proxy
/etc/yum.conf
proxy=http://host:port
proxy_password=P@ssw0RD
proxy_username=username
proxy_auth_method=basic
@ivarkol
ivarkol / PKIX_unable_certification_path
Created January 26, 2023 06:14
PKIX: unable to find valid certification path to requested target
SSLHandshakeException: PKIX: unable to find valid certification path to requested target
This solution relates to the following stacktrace:
javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed:
sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target.
We experienced this issue when a server changed their HTTPS SSL certificate, and our older version of Java did not recognize the root certificate authority (CA).
If you can access the HTTPS URL in your browser then it is possible to update Java to recognize the root CA.
In your browser, go to the HTTPS URL that Java could not access. Click on the HTTPS certificate chain (there is lock icon in the Internet Explorer, or the domain name left of the URL in firefox) and navigate the certificate hierarchy. At the top there should be a Primary Root CA. This could be missing from your java cacerts file. Note down the Issuer and Serial Number.
@ivarkol
ivarkol / gist:93e890c50e0e932c4eb5e4eefd786652
Created October 5, 2022 18:37
m1 docker lima oracle chmod
chmod 6751 $ORACLE_HOME/bin/*
@ivarkol
ivarkol / self-signed-certificate-with-custom-ca.md
Created September 9, 2021 14:29 — forked from fntlnz/self-signed-certificate-with-custom-ca.md
Self Signed Certificate with Custom Root CA

Create Root CA (Done once)

Create Root Key

Attention: this is the key used to sign the certificate requests, anyone holding this can sign certificates on your behalf. So keep it in a safe place!

openssl genrsa -des3 -out rootCA.key 4096
@ivarkol
ivarkol / generate_key_pair_with_openssl.txt
Created October 25, 2020 13:08
Generate key pair with openssl
openssl genrsa -out keypair.pem 2048
To extract the public part, use the rsa context:
openssl rsa -in keypair.pem -pubout -out publickey.crt
Finally, convert the original keypair to PKCS#8 format with the pkcs8 context:
openssl pkcs8 -topk8 -inform PEM -outform PEM -nocrypt -in keypair.pem -out pkcs8.key
@ivarkol
ivarkol / paste_excel.js
Last active July 29, 2020 16:19 — forked from torjusb/paste_excel.js
Handle pasted text from Excel, and split it into arrays of rows and columns
var clipboardData = window.clipboardData || event.clipboardData || event.originalEvent && event.originalEvent.clipboardData;
var pastedText = clipboardData.getData("Text") || clipboardData.getData("text/plain");
if (!pastedText && pastedText.length) {
return;
}
// Parse the pasted text from Excel into rows.
// Pasted text is usually separated by a new line for each row,