Skip to content

Instantly share code, notes, and snippets.

💭
rêveur

upd prayagupd

Block or report user

Report or block prayagupd

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@prayagupd
prayagupd / unparsers.scala
Created Oct 12, 2018 — forked from ehoner/unparsers.scala
WIP: This is a translation of the examples in haskell to scala through section 4.2.
View unparsers.scala
// 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
@prayagupd
prayagupd / learnyouerlang.md
Last active Dec 26, 2017
learnyousomeerlang, erlang
View learnyouerlang.md

installation

brew install erlang

Tuple datastructure

@prayagupd
prayagupd / TLS_Tutorial_Copy.md
Last active Sep 1, 2017 — forked from mtigas/gist:952344
Mini tutorial for configuring client-side SSL certificates.
View TLS_Tutorial_Copy.md

Client-side SSL

For excessively paranoid client authentication.

Using self-signed certificate.

Create a Certificate Authority root (which represents this server)

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
@prayagupd
prayagupd / TLS.md
Last active Sep 12, 2017
TLS, https, tomcat, p12
View TLS.md

Server cert

private key

openssl genrsa -out restapi.key 2048                                                                   

Cert Signing Request

@prayagupd
prayagupd / certificateKeytool.txt
Created Aug 25, 2017 — forked from dahernan/certificateKeytool.txt
generate self signed certificate with keytool
View certificateKeytool.txt
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.
View kinesis.py
# 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)
View JSONObject.scala
import scala.util.parsing.json.JSONObject
/**
* Created by prayagupd
* on 2/16/17.
*/
object Test {
View benchmark-commands.txt
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
@prayagupd
prayagupd / Jenkins_Linux_rhel.md
Last active Feb 9, 2019
jenkins, CI, CD, gocd
View Jenkins_Linux_rhel.md

Installation

sudo wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins-ci.org/redhat/jenkins.repo
sudo rpm --import https://jenkins-ci.org/redhat/jenkins-ci.org.key
sudo yum install jenkins
You can’t perform that action at this time.