Skip to content

Instantly share code, notes, and snippets.

View cig0's full-sized avatar

Martín Cigorraga cig0

View GitHub Profile
@cig0
cig0 / benchmark-commands.txt
Created January 13, 2019 23:32 — forked from zodvik/benchmark-commands.txt
Kafka (1.0.0) Benchmark Commands
Producer
Setup
bin/kafka-topics.sh --zookeeper localhost:2181/kafka-local --create --topic test-rep-one --partitions 6 --replication-factor 1
bin/kafka-topics.sh --zookeeper localhost:2181/kafka-local --create --topic test-rep-two --partitions 6 --replication-factor 3
Single thread, no replication
bin/kafka-run-class.sh org.apache.kafka.tools.ProducerPerformance --print-metrics --topic test-rep-one --num-records 6000000 --throughput 100000 --record-size 100 --producer-props bootstrap.servers=kafka_host:9092 buffer.memory=67108864 batch.size=8196
Single-thread, async 3x replication
@cig0
cig0 / virtualenv
Created September 2, 2018 02:20 — forked from maemual/virtualenv
golang virtualenv
export GOPATH="$(cd "$(dirname "${BASH_SOURCE[0]}" )" && pwd)"
export OLDPS1=$PS1
export PS1="[go:$(basename $GOPATH)] $PS1"
alias gcd="cd $GOPATH"
deactivate() {
export PS1=$OLDPS1
unset GOPATH
unset OLDPS1
unalias gcd
unset deactivate
@cig0
cig0 / nginx-ssl-config
Created July 30, 2018 15:43 — forked from apollolm/nginx-ssl-config
Nginx Configuration with multiple port apps on same domain, with SSL.
# the IP(s) on which your node server is running. I chose port 3000.
upstream app_geoforce {
server 127.0.0.1:3000;
}
upstream app_pcodes{
server 127.0.0.1:3001;
}
@cig0
cig0 / gist:c3bee224160aa5b37ec8939d9326c303
Created May 11, 2018 19:46
Rename both local and remote branch
Source: https://multiplestates.wordpress.com/2015/02/05/rename-a-local-and-remote-branch-in-git/
1. Rename your local branch:
If you are on the branch you want to rename:
git branch -m new-name
If you are on a different branch:
git branch -m old-name new-name
2. Delete the old-name remote branch and push the new-name local branch.
@cig0
cig0 / ubuntu_mount_efs.md
Created April 4, 2018 13:31 — forked from ryanmaclean/ubuntu_mount_efs.md
Mount EFS on Ubuntu Linux

EFS Mounting on Ubuntu

Get EFS ID

aws configure set preview.efs true
aws efs describe-file-systems --profile TEST --region us-east-2
{
@cig0
cig0 / ubuntu_mount_efs.md
Created April 4, 2018 13:31 — forked from ryanmaclean/ubuntu_mount_efs.md
Mount EFS on Ubuntu Linux

EFS Mounting on Ubuntu

Get EFS ID

aws configure set preview.efs true
aws efs describe-file-systems --profile TEST --region us-east-2
{
@cig0
cig0 / README.md
Created January 19, 2018 15:26 — forked from magnetikonline/README.md
AWS CLI S3 usage examples.
@cig0
cig0 / sources.list
Created November 20, 2017 08:44
All official Ubuntu repositories
deb http://archive.ubuntu.com/ubuntu artful main universe
deb http://us.archive.ubuntu.com/ubuntu/ artful main restricted
deb http://us.archive.ubuntu.com/ubuntu/ artful universe
deb http://us.archive.ubuntu.com/ubuntu/ artful multiverse
deb http://us.archive.ubuntu.com/ubuntu/ artful-updates multiverse
deb http://us.archive.ubuntu.com/ubuntu/ artful-updates universe
deb http://archive.ubuntu.com/ubuntu artful-updates main universe
deb http://us.archive.ubuntu.com/ubuntu/ artful-updates main restricted
deb http://archive.canonical.com/ubuntu artful partner
deb http://security.ubuntu.com/ubuntu artful-security main restricted
@cig0
cig0 / sshd_config
Last active November 20, 2017 05:20
SSH server hardening
#################
# #
# Hardening #
# #
#################
ChallengeResponseAuthentication no
### Temporarily enabled to check IPs of possibly attackers
PasswordAuthentication yes
### Keybase proof
I hereby claim:
* I am cig0 on github.
* I am cig0 (https://keybase.io/cig0) on keybase.
* I have a public key ASDzL8PVlcXTJTNesuhv6vy2CjEA_Q6y7CDZPItWebX3awo
To claim this, I am signing this object: