Skip to content

Instantly share code, notes, and snippets.

View fholzer's full-sized avatar

Ferdinand Holzer fholzer

  • Entain plc
  • Vienna, Austria
View GitHub Profile
@fholzer
fholzer / gist:34abd52203c978ea443ad6a248dc6455
Created July 13, 2017 13:56 — forked from svrc-personal/gist:5a8accc57219b9548fe1
JDK 8 seems to use /dev/urandom and /dev/random more sensibly
Summary of Behaviour:
A. OpenJDK 7 b65.
1. Default in java.security is securerandom.source=/dev/urandom
2. If securerandom.source=/dev/urandom, NativePRNG is used, SecureRandom.nextBytes() is non-blocking via /dev/urandom ; SecureRandom.generateSeed(x) is blocking via /dev/random
3. if securerandom.source=/dev/random, then SHA1PRNG is used. Initial seed is blocking via /dev/random. No other accesses.
4. If securerandom.source=/dev/./urandom then SHA1PRNG is used. Initial seed is non-blocking via /dev/./urandom. No other accesses.
B. Oracle JDK 8 b25.
@fholzer
fholzer / tombstone-count.sh
Last active June 1, 2021 09:57 — forked from JensRantil/tombstone-count.sh
How to count number of tombstones per partition key in one or multiple sstables.
#!/bin/bash
#
# Counts number of tombstones per partition key in one or multiple sstables.
#
# Usage: ./tombstone-count.sh /var/lib/cassandra/data/mykeyspace/mytable/*-Data.db
#
# Sample output:
# "40e6a9839bf44bdaa624cc53e96733fe" 8
# "8e177ab222c14f868bcb6d2922b18d2b" 8
# "28aaa9db0dad4ae78cabe8bcc25d14a3" 9
<#
Create Unix VM's.
PREREQUISITES:
- A VM that has been installed with an OS that supports cloud-init
- cloud-init is installed on the vm
How it works:
- Asks for a bunch of parameters
- Creates a disk from parent vhdx for speed