Skip to content

Instantly share code, notes, and snippets.

# export a public certificate
keytool -export -alias wso2carbon -file key.crt -keystore wso2carbon.jks
or
keytool -export -keystore pathToKeystore -rfc -alias aliasNameForCertificate
#print out the certificate
openssl x509 -text -inform DER -in key.crt
or
keytool -printcert -rfc -file pathToCertificate
@madumalt
madumalt / mvn-product-is-version-upgrade.txt
Created September 21, 2017 08:31
upgrade product-is versions
mvn versions:update-properties -Dincludes=org.wso2.carbon.identity.*
@madumalt
madumalt / install_netcdf4.sh
Last active April 17, 2018 08:15
Install netCDF4 in Ubuntu
#!/bin/bash
# Script to install hdf5 and netCDF4 libraries on a Linux Ubuntu system
# After: https://code.google.com/p/netcdf4-python/wiki/UbuntuInstall
# And http://unidata.github.io/netcdf4-python/
# You can check for newer version of the programs on
# ftp://ftp.unidata.ucar.edu/pub/netcdf/netcdf-4/
# and other sources
@madumalt
madumalt / logstash-grok-mlutiline-as-one-record.conf
Last active March 22, 2021 08:17
Process multiples lines of unstructured logs as one structured record by Logstash prior pushing them to Elasticsearch.
input {
beats {
port => 5301
}
}
filter {
if [fields][type] == "monthly-indexed.r2web.bsd.alljob" {
mutate {
gsub => ["message","/"," "]
AS400P19
20/10/07 07:01:18 PAGE 1
HISTLOG UID JNUM MID
CPF1124 00 INFO Job 004516/ACSMYCDRP/RBPTRGPGM started on 20/10/06 at 21:00:02 in subsystem RBKMYBSBS in USRSYS. Job ente ACSMYCDR 004516 CPF1124
CPF1164 00 COMPLETION Job 004516/ACSMYCDRP/RBPTRGPGM ended on 20/10/06 at 21:00:02; .004 seconds used; end code 0 ACSMYCDR 004516 CPF1164
CPF1124 00 INFO Job 004603/ACSMYCDRP/RBPTRGPGM started on 20/10/06 at 21:00:22 in subsystem RBKMYBSBS in USRSYS. Job ente ACSMYCDR 004603 CPF1124
CPF1164 00 COMPLETION Job 004603/ACSMYCDRP/RBPTRGPGM ended on 20/10/06 at 21:00:22; .004 seconds used; end code 0 ACSMYCDR 004603 CP