Skip to content

Instantly share code, notes, and snippets.

/*
* Copyright 2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@gmaslowski
gmaslowski / cassandra-node2pod.yml
Last active July 18, 2024 14:23
k8s-cassandra-nodeLabel2pod
---
apiVersion: v1
kind: ConfigMap
metadata:
name: cassandra-rackdc
data:
cassandra-rackdc.properties: |
dc= datacenter
rack= RACK
---
@animeshtrivedi
animeshtrivedi / spark-default
Last active August 11, 2023 17:02
A spark configuration for some performance knobs
# RDD settings
spark.rdd.compress false
# Shuffle settings
spark.shuffle.manager sort
spark.shuffle.compress false
spark.shuffle.spill false
spark.shuffle.spill.compress false
spark.shuffle.sort.initialBufferSize 4194304
spark.shuffle.sort.bypassMergeThreshold 200
@dopoljak
dopoljak / CertificateSigningRequestUsingSunJDK.java
Last active August 28, 2023 13:56
Example how to create PKCS#10 Certificate Signing Request (CSR) using Sun JDK, This example creates signature externally - suitable for Cryptographic devices such as Hardware Security Module (HSM)
package com.ilirium.client;
import java.io.ByteArrayOutputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.PrintStream;
import java.math.BigInteger;
import java.security.InvalidKeyException;
import java.security.KeyPair;