Skip to content

Instantly share code, notes, and snippets.

@smferguson
smferguson / gist:f5a68d726fb7c0f663bb7bac9d5ee08b
Last active July 14, 2016 12:47
maven on osx fails to install with group id too big
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
@smferguson
smferguson / 1_kafka_perf_test_info.txt
Last active October 5, 2018 08:52
confluent kafka perf testing notes
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
@smferguson
smferguson / encryption.js
Created March 15, 2020 01:35 — forked from vlucas/encryption.js
Stronger Encryption and Decryption in Node.js
'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);