Skip to content

Instantly share code, notes, and snippets.

View jacobparra's full-sized avatar

Jacob Parra jacobparra

  • Walmart Chile
  • Santiago, Chile
View GitHub Profile
// import { BaseServer, BindingCallback, RawEvent } from '../base-server';
import {
createReadStream, createWriteStream, ConsumerStream, ProducerStream, ConsumerStreamMessage
} from 'node-rdkafka';
import { Subject, Observable, Observer, Subscription } from 'rxjs';
import { EVENTS } from '../../../experiment/events';
export interface Partition {
observer: Subject<ConsumerStreamMessage>;
@jacobparra
jacobparra / README.md
Last active August 12, 2022 14:57
Confluent Kafka with docker-compose

Confluent Kafka with docker-compose

This is an example app of how setup and use kafka.

The docker-compose provide access to the following services:

  • Zookeeper: port 2181
  • Kafka: port 9092
  • Schema Registry: port 8081
  • Kafka Rest: port 8082

Keybase proof

I hereby claim:

  • I am jacobparra on github.
  • I am jacobparra (https://keybase.io/jacobparra) on keybase.
  • I have a public key whose fingerprint is 7B6D C271 05EF 2DC0 E80F D8F3 F3C1 AD43 6B98 CFE5

To claim this, I am signing this object:

#!/usr/bin/env ruby
require 'countries'
require 'json'
ISO3166.configure do |config|
config.locales = [:es, :pt]
end
LOCALE = :es
@jacobparra
jacobparra / ubuntu-post-install-script.sh
Last active January 27, 2016 06:44
Post-installation script for Ubuntu
#!/bin/sh
# Installation
#
# wget -qO- https://gist.githubusercontent.com/jacobrpg/222b1cb3f699566bad44/raw/2e6d51c10ea9afdab489e9aba7fafe46e7c42857/ubuntu-post-install-script.sh | sh -
#
# References
#
# http://www.unixmen.com/top-things-installing-ubuntu-14-0413-1013-0412-1012-04/
# http://howtoubuntu.org/things-to-do-after-installing-ubuntu-14-04-trusty-tahr
@jacobparra
jacobparra / serializers.py
Last active December 25, 2015 07:18
Django AJAX Login using django-rest-framework
# -*- coding: utf-8 -*-
from rest_framework import serializers
from users import models
class LoginSerializer(serializers.Serializer):
email = serializers.EmailField(max_length=254)
password = serializers.CharField(max_length=128)
# -*- coding: utf-8 -*-
from django.utils.http import is_safe_url
from django.shortcuts import resolve_url
from django.contrib.auth import REDIRECT_FIELD_NAME, login
from django.contrib.auth.forms import AuthenticationForm
from django.utils.decorators import method_decorator
from django.views.decorators.cache import never_cache