Skip to content

Instantly share code, notes, and snippets.

View marquesds's full-sized avatar
🤖
about:robots

Lucas Marques marquesds

🤖
about:robots
View GitHub Profile
#include<stdlib.h>
#include<stdio.h>
#include<string.h>
int main(){
char *buffer = NULL;
char palavra;
printf("Alocando memoria\n");
@kwmiebach
kwmiebach / pytest.md
Last active June 4, 2024 06:29 — forked from amatellanes/pytest.sh
pytest cheat sheet

Usage

(Create a symlink pytest for py.test)

pytest [options] [file_or_dir] [file_or_dir] ...

Help:

@fancellu
fancellu / ConsumerExample.scala
Last active June 28, 2023 15:35
Kafka Producer/Consumer Example in Scala
import java.util
import org.apache.kafka.clients.consumer.KafkaConsumer
import scala.collection.JavaConverters._
object ConsumerExample extends App {
import java.util.Properties

Oh my zsh.

Install with curl

sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

Enabling Plugins (zsh-autosuggestions & zsh-syntax-highlighting)

  • Download zsh-autosuggestions by
@wojteklu
wojteklu / clean_code.md
Last active July 23, 2024 07:47
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

@marwei
marwei / how_to_reset_kafka_consumer_group_offset.md
Created November 9, 2017 23:39
How to Reset Kafka Consumer Group Offset

Kafka 0.11.0.0 (Confluent 3.3.0) added support to manipulate offsets for a consumer group via cli kafka-consumer-groups command.

  1. List the topics to which the group is subscribed
kafka-consumer-groups --bootstrap-server <kafkahost:port> --group <group_id> --describe

Note the values under "CURRENT-OFFSET" and "LOG-END-OFFSET". "CURRENT-OFFSET" is the offset where this consumer group is currently at in each of the partitions.

  1. Reset the consumer offset for a topic (preview)
@jiffle
jiffle / strikt-cheatsheet.md
Last active March 2, 2023 15:44
Strikt Cheatsheet

Tricks and tips for using Strikt assertions

Strikt is very powerful, however it is sometimes hard to find particular methods. This is a handy cheatsheet.

Basics

Top-level assertions

expect, expectThat, expectCatching and expectThrows

@lalizita
lalizita / main.go
Last active August 9, 2022 18:56
Quiz with timer in Go
package main
import (
"fmt"
"os"
"time"
)
func timer() {
// Cria um ticker, um relógio que retorna um channel com o tempo atual,