brew install erlang
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
clear host | |
# https://cloudrun.co.uk/powershell/how-to-keep-your-screen-alive-or-pc-from-going-to-sleep-during-presentations/ | |
# Script to keep the PC alive, will prevent screen lock and sleep. | |
# Works by pressing Print Screen every 2 minutes, side effect is that a screenshot will overwrite the clipboard contents | |
# | |
write-warning "I am out for lunch." | |
Do { | |
[void][System.Reflection.Assembly]::LoadWithPartialName('System.Windows.Forms') | |
[System.Windows.Forms.SendKeys]::SendWait("{F1}") |
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
// script can be loaded by ammonite (http://ammonite.io/) | |
import $plugin.$ivy.`org.spire-math::kind-projector:0.9.6` | |
import $ivy.`org.scalaz::scalaz-core:7.2.25` | |
import scalaz._ | |
import Scalaz._ | |
import scalaz.Maybe.Just | |
import scala.language.higherKinds |
For excessively paranoid client authentication.
Organization & Common Name: Some human identifier for this server CA.
openssl genrsa -des3 -out ca.key 4096
openssl req -new -x509 -days 365 -key ca.key -out ca.crt
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
To generate a self-signed SSL certificate using the keytool command on Windows, Mac, or Linux: | |
1 Open a command prompt or terminal. | |
2 Run this command: | |
keytool -genkey -keyalg RSA -alias tomcat -keystore selfsigned.jks -validity <days> -keysize 2048 | |
Where <days> indicate the number of days for which the certificate will be valid. | |
3 Enter a password for the keystore. Note this password as you require this for configuring the server. |
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
# http://boto3.readthedocs.io/en/latest/reference/services/kinesis.html | |
import boto3 | |
import json | |
client = boto3.client('kinesis') | |
create_stream = client.create_stream(StreamName='GregorSamsa', ShardCount=150) | |
streams = client.list_streams(Limit=100) |
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
import scala.util.parsing.json.JSONObject | |
/** | |
* Created by prayagupd | |
* on 2/16/17. | |
*/ | |
object Test { |
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
Producer | |
Setup | |
bin/kafka-topics.sh --zookeeper esv4-hcl197.grid.linkedin.com:2181 --create --topic test-rep-one --partitions 6 --replication-factor 1 | |
bin/kafka-topics.sh --zookeeper esv4-hcl197.grid.linkedin.com:2181 --create --topic test --partitions 6 --replication-factor 3 | |
Single thread, no replication | |
bin/kafka-run-class.sh org.apache.kafka.clients.tools.ProducerPerformance test7 50000000 100 -1 acks=1 bootstrap.servers=esv4-hcl198.grid.linkedin.com:9092 buffer.memory=67108864 batch.size=8196 |
NewerOlder