Skip to content

Instantly share code, notes, and snippets.

View dgonzalez's full-sized avatar

David Gonzalez dgonzalez

View GitHub Profile
@dgonzalez
dgonzalez / add CA cert on CentOS Debian Ubuntu.md
Created August 16, 2018 09:20 — forked from kekru/add CA cert on CentOS Debian Ubuntu.md
Add CA cert to local trust store on CentOS, Debian or Ubuntu
  • Open a webpage that uses the CA with Firefox
  • Click the lock-icon in the addressbar -> show information -> show certificate
  • the certificate viewer will open
  • click details and choose the certificate of the certificate-chain, you want to import to CentOS
  • click "Export..." and save it as .crt file
  • Copy the .crt file to /etc/pki/ca-trust/source/anchors on your CentOS machine
  • run update-ca-trust extract
  • test it with wget https://thewebsite.org
@dgonzalez
dgonzalez / README.md
Last active October 14, 2019 14:49
joi-validators

joi-decorators

What do we want?

Something similar to (roughly, not even syntactically ok):

------
class User {
 @Min(10)

Keybase proof

I hereby claim:

  • I am dgonzalez on github.
  • I am dgonzalez (https://keybase.io/dgonzalez) on keybase.
  • I have a public key whose fingerprint is 65FE 8242 9066 DED3 7516 795E 197D AA7C BE36 B6C5

To claim this, I am signing this object:

@dgonzalez
dgonzalez / onion-demo.md
Created May 30, 2017 08:51
Arquitectura cebolla

Node.js y la arquitectura en capas de cebolla con InversifyJS

Este ejemplo demuestra cómo integrar InversifyJS con Express y como implementar aplicaciones que se adhieren a la arquitectura en capas de cebolla. Esta arquitectura de capas puede representarse en un diagrama como sigue:

onion

La principal diferencia entre una arquitectura de n-capas tradicional y la arquitectura cebolla es la dirección de las dependencias entre capas.

En la arquitectura cebolla aplicamos el principio de inversión de dependencias. Los detalles de la implementación (infraestructura) depende de las abstracciones (dominio):

@dgonzalez
dgonzalez / benchmark-commands.txt
Created July 15, 2016 14:08 — forked from jkreps/benchmark-commands.txt
Kafka Benchmark Commands
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
set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" let Vundle manage Vundle, required
Plugin 'gmarik/Vundle.vim'
Plugin '[email protected]:scrooloose/nerdtree.git'
Plugin '[email protected]:kien/ctrlp.vim.git'