Skip to content

Instantly share code, notes, and snippets.

@kokosing
kokosing / release_issues.py
Created December 10, 2018 08:54
Create JIRA Releaase issues
#!/usr/bin/env python3
import argparse
import csv
import jira
parser = argparse.ArgumentParser(description='Create JIRA release epic branch issues.')
parser.add_argument('--file', metavar='file', type=str, help='Patches bookkeeping CSV file for releases')
parser.add_argument('--user', metavar='user', type=str, help='JIRA user')
#!/bin/sh
CURRENT=$1
git log --format='%<|(21)%cn %<|(39)%cd %<|(50)%h %s' --date=format-local:'%m-%d %H:%M:%S' $CURRENT.. | \
grep -vF '[maven-release-plugin]' | sort | \
awk '
{
name = substr($0, 1, 21)
if (name != current) {

Source: https://gist.github.com/findepi/04c96f0f60dcc95329f569bb0c44a0cd .

quick build

./mvnw -T2C clean install -nsu -DskipTests -Dmaven.javadoc.skip=true -Dmaven.source.skip=true -Dair.check.skip-all=true -pl '!:trino-server-rpm,!:trino-docs,!:trino-proxy,!:trino-verifier,!:trino-benchto-benchmarks'

run Trino in a container, quickly

docker rm -f trino; docker run --rm -it --name trino -p 8080:8080 trinodb/trino:438
@findepi
findepi / sort-commits-for-github.sh
Last active August 6, 2021 20:53
sort commits for GitHub's sake
git rebase "$(git merge-base HEAD master)" -x 'git commit --amend -C HEAD --date="$(date -R)" && sleep 1.05'
@dain
dain / Directions for creating PEM files
Last active October 16, 2023 09:11
Create Java KeyStore from standard PEM encoded private key and certificate chain files
# To regenerate the test key and certificates
# Generate an RSA private key and convert it to PKCS8 wraped in PEM
openssl genrsa 2048 | openssl pkcs8 -topk8 -inform pem -outform pem -nocrypt -out rsa.key
# Generate a certificate signing request with the private key
openssl req -new -key rsa.key -out rsa.csr
# Sign request with private key
openssl x509 -req -days 10000 -in rsa.csr -signkey rsa.key -out rsa.crt
@electrum
electrum / README.md
Last active June 2, 2020 12:04
Git Scripts

Install the following programs and configure them with permissions to access your GitHub profile:

These scripts assume the following two remotes exist:

  • origin: your fork
  • upstream: the upstream repository
@jankronquist
jankronquist / client-certificate-authentication.md
Last active January 24, 2021 13:49
Java certificate authentication for both server and client using shared trusted CA.

Certificates

CA and trust keystore

keytool -genkeypair -keyalg RSA -keysize 2048 -validity 365 -alias ca -dname "CN=ca,O=HMS,S=SE" -keystore ca.jks -storepass password
keytool -exportcert -rfc -alias ca -keystore ca.jks -storepass password > ca.pem
cat ca.pem | keytool -importcert -alias ca -noprompt -keystore trust.jks -storepass password

server cert