Skip to content

Instantly share code, notes, and snippets.

View albertogviana's full-sized avatar

Alberto Guimarães Viana albertogviana

View GitHub Profile
@albertogviana
albertogviana / kafka-cheat-sheet.md
Created July 11, 2018 09:27 — forked from ursuad/kafka-cheat-sheet.md
Quick command reference for Apache Kafka

Kafka Topics

List existing topics

bin/kafka-topics.sh --zookeeper localhost:2181 --list

Describe a topic

bin/kafka-topics.sh --zookeeper localhost:2181 --describe --topic mytopic

Purge a topic

bin/kafka-topics.sh --zookeeper localhost:2181 --alter --topic mytopic --config retention.ms=1000

... wait a minute ...

@albertogviana
albertogviana / clean-up-boot-partition-ubuntu.md
Created October 1, 2018 10:54 — forked from ipbastola/clean-up-boot-partition-ubuntu.md
Safest way to clean up boot partition - Ubuntu 14.04LTS-x64

Safest way to clean up boot partition - Ubuntu 14.04LTS-x64

Reference

Case I: if /boot is not 100% full and apt is working

1. Check the current kernel version

$ uname -r 
@albertogviana
albertogviana / TunnelClient.java
Last active December 1, 2022 18:10 — forked from denis-kalinin/TunnelClient.java
Using Apache MINA to create SSL/TLS connection with client certificate
import org.apache.mina.filter.ssl.SslFilter;
import org.apache.mina.transport.socket.nio.NioSocketConnector;
public class TunnelClient{
.......
NioSocketConnector nioConnector = new NioSocketConnector(1);
nioConnector.setDefaultRemoteAddress(tunnelServerAddress);
nioConnector.setHandler(handler);
SslFilter sslFilter = new SslFilter(getSSLContext());
@albertogviana
albertogviana / ReadBigFileAndParse.go
Created July 12, 2022 18:30 — forked from rodkranz/ReadBigFileAndParse.go
Read big file and unmarshal in json
// Package main
// Copyright 2017 Kranz. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
/**
Test read file by chunks
➜ read ll
total 13241936
drwxr-xr-x 5 rlopes staff 170B 16 Jan 01:19 ./