This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
const crypto = require('crypto'); | |
const ENCRYPTION_KEY = process.env.ENCRYPTION_KEY; // Must be 256 bits (32 characters) | |
const IV_LENGTH = 16; // For AES, this is always 16 | |
function encrypt(text) { | |
let iv = crypto.randomBytes(IV_LENGTH); | |
let cipher = crypto.createCipheriv('aes-256-cbc', Buffer.from(ENCRYPTION_KEY), iv); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
references: | |
https://engineering.linkedin.com/kafka/benchmarking-apache-kafka-2-million-writes-second-three-cheap-machines | |
https://gist.github.com/jkreps/c7ddb4041ef62a900e6c | |
from a fresh download/untar of confluent platform: | |
create topics: | |
bin/kafka-topics --zookeeper localhost:2181 --create --topic test-rep-one --partitions 6 --replication-factor 1 | |
bin/kafka-topics --zookeeper localhost:2181 --create --topic test --partitions 6 --replication-factor 3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
maven on osx fails to install with group id too big | |
[INFO] --- maven-assembly-plugin:2.5.3:single (make-assembly) @ maxwell --- | |
[INFO] Reading assembly descriptor: src/main/assembly/assembly.xml | |
[WARNING] The assembly descriptor contains a filesystem-root relative reference,which is not cross platform compatible / | |
[INFO] Building tar: /Users/sferguson/dev/maxwell/target/maxwell-1.1.2.tar.gz | |
[INFO] ------------------------------------------------------------------------ | |
[INFO] BUILD FAILURE | |
[INFO] ------------------------------------------------------------------------ | |
[INFO] Total time: 7.647 s |