teleren/devto huggingface dataset:
Apagar eventos do kafka?
Tags: kafka, apachekafka, kafkabr
Published: 2020-05-25 16:23:28

Você já deve ter-se perguntado se é possível apagar eventos do Kafka, não? Bem, isso realmente não é possível.

Mas existe uma forma especial utilizada principalmente para atender o direito ao esquecimento, requerido pela LGPD em alguns países.

⚠️ Atenção! ⚠️ Entenda todos os impactos antes de alterar qualquer tópico que você já tenha ai no seu cluster Kafka.

---

Isso não se trata de um hack ou algo do tipo, até porque ele está descrito no livro ["Kafka: The Definitive Guide"](https://www.confluent.io/resources/kafka-the-definitive-guide) 😊.

---

Primeiro, seu tópico deverá ser compactado, ou seja, a configuração `cleanup.policy` deve ser igual a `compact`. Ele garantirá que somente o evento mais recente será mantido.

Em um tópico compactado é mandatório produzir eventos com chave de partição, o atributo `key`. É com base nele que o Kafka manterá o evento mais recente.

Digamos que existe o tópico `clientes` com os seguintes eventos na partição `3`:

```
CHAVE   VALOR DO EVENTO
C001    Cliente 1y
C002    Cliente 2+
C003    Cliente 3@
C001    Cliente 1π
```

Veja que a chave `C001` tem um evento mais recente, que será mantido após a compactação do tópico:

```
CHAVE   VALOR DO EVENTO
C002    Cliente 2+
C003    Cliente 3@
C001    Cliente 1π
```

Agora que você entendeu a compactação, para "apagar" um evento, o `C003` por exemplo, bastará produzir um evento sem valor com a mesma chave:

```
CHAVE   VALOR DO EVENTO
C001    Cliente 1y
C002    Cliente 2+
C003    Cliente 3@
C001    Cliente 1π
C003
```

Então, após compactação do tópico, o cliente `C003` deixará de existir:

```
CHAVE   VALOR DO EVENTO
C001    Cliente 1y
C002    Cliente 2+
C001    Cliente 1π
C003
```

Aqui foi um exemplo, mas a chave de partição poderia ser o CPF, CNPJ ou qualquer outra valor pertinente ao caso se uso.

---

Simples, não? Mas não se engane, porque empregar chave de partição não uma regra geral. Então, não mude as configurações do seu tópico antes de entender as consequências.

Se você já tem um tópico com eventos produzidos sem chave, a primeira coisa que acontecerá quando mudar a `cleanup.policy` para `compact` é que todos eles serão eliminados 😬. Mudar configurações de tópicos só com muita análise dos impactos.

---

É isso. 

Obrigado pelo leitura e até o próximo!
How to deploy STATEFUL container on DigitalOcean
Tags: docker, devops, digitalocean
Published: 2020-05-25 16:10:32

The examples of usage includes,

- When you want to use MongoDB Atlas beyond [free tier limits](https://docs.atlas.mongodb.com/reference/atlas-limits/); or other self-hosted database
- Self-hosted WordPress
- Self-hosted stateful docker container, such as [Remark42](https://remark42.com/) or [Isso](https://posativ.org/isso/).

(I have done all three.)

Actually, it's the answer to this question.

{% post https://dev.to/patarapolw/need-help-deploy-docker-that-needs-storage-on-google-2l7n %}

The steps required are

- Create a droplet on DigitalOcean. An easy way is to be [preinstalled with Docker](https://marketplace.digitalocean.com/apps/docker/)
- Add non-root user to the droplet -- [How To Create a New Sudo-enabled User on Ubuntu 18.04 [Quickstart]](https://www.digitalocean.com/community/tutorials/how-to-create-a-new-sudo-enabled-user-on-ubuntu-18-04-quickstart)
- Add SSH tunneling to VSCode -- [How To Use Visual Studio Code for Remote Development via the Remote-SSH Plugin](https://www.digitalocean.com/community/tutorials/how-to-use-visual-studio-code-for-remote-development-via-the-remote-ssh-plugin)
- Add domain name (or subdomain) to the droplet -- [How do you point a subdomain to DigitalOcean without using or the original domain or changing nameservers?](https://www.digitalocean.com/community/questions/how-do-you-point-a-subdomain-to-digitalocean-without-using-or-the-original-domain-or-changing-nameservers)
- Add auto-renewing SSH certificate (for HTTPS) to the droplet.
  - [nginx-le](https://github.com/nginx-le/nginx-le)
  - For Remark42, you just need a right settings, because the author is the same person who created nginx-le

```dockerfile
    ports:
      - "80:8080"
      - "443:8443"

    environment:
      - SSL_TYPE=auto
      - SSL_ACME_EMAIL=<YOUR_EMAIL>
      - IMAGE_PROXY_HTTP2HTTPS=true
```

Don't know if this is just my experience. `docker-compose build` on DigitalOcean droplet failed due to not enough memory. I have to build on my development machine (macOS), then `push` to Docker Hub. (Yes, this is my first time pushing to Docker Hub.) For anyone curious, see [this gist](https://gist.github.com/patarapolw/4c72fa4612c6e1c45474b82bac157f4a).

For the time-being, feel free to visit the result of my success. -- https://polv.cc
My latest project!: The Name Generator V 3.0
Tags: ruby, showdev
Published: 2020-05-25 16:05:16

#SO... This is kind of awkward
###### SMH, SMH, SMH!!
A few years ago I tried making a python generator that would yield a different name every 5 seconds unless the user chose one. I was in 6th grade... so as you might have guessed it didn't work(P.S. I was a clueless idiot). A year later I tried to do the same thing using ruby, and it still didn't work, that was at the beginning of 7th grade. So, I turned in a different direction using the same simple idea of generating names, instead of making them using time intervals I'd do something else. Something you'll get to see shortly.

##On towards the second attempt!
Like the average psychopath, I tried the same thing again with little to no change, again and again. 
![SMH, SMH, SMH, SMH, SMH, SMH, SMH!!!!!!](https://pa1.narvii.com/6368/764fbd6328264a0d2e5c2d9e7bcb6193aaca7888_hq.gif)
<figcaption>Shake My Head</figcaption>
#####After I stopped my insanity...
I decided to do something foreign to 7th grade cringe, LEARN. So, after my night in the woods The Name Generator V 2.0 actually worked! You're probably thinking, ![The more you know](https://i.kym-cdn.com/entries/icons/facebook/000/014/033/The_More_You_Know_0-0_screenshot.jpg)
but in truth it was actually more like, ![You know nothing](https://i.imgflip.com/1ejszm.jpg)
because my journey to success was exactly like this:
![I didn't know why it didn't work to me not knowing why it's working.](https://d.justpo.st/media/images/2013/03/463e4e4f4acb9afc185a067b7f360321.jpg)
####FYI, I'm competent now, I know what I'm doing.
#It is time
Okay, I have wasted enough of your time. Here is The Name Generator V 3.0. Tbh, I hope it's not a disappointment. If you use repl.it, you can fork it and put a link to your version in the comments. If you have any questions put them in the comments below.
{% replit @OreOlad2/Name-Generator-V-30 %}
Build a Dice Roll Game - JavaScript CSS Tutorial for Beginners (Video Format)
Tags: javascript, tutorial, beginners, css
Published: 2020-05-25 16:01:37

{% youtube B17NC5DD-dA %}

In this tutorial, we'll create a Dice Roll Game using HTML, CSS & JavaScript. This project-based tutorial is suitable for all especially beginners.

📕 Concepts covered in this video:
 - How to create awesome Dice Roll Game
 - DOM manipulations
 - CSS Gradients
 - Conditional Statements
I published a repo called searchfiy on GitHub
Tags: sideprojects, github, javascript, programming
Published: 2020-05-25 15:54:50

Hi everyone!

I published a repository called searchify for a hobby. It is written in JavaScript.

Searchify generates searchable links (optionally anchor tags) for search engines or custom URLs. Maybe that would be useful for you.

I'm not sure if this will help someone. But I used searchify in my project with Vue.

Pull Requests are welcome. Thanks!

 {% github aligoren/searchify %}
Visual Studio Code Spaces Deep Links
Published: 2020-05-25 15:53:03

I am blown away by the Deep link feature with Visual Studio CodeSpaces projects.

Create your own deep link is quite simple:

For example: https://online.visualstudio.com/environments/new?name=dotnetcore&repo=roryp/dotnetcorecodespace

It builds a ready to debug ASP.NET dotnetcore IDE environment! 

Choose from many pre-build templates - https://github.com/microsoft/vscode-dev-containers
Python Zero to Hero - Ep.8 - Decorators
Tags: python, tutorial, beginners, video
Published: 2020-05-25 15:50:05

---
title: Python Zero to Hero - Ep.8 - Decorators
published: true
description: Today we cover what is a decorator and the basics of how to write a decorator. We also cover using the property decorator to write some getters and setters. If you have any questions or any suggestions about which Python topics to cover, please leave your comment at my Twitch channel
tags: python, tutorial, beginner, video
---
Today we cover what is a decorator and the basics of how to write a decorator. We also cover using the property decorator to write some getters and setters. If you have any questions or any suggestions about which Python topics to cover, please leave your comment at my [Twitch channel](https://www.twitch.tv/cheukting_ho)

You can get the slide deck [here](https://slides.com/cheukting_ho/python-decorators/) and the example code and homework form [GitHub here](https://github.com/Cheukting/python02hero). Ask questions at my [Twitch channel](https://www.twitch.tv/cheukting_ho)

Also, check out Naomi Ceder's [Twitch channel](https://www.twitch.tv/nceder) for more beginner's (slightly more advance) tutorial.
[pt-BR] Por que escrever e por que Dev.to?
Tags: braziliandevs
Published: 2020-05-25 15:37:09

*Por favor perdoem minha falta de acentos nesse post*

Bom dia, Boa tarde, Boa noite!
Meu nome eh Patricia, mais conhecida como Pachi (leia Pati) e eu sou uma desenvolvedora de Web brasileira que mora nos Estados Unidos.

Eu codo ha menos de 2 anos, e aprendi na internet mesmo tudo que eu sei. 
Escrever posts sobre minha jornada e estudos tem sido desde de o comeco, uma parte super importante do meu crescimento.


##Eu escrevo porque:##
- Escrever sobre o que eu aprendo me ajuda a fixar o conhecimento na minha mente e aos mesmo tempo eu compartilho com pessoas que talvez tem tido alguma dificuldade em entender certos conceitos,
- Eu represento mulheres em tecnologia, e isso ajuda a criar espaco para mais mulheres, 
- Eh uma maneira de monstrar meu conhecimento, minha personalidade e o quanto sou apaixonada por codigo, o que me da uns pontos extras na buscar por oportunidades,
- Conheco novas pessoas, faco networking e amizades.


##Por que Dev.to?##
Sou super fan do Dev.to e quero muito ver a comunidade brasileira aqui crescer, entao conversei com eles e logo a tag #brazillianDevs vai ser moderada e espero que isso de uma ajuda pra nossa comunidade aqui.

A comunidade aqui eh otima, mas a grande maioria escreve em Ingles. Independente disso, eles oferecem espaco pra todo Dev compartilhar suas ideias e conhecimento. 
Ter o seu proprio blog muitas vezes eh o ideal, mas eu particularmente nao tenho tempo nem vontade de cuidar de um blog proprio, e postando aqui eu sinto que meu post tem mais changes de fazer uma diferenca e ajudar a comunidade.

##Conclusao##
- Escrever eh uma otima maneira de ajudar os outros, cimentar seu conhecimento e apresentar suas habilidades.
- Dev.to eh uma otima plataforma pra quem nao uqer manter blog proprio e eh voltado 100% pra desenvolvedores.
An API Boilerplate to create a ready-to-use REST API in seconds with NestJS 9.x/10.x (JWT Auth System, Typeorm)😻
Tags: nestjs, typescript, backend, typeorm
Published: 2020-05-25 15:30:45

In recent months I have used many javascript and typescript frameworks including Vue, Angular and React for the frontend while for the server side I was looking for a framework written in typescript for the backend at the time I only knew express js as it was very simple to learn, but I was looking for something different that allowed me to use typescript more efficiently, doing a little research I discovered NestJS and it was love ♥️  😻at first sight! Let me explain things [Nestjs](https://nestjs.com), A progressive Node.js framework for creating efficient, reliable and scalable server-side applications.

Since I really like to develop API REST, create authentication systems with JWT, Basic Auth or OAuth2, I created a boilerplate with Nestjs from which you have a great base to start developing your APIs in a short time, as an authentication system I used JWT with the use of [TypeORM](https://typeorm.io) a very powerful ORM to model your database.

This is the link to my repository [nestjs-api-boilerplate-jwt](https://github.com/Tony133/nestjs-api-boilerplate-jwt)

Hopefully it can be useful both for those who know nestjs and for those who have never used it. 😀 For anything write me in the comments😉
org-mode quick start
Tags: emacs, orgmode
Published: 2020-05-25 15:19:28

Someone on Hacker News [made this comment](https://news.ycombinator.com/item?id=23301186)

> A few simple observations:
>
> - the venn diagram of people using emacs and using org-mode seems to largely overlap. That makes it impractical in non emacs heavy environments (aka. the wider industry).
> 
> - tooling outside of emacs is mostly not there.
>
> - org mode is a basically similar to other wiki dialects with similar syntax, limitations, tooling, etc. Other than the (emacs) tooling, I don't see a strong reason for preferring it.
> 
> The above makes it a non-starter for me personally (not an emacs user) or for teams that have non emacs users (i.e. all teams I've been on, ever). That does not invalidate it as a personal note taking tool of course. But lets indeed not overstate its utility. Some people like post-its, scribbling in a notebook, simply remembering to do stuff, or their super duper emacs setups. Whatever works for you. 

I thought it would be worthwhile to elaborate on my reply here. I think it's a myth, promoted by Emacs users, that you have to engage in extensive customization and memorize many weird keyboard shortcuts, in order to use org-mode. That's very wrong. **Anyone that uses a computer can use org-mode in Emacs.**

*org-mode is available by default*. That means you only need to open a .org file in Emacs and all of org-mode is waiting for you. It may not be well known, but Emacs has a menu bar. You can click to open a file as in any other GUI program.

*Wiki-style hyperlinks without a browser and web server.* Hit `C-c C-l` and it will prompt for the link and description. If you want to link to another .org file, remember to add the path, as in `./anotherfile.org`. To edit the link, use the same shortcut. To open anotherfile.org for editing, click the link. None of this is hard. Indeed, this is as easy as any self-hosted personal wiki solution I know of. It's unclear how it could be any easier in the absence of reading your mind.

*A full-blown outliner.* If you want a top-level heading, start the line with `*`. If you want a second-level heading, start the line with `**`. And so on, as deep as you want to go. You can add notes to an item by typing below the heading. You can hide the notes by hitting Tab on the heading. What's really powerful is the ability to move subtrees around using Alt plus arrows. Left and right change the level of the heading. Up and down move the entire subtree up or down. If you want to get REALLY FANCY, you hit Shift along with the right and left arrows to cycle through marking items as TODO, DONE, and unmarked.

I've just outlined a tremendously powerful knowledge management system. I provided *one shortcut* for hyperlinking. I talked about the Alt-arrow combinations for outlining. I talked about Shift-arrow combinations for TODO functionality. I challenge anyone that reads this to leave a comment demonstrating another system that does all that but with a significant reduction in complexity. No such system exists, because it's close to the lower bound on complexity.
Omni - A tabs, history and bookmarks search companion
Tags: chrome, productivity, bookmarking, extensions
Published: 2020-05-25 15:11:50

---
title: Omni - A tabs, history and bookmarks search companion
published: true
description: The fastest way to switch tabs and search your history and bookmarks
tags: chrome, productivity, bookmarking, extensions
---

![demo1](https://i.imgur.com/J5cpuQA.png)

We've launched [Omni](https://www.producthunt.com/posts/omni-2), the new [Tefter](https://tefter.io) browser extension that lets you search and navigate your open tabs, history and Tefter bookmarks. It also automatically groups together similar links.


We usually have many tabs open, it hurts productivity and increases stress. After a certain number of tabs, their titles are not even visible. Most of us switch between tabs, helplessly guessing by the favicons, hundreds of times a day. When it comes to history, trying to find a page from let's say last week, the browsers make it almost impossible. Think about it, Google with their Chrome browser has interest in you blindly "googling" stuff instead of really helping you. Firefox would want you to bookmark everything on Pocket, which shows ads and you may even end up buying a subscription there.

Omni is the fastest tab and history search tool out there. It's free, never shows ads and won't sell your data. All your data stays local and is optimally indexed. It's tailored for users who prefer keyboard-driven interactions. It analyzes your history and tab switching behavior and the more you use it the better the search results you see.

We truly believe it can change the way we surf the web and this is only the beginning.

To install:

* [Chrome](https://chrome.google.com/webstore/detail/tefter/eldofalegbgagpenjjcapjaogpioldoh)
* [Firefox](https://addons.mozilla.org/firefox/addon/tefter/)

We'd love to get some feedback from you. Please comment and upvote!

https://www.producthunt.com/posts/omni-tabs-and-history-search-by-tefter
Do You Even Toot? – Mastodon for Developers
Tags: discuss
Published: 2020-05-25 15:00:05

It's been almost two years since I started this thread.

{% post https://dev.to/nikoheikkila/are-there-any-mastodon-instances-for-devs-2p64 %}

Since then, I've found quite a lot of interesting topics and developers to follow. Despite the [comment section](https://dev.to/nikoheikkila/are-there-any-mastodon-instances-for-devs-2p64) Mastodon is still thriving and [attracting users](https://www.bbc.com/news/world-asia-india-50343054) who wish not to be poisoned by a toxic cloud.

![Toxic Cloud meme from Fallout series](https://dev-to-uploads.s3.amazonaws.com/i/8eukidesx3elb1ol3t40.jpg)

The user experience and federated community spirit of the Mastodon also [drove me to quit Twitter](https://nikoheikkila.fi/blog/why-i-m-quitting-twitter/). I still do cross-post there using a 3rd party integration bridge but I haven't otherwise felt the need to look back.

## Round 2

How is the general Mastodon appeal after a couple of years? Obviously, it won't kill Twitter, but not every social network need to be a killer of something.

Have you jumped the ship? Are you posting to a well-known instance or running your own?

I am [**nikoheikkila@mastodon.technology**](https://mastodon.technology/@nikoheikkila) which you can also find in my profile. If you need invitations or any help in getting started with Mastodon, let me know!
Devart Rolled Out Improved dbForge Tools for MySQL v.9.0
Tags: mysql, databaseadministration, dba, database
Published: 2020-05-25 14:59:47

---
title: Devart Rolled Out Improved dbForge Tools for MySQL v.9.0
published: true
description: Devart introduced new versions of its dbForge products for MySQL v.9.0. The updated tools got the support for new types of database objects, new handy features, and other useful options.
tags: MySQL, database administration, DBA, database
---
*Devart introduced new versions of its dbForge products for MySQL v.9.0. The updated tools got the support for new types of database objects, new handy features, and other useful options.*

Devart, a recognized vendor of professional database management software for developers and DBAs, announced the release of [dbForge tools for MySQL v.9.0](https://www.devart.com/dbforge/mysql/). The products got new great features such as script folder comparison for Schema Compare and Data Compare, support for new types of database objects, ability to configure default values in the Data Synchronization wizard, and many more updates and fixes.

**Let’s look at the release updates in more detail:**

- **New Supported Object Types.** Users can now work with such MariaDB 10.3 objects as Packages & Sequences.
- **Scripts Folder Comparison.** Remote MySQL database schemas and data can now be compared with the ones stored locally in the script folders and vice versa.
- **Updated Schema and Data Compare Functionality.** Object Filter is implemented. Reports in HTML and CSV were significantly redesigned. New options for Data Synchronization were added.
- **Code Completion and Data Editor.** Cached Updates mode is implemented for users’ convenience.
- **SQL Document Improvements.** The –nowarn and –endnowarn tags are added to the Execution warnings functionality. Also, the execution history can now be exported in the CSV file format.
- **Documenter Improvements.** The database title in the generated documentation is now correctly broken into multiple lines no matter its length.
- **Updated Connectivity Features.** Connectivity support for MariaDB 10.5 and SkySQL is implemented. The server type is now displayed in the Properties window and the Connections tab located in the System Info window.
- **Command line.** Command Line prompt has been expanded with a full list of available exit codes. Activation can now be done via CLI.

You can check more information about the recent release at the Devart official blog – https://blog.devart.com/mysql-minitools-9-0-release.html

**About Devart**

Devart is one of the leading developers of database tools and administration software, ALM solutions, data providers for various database servers, data integration, and backup solutions. The company also implements Web and Mobile development projects.
For additional information about Devart, visit https://www.devart.com/
100daysofcode Flutter
Tags: 100daysofcode, flutter
Published: 2020-05-25 14:39:54

day 77/100 of #100daysofcode #Flutter
Learning Flutter , courses Udemy from
@maxedapps

 Today learn about sqlite,get data and implements some ui
https://github.com/triyono777/100-days-of-code/blob/master/log.md
A little late this year - Easter Bunny with pure CSS
Tags: css, challenge, codepen, tutorial
Published: 2020-05-25 14:39:36

Inspired by the article from <a href="https://dev.to/s_aitchison">Suzanne Aitchison</a> and her <a href="https://dev.to/s_aitchison/join-me-for-100-days-of-pure-css-48fo"> Scottish 100 Days Project</a> of 100 images in pure CSS I really wanted to join in. Unfortunately, I'm stuck in other projects.
But I wanted at least to contribute something to this cool idea. 

So I present the Easter Bunny in Pure CSS.
(I know, I know, he is really late this year :D)

I posted this tutorial on Easter on my blog. You can find it here: <a href="https://fridad.com/happy-easter-bunny-with-pure-css/">Happy Easter! Bunny in Pure CSS</a>. 

If you want to see it on CodePen, you can find it [here](https://codepen.io/CodeWithFrida/pen/MWaYLpO)

I hope you enjoy it as much as I did create it! And if you have any questions or remarks, don't hesitate to reach out to me.

-------------------