Skip to content

Instantly share code, notes, and snippets.

Kirill Marchuk 62mkv

  • Kuehne+Nagel
  • Tallinn, Estonia
Block or report user

Report or block 62mkv

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:168f9140ad0d5fea04b696ed65de124b
To wire-print requests/responses over HTTP for SOAP/XML:
`-Dcom.sun.xml.ws.transport.http.client.HttpTransportPipe.dump=true -Dcom.sun.xml.ws.transport.http.HttpAdapter.dump=true -Dcom.sun.xml.internal.ws.transport.http.client.HttpTransportPipe.dump=true -Dcom.sun.xml.internal.ws.transport.http.HttpAdapter.dump=true -Dcom.sun.xml.internal.ws.transport.http.HttpAdapter.dumpTreshold=true`
@62mkv
62mkv / README.md
Created Nov 27, 2019
Wikidata SPARQL queries
View README.md

Examples of SPARQL Wikidata queries:

List of hills in Estonia without defined elevation

SELECT ?item ?itemLabel ?geo ?elevation WHERE {
  ?item wdt:P31 wd:Q54050;
    wdt:P17 wd:Q191;
        wdt:P625 ?geo.
    OPTIONAL { ?item wdt:P2044 ?elevation }
    SERVICE wikibase:label { bd:serviceParam wikibase:language "et" } 
@62mkv
62mkv / README.md
Created Oct 11, 2019
How to add a custom trusted certificate for making HTTP requests against external sites
View README.md

Thoughts on how to add trusted store for connection to external sites that use that certificate for HTTPS

Option 1: global configuration

One can just provide the -Djavax.net.ssl.trustStore=<path/to/store> -Djavax.net.ssl.trustStorePassword=<password> options when running the Java application

However, this is not always possible (for example, when run in the cloud).

And if you want to use server.ssl.trust-store/server.ssl.trust-store-password options from Spring Boot, be aware that with those you also have to provide key-store options as well. And, basically that would be an abuse, because this configuration is specifically for server side of your application.

@62mkv
62mkv / playground.rs
Created Aug 4, 2019 — forked from rust-play/playground.rs
Code shared from the Rust Playground
View playground.rs
//! [dependencies]
//! fstrings = "0.1.4"
//! itertools = "0.8.0"
//! lazy_static = "1.3.0"
//! libc = "0.2.60"
//! libloading = "0.5.2"
#[macro_use] extern crate fstrings;
use ::std::{*,
@62mkv
62mkv / README.md
Last active Jul 17, 2019
How to debug SSL issues with Java-based server application
View README.md

How to debug an HTTPS connection issue with Spring Boot based Java application

  1. Advanced logging:
  • java -jar -Djavax.net.debug=ssl:handshake:verbose app.jar
  1. make sure you specify correct configuration:
  • java -jar -Djavax.net.debug=ssl:handshake:verbose app.jar --server.port=8443 --server.security.require-ssl=true --server.ssl.key-store=/path/to/keystore --server.ssl.key-store-password=password --server.ssl.protocol=TLS
  1. See what’s in the store:
  • keytool -list -keystore /path/to/keystore -storepass password
View HOWTO-SQUASH-THE-OTHER-BRANCH.md

Say, you have a long history of commits with multiple cross-merges, and now you've finally ready with the "other" branch. Now, before the final integration, you want to have all those changes provided as single clean commit, no merges, no "forgot to add tests", no "typo fixed", etc.

The most "obvious" solution seems to be "interactive rebase". But.. this is unfortunately VERY cumbersome and sometimes even virtually impossible, especially when the branch history was riddled with conflicts and intermediate merges.

So, I eventually figured out another way of doing it:

  • say, you have a target branch (which is a trunk) and a feature branch, which has history you want to squash. NOTE: (important): latest target is already merged into feature.
@62mkv
62mkv / find-class-in-jar
Last active May 13, 2019
Find class in a set of JAR files
View find-class-in-jar
sudo find /path/to/ -name "*.jar" -exec sh -c 'jar -tf {}| grep -H --label {} package' \;
@62mkv
62mkv / oracle.md
Last active Feb 4, 2020
Oracle cheatsheet
View oracle.md
  • Show table DDL:
    select dbms_metadata.get_ddl('TABLE', '<your table name>') from dual

  • List all of the (available) tables: select * from user_tables

View Search-and-Replace-Structurally.md

Examples of Structural Search and Replace (IntelliJ IDEA 2017)

Use case 1

Find all *DTO classes, that have a (at least one) public field that is neither @ApiModelProperty, nor a @JsonIgnore

  1. Open Edit->Find->Search structurally

  2. Paste this into Search template field:

@62mkv
62mkv / README.md
Last active Aug 30, 2017
NHP KMS recipes for KIOSK
View README.md

подключение к БД на киоске

запускаем psql

sudo -u postgres psql

показываем доступные СУБД

\l

подключаемся к нужной (с номером нужного паблиша)

\c kms_1478787944

You can’t perform that action at this time.