teleren/devto huggingface dataset:
Getting Started with Apache Kafka
Tags: devops, apache, kubernetes, webdev
Published: 2024-04-01 00:33:23

## Introduction

Apache Kafka is an open-source platform used for high-performance and real-time data streaming. It was originally developed by the engineers at LinkedIn and later was made an open-source project by the Apache Software Foundation. With its distributed and scalable architecture, Apache Kafka has gained immense popularity in recent years. In this article, we will explore the basics of Apache Kafka and how you can get started with it.

## Advantages of Apache Kafka

1. **High performance and scalability:** Apache Kafka is designed to handle high volumes of data with low latency, making it suitable for real-time applications.
2. **Fault-tolerant:** Its distributed architecture ensures that no data is lost in case of node failures.
3. **Flexibility:** Apache Kafka can be integrated with various programming languages, frameworks, and databases, making it versatile for different use cases.
4. **Easy to use:** With a user-friendly API and documentation, it is relatively easy to get started with Apache Kafka.
5. **Cost-effective:** As an open-source platform, Apache Kafka can be used without any licensing fees, making it a cost-effective option.

## Disadvantages of Apache Kafka

1. **Complexity:** Setting up and configuring Apache Kafka can be a daunting task for beginners.
2. **Maintenance:** Regular updates and maintenance of the system can be time-consuming.
3. **Learning curve:** A certain level of technical knowledge is required to effectively use Apache Kafka.

## Features of Apache Kafka

1. **Data Pipeline:** Apache Kafka acts as a data pipeline between different systems, allowing efficient and real-time data transfer.
2. **Replication:** The platform offers automatic data replication within the cluster, ensuring data is available even in the case of server failures.
3. **Horizontal scaling:** Apache Kafka offers the ability to scale horizontally by adding more nodes to the cluster, providing higher throughput and availability.
4. **Real-time processing:** With its low latency, Apache Kafka allows real-time data processing and analytics.

### Example of Creating a Kafka Topic

```bash
# Creating a Kafka topic named 'example-topic'
kafka-topics --create --topic example-topic --bootstrap-server localhost:9092 --replication-factor 1 --partitions 4
```

This command illustrates how to create a new topic in Apache Kafka, specifying the topic name, the bootstrap server, the replication factor, and the number of partitions.

## Conclusion

Apache Kafka is a powerful and efficient platform for real-time data streaming. Its numerous advantages outweigh the few disadvantages, making it a popular choice for businesses. With its wide range of features and easy integration capabilities, Apache Kafka is an excellent choice for anyone looking to get started with real-time data streaming.
How To Upload Files To AWS S3 Using Serverless Lambda Functions
Tags: aws, serverless, s3, lambda
Published: 2024-04-01 00:15:34

With the release of serverless infrastructure, running code without managing servers has never been easier.

Only a few years ago, if you wanted to run server code you would need to provision a server or several servers, manage them to make sure they were well maintained and debug when problems arose.

Now with the rise of serverless functions or Functions as a Service (FaaS) you could run server code from nothing, no hardware within mere minutes...

Read the full article here:

https://medium.com/success-with-aws/how-to-upload-files-to-aws-s3-using-serverless-lambda-functions-9fc040513f59
How To Use Versioning On AWS S3 Buckets To Enable Overwrite Protection Of Your Data
Tags: version, s3, aws, bucket
Published: 2024-04-01 00:14:15

Amazon S3 is a scalable, low-cost and infinite storage solution provided by AWS, capable of storing petabytes of data as well as static websites and more.

S3 supports versioning for managing different versions of your stored files (objects in AWS terms).

Versioning is a useful feature provided by Amazon S3 that lets you create multiple versions of a file, whenever a file that already exists, is re-uploaded. Instead of overwriting the file and erasing the old one, S3 will overwrite the file with the latest file but keep a copy of the old file as an older version available to you...

Read more here:

https://medium.com/technology-hits/how-to-use-versioning-on-aws-s3-buckets-to-enable-overwrite-protection-of-your-data-1d2a52eccbbb
Being Poor
Tags: discuss, watercooler
Published: 2024-07-07 05:02:42

---
title: Being Poor
published: true
date: 2024-04-01 00:00:00 UTC
tags: discuss, watercooler
canonical_url: https://nelson.cloud/being-poor/
---

I came across this article and it hit pretty deep: [https://whatever.scalzi.com/2005/09/03/being-poor/](https://whatever.scalzi.com/2005/09/03/being-poor/?ref=nelson.cloud)

This post is an extension of that link with my own personal experiences.

* * *

Being poor is having to stay home alone as a kid because your parents can’t afford a babysitter.

Being poor is being afraid that your parents may get shot while you’re in elementary school.

Being poor is taking extra care of your clothes because you know your parents can’t buy you more.

Being poor is feeling guilty when your parents buy you something.

Being poor is getting bus money by fishing coins out of water fountains in the mall.

Being poor is having to take the bus to and from work.

Being poor is telling the bus driver you don’t have enough for the ride and hoping they let you on anyway.

Being poor is having to walk home for over an hour because the bus doesn’t pass through after 10PM.

Being poor is preferring to walk instead of taking the bus to save money.

Being poor is always being concerned about getting robbed on the street.

Being poor is being confused as a gangster by the police due to your race/ethnicity.

Being poor is hearing gunshots on a regular basis.

Being poor is having people get shot in front of your apartment building.

Being poor is living in an apartment in the basement of a building with no direct sunlight.

Being poor is not getting a response when calling the police despite them showing up immediately just a few blocks down in the wealthier area.

Being poor is living in a [Section 8](https://en.wikipedia.org/wiki/Section_8_%28housing%29?ref=nelson.cloud) apartment.

Being poor is having all your friends live in houses and you’re the only one living in an apartment.

Being poor means being expected to provide financially for your family at 18.

Being poor is developing mental health issues without any means to address them.

Being poor means growing up without a dad.

Being poor is endlessly waiting for life to get better.
Menjadwalkan Pekerjaan Pengguna yang Ditunda
Published: 2024-03-31 23:08:01

**TUJUAN**
Setelah selesai, Anda akan bisa membuat perintah yang berjalan sekali saja di kemudian hari.

**Menjelaskan Tugas Pengguna yang Ditunda**
Terkadang, Anda perlu menjalankan perintah di masa depan. Contohnya, seseorang ingin menjadwalkan email ke atasan, atau seorang administrator sistem mengatur tugas "pengaman" untuk reset pengaturan firewall dalam 10 menit, kecuali jika mereka menonaktifkannya.

Solusi untuk menjadwalkan tugas ini di Red Hat Enterprise Linux adalah dengan menggunakan 'at'. Ini menyediakan perangkat (atd) dan perintah (at, atq, dst.). Pengguna, termasuk root, dapat menambahkan tugas ke antrian atd menggunakan 'at'. Antrian atd memiliki 26 antrian (a-z), dengan prioritas lebih rendah untuk antrian yang lebih akhir.

**Menjadwalkan Tugas Pengguna yang Ditunda**
Gunakan perintah 'at TIMESPEC' untuk menjadwalkan pekerjaan baru. Perintah 'at' akan membaca perintah dari stdin. Anda dapat menyelesaikan input manual dengan menekan Ctrl+D. Untuk perintah kompleks, lebih baik gunakan pengalihan input dari file skrip, misalnya 'at now +5min < myscript', daripada mengetik manual di terminal.

Argumen TIMESPEC menerima kombinasi yang kuat, memungkinkan pengguna menjelaskan kapan pekerjaan harus dijalankan. Biasanya dimulai dengan waktu, seperti 02:00, 15:59, atau waktu minum teh, diikuti dengan tanggal opsional atau jumlah hari di masa depan. Berikut beberapa contoh kombinasi yang bisa digunakan.

- now +5min
- teatime tomorrow (teatime is 16:00)
- noon +4 days
- 5pm august 3 2021

**Memeriksa dan Mengelola Pekerjaan Pengguna yang Ditunda**
Gunakan perintah atq atau perintah at -l.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/b3p8tzh05xlu3d4f2i6w.png)

1. Nomor pekerjaan unik untuk pekerjaan ini.
2. Tanggal dan waktu pelaksanaan untuk pekerjaan yang dijadwalkan.
3. Menunjukkan bahwa pekerjaan dijadwalkan dengan antrean default a. Pekerjaan yang berbeda dapat dijadwalkan dengan antrean yang berbeda.
4. Pemilik pekerjaan (dan pengguna yang akan menjalankan pekerjaan tersebut).

**Penting**
Pengguna yang tidak memiliki hak akses hanya dapat melihat dan mengontrol pekerjaan mereka sendiri. Pengguna root dapat melihat dan mengelola semua pekerjaan.

Untuk memeriksa perintah yang akan dijalankan, gunakan perintah 'at -c _JOBNUMBER_'. Ini akan menampilkan lingkungan pengguna saat pembuatan pekerjaan dan perintah yang akan dijalankan.

**Menghapus Pekerjaan**
Gunakan 'atrm _JOBNUMBER_' untuk menghapus pekerjaan yang tidak lagi diperlukan, seperti setelah konfigurasi firewall jarak jauh berhasil.
Core Count vs. Clock Speed: The Silent Cost Factor in Software Licensing
Tags: devops, opensource, aws, database
Published: 2024-03-31 22:51:24

Software licensing models are undergoing a dramatic shift, and one metric is quietly impacting your bottom line: core count. Traditional licensing based on sockets (the physical package housing the processor) is giving way to per-core pricing, potentially increasing software costs for businesses with outdated infrastructure. Understanding the difference between core count and clock speed is crucial in navigating this new landscape.

**Understanding the CPU: A Factory Analogy**

Imagine a CPU (Central Processing Unit) as a factory. The core count represents the number of assembly lines within the factory, while clock speed signifies the speed at which each line can complete tasks. More cores allow you to handle multiple tasks simultaneously, while a higher clock speed translates to faster individual task completion.

**Why Core Count Matters Now**

Many software vendors are transitioning to per-core licensing models. This seemingly minor change can lead to significant cost increases if businesses are not careful. Companies relying on older infrastructure with a high core count, but lower clock speed, could face substantial jumps in software licensing fees.

For example, a database management system might be licensed based on core count. Running such software on an infrastructure with numerous cores but a slower clock speed might result in 20% higher licensing costs compared to a system with fewer cores but a faster clock speed (depending on the specific processor type).

**Optimizing Costs in the New Licensing Landscape**

Understanding the interplay between core count and clock speed empowers businesses to navigate the changing software licensing landscape. Here are a few strategies to consider:

**Infrastructure Optimization** : Analyze current workloads and consolidate virtual machines to minimize core usage, reducing the number of cores your software licenses need to cover.
**Licensing Model Evaluation** : Explore alternative licensing models such as subscriptions or negotiate with vendors to find cost-effective options.
**Staying Informed** : Proactively track changes in licensing models from software providers to avoid unexpected cost increases.

**Conclusion**
By grasping the relationship between core count and clock speed, and how they impact software licensing costs, businesses can make informed decisions about their IT infrastructure. This knowledge empowers them to optimize costs, improve performance, and maintain a competitive edge as software licensing models continue to evolve.
Tunda Shopping App : The Future of Online Shopping in Tanzania
Published: 2024-03-31 22:40:34




![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/q72vj7cru9wta21o8xku.png)
The “Tunda Shopping App” is set to transform how Tanzanians shop, offering unparalleled convenience and a vast selection of products within a single digital marketplace. Similar to giants like Amazon, eBay, or AliExpress, “Tunda Shopping App” connects buyers with a wide array of sellers across the country.

Why Choose “Tunda Shopping App”?

Exceptional Convenience: Shop for all your needs from the comfort of your home. Browse various product categories, compare prices, and place orders in a few simple clicks.
Immense Selection: Access a diverse range of products, from electronics, fashion, beauty, home goods, and much more. Discover unique items and deals you might not find in traditional stores.
Competitive Pricing: The ability to compare prices from different vendors empowers you to find the best possible deals on “Tunda Shopping App.”
Quality Assurance: Purchase from trusted and vetted sellers, ensuring you receive high-quality products. The app may include a rating system to aid your decision-making.
Support Local Businesses: Help small and medium-sized Tanzanian businesses thrive by shopping through the “Tunda Shopping App.” Choosing local sellers has a significant impact on the domestic economy.
How “Tunda Shopping App” Works

Download and Register: Download the “Tunda Shopping App” and create an account.
Browse Products: Use search functions or explore various categories to find the products you desire.
Compare Prices: Evaluate prices, specifications, and seller reviews to make the best choice.
Place Your Order: Add items to your shopping cart, select your preferred payment method, and submit your order.
Track Delivery: Monitor your order’s progress and receive your items directly at your doorstep.
Download “Tunda Shopping App” Now!

If you’re looking for a convenient, rewarding, and reliable way to shop online in Tanzania, download the “Tunda Shopping App” today Download Now ! Enjoy the ease and discovery of great products straight from your mobile phone.

Tunda Shopping
Ecommerce
Optimized Keycloak SPI Deployment using Maven Shade Plugin
Tags: keycloak, spi
Published: 2024-03-31 22:27:38

When you develop Keycloak SPI, you probably add external dependencies (e.g. libraries). These dependencies are required to be in the classpath of Keycloak so your SPI can work as you expect. 

To include the external libraries in Keycloak path, as mentioned in Keycloak [Configuring providers](https://www.keycloak.org/server/configuration-provider):
> ### Using third-party dependencies
When implementing a provider you might need to use some third-party dependency that is not available from the server distribution.
In this case, you should copy any additional dependency to the providers directory and run the build command. Once you do that, the server is going to make these additional dependencies available at runtime for any provider that depends on them.

To achieve that, you will probably need to download the JARs and copy it during building the Keycloak Docker Image. 

This is a bit messy, especially when you have a new release and every time want to make sure to have the same dependencies versions. 

To avoid all the hassle, I used [Maven Shade Plugin](https://maven.apache.org/plugins/maven-shade-plugin/). 

> This plugin provides the capability to package the artifact in an uber-jar, including its dependencies and to shade - i.e. rename - the packages of some of the dependencies.

It is also very useful when you've multiple SPIs but use different versions of same library (through the renaming feature).  

A sample build configuration can be like:

```xml
...
<build>
	<plugins>
		<plugin>
			<artifactId>maven-shade-plugin</artifactId>
			<executions>
				<execution>
					<goals>
						<goal>shade</goal>
					</goals>
					<phase>package</phase>
				</execution>
			</executions>
			<groupId>org.apache.maven.plugins</groupId>
			<version>${maven-shade.version}</version>
		</plugin>
	</plugins>
</build>
...
```
Follow the plugin documentation to configure the plugin by including/excluding/rename the dependencies. 
 
That is all. I hope you find it useful.
Securing Keycloak: Configuring Admin Access within Your Private Network
Tags: keycloak, iam, security
Published: 2024-03-31 22:26:55

When it comes to administrative capabilities, Keycloak boasts a wealth of features that empower users to efficiently manage their system. Alongside a user-friendly web admin tool, Keycloak offers a robust REST API, enabling seamless programmatic control.

In this article, I'll discuss on how to prevent the public access to Keycloak admin. 

For this, you need to decide about the public and private host for Keycloak. For instance, ingress will look like:
```yaml
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: keycloak-ingress
  namespace: your-namespace
spec:
  rules:
  - host: internal.example.com
    http:
      paths:
      - path: /keycloak
        pathType: Prefix
        backend:
          service:
            name: keycloak
            port:
              number: 8080
  - host: external.example.com
    http:
      paths:
      - path: /keycloak
        pathType: Prefix
        backend:
          service:
            name: keycloak
            port:
              number: 8080
```

Then, in the `deployment.yaml` file, add environment variables as below:
```yaml
      ...
      containers:
        - name: keycloak
          image: quay.io/keycloak/keycloak:24.0.2 # keycloak official docker image or your customised one
          env:
            - name: KC_HOSTNAME
              value: external.example.com
            - name: KC_HOSTNAME_ADMIN
              value: internal.example.com
```
Now, after you deploy Keycloak. Navigating  https://external.example.com/keycloak/admin/ will redirect you automatically to https://internal.example.com/keycloak/admin/ 

> You can still use `web-proxy` to control access to Keycloak if you've such requirements. I prefer to have to have a context path for Keycloak to facilitate that work. To configure it, you need to add below environment variables in `deployment.yaml`:
```yaml
  KC_HOSTNAME_PATH: keycloak
  KC_HTTP_RELATIVE_PATH: /keycloak
```

That is all! I hope you find it useful.
Integrating Keycloak with Datadog: Enabling Keycloak Traces in Kubernetes using Datadog APM
Tags: keycloak, datadog, apm, monitoring
Published: 2024-03-31 22:26:39

[Keycloak](https://www.keycloak.org) is an open-source identity and access management solution that allows users to authenticate and authorize access to web applications and services. 
[Datadog](https://www.datadoghq.com/) is a monitoring and analytics platform that provides insights into the performance and health of your applications and infrastructure. By integrating Keycloak with Datadog, you can gain visibility into the performance of your authentication and authorization processes.

In this blog post, we will describe how to configure Keycloak to send traces to Datadog when both are deployed in Kubernetes.

**Prerequisites**

- A Kubernetes cluster with Keycloak and Datadog agents deployed

- A Datadog API key

**Enable tracing in Keycloak**
Quarkus is a modern Java framework that is designed for building lightweight and efficient microservices. As Keycloak (starting version 17) is based on Quarkus, we should consider the Datadog Java Agent in our integration. 


**Start a Keycloak instance with custom command-line options**
Additional server startup options (extension of JAVA_OPTS) can be configured using the JAVA_OPTS_APPEND environment variable. 

```Dockerfile
ARG KC_VERSION

FROM quay.io/keycloak/keycloak:${KC_VERSION} as builder

ARG KC_HEALTH_ENABLED=true
ARG KC_METRICS_ENABLED=true
ARG KC_DB=postgres
ARG KC_FEATURES

ENV KC_HEALTH_ENABLED=${KC_HEALTH_ENABLED}
ENV KC_METRICS_ENABLED=${KC_METRICS_ENABLED}
ENV KC_DB=${KC_DB}
ENV KC_FEATURES=${KC_FEATURES}

COPY /jars/dd-java-agent.jar /jars/dd-java-agent.jar 

ENV JAVA_OPTS_APPEND=-javaagent:/jars/dd-java-agent.jar -Ddd.service.name=keycloak -Ddd.env=prod  

FROM quay.io/keycloak/keycloak:${KC_VERSION}

COPY --from=builder /opt/keycloak/ /opt/keycloak/

ENTRYPOINT ["/opt/keycloak/bin/kc.sh", "start", "--optimized"]

```

That is all. I hope you find it useful.
Are any entrepreneurial-minded developers out there?
Published: 2024-03-31 22:16:50

I am a serial entrepreneur. I want to work with developers to leverage what you might have already created (with minimal tweaks/updates needed) so that we can get to market faster and share in the revenue stream. I'm interested in SaaS solutions, but let me know if you have developed on other platforms. I am located in the Seattle area, and my core focus is marketing and distribution. If client requires customization, we would charge them additional dev work. If you are interested, please let me know - miki@apexant.com
How to reflect values received from Google Forms into a Google Doc with GAS
Published: 2024-03-31 22:02:02


I think there are people who often have to create documents in the same format as part of their regular work. It would be convenient if you could receive information from the requester via a form and reflect it in the document, such as inserting names, addresses, and start dates of employment into the same contract document, where the information changes depending on the party to the agreement, wouldn't it?

I have demonstrated a method for doing so in the repository below, along with GAS (Google Apps Script) code, a Google Form, and a Google Document. While the example is for an employment contract, I believe it can be applied to the automatic creation of various documents.


Github repo: https://github.com/HibikiDaBull/Hibiki_GAS-Hacks/blob/main/GAS%20Code_how%20to%20apply%20value%20from%20Google%20form%20to%20Google%20Doc

Google Document sample: https://docs.google.com/document/d/19TpSooLhsBHlCisv93mM_Tp6an4xisJToJ5hDUy61c0/edit

Google Form sample: https://docs.google.com/forms/d/1zO9vA_aTyRsmvcKaHmqcdfi3JyVcT4q_3l4HzO-8Xhg/edit
Sundae: CSS Art Challenge
Tags: frontendchallenge, devchallenge, css, webdev
Published: 2024-03-31 21:46:01

_This is a submission for DEV Challenge v24.03.20, CSS Art: Favorite Snack._

## Inspiration
Summer snacks inspire my illustration. I love a good sundae cup. I got my illustration idea from Pinterest.

![sundae](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rj0d8eo3fc54zsfcgsxj.png)

## Demo
Here is the demo 
{% codesandbox icecream-illustration-x4ktwn %}

## Journey
I have created some illustrations (radio box and coffee cup) before but I did this one quickly.

A new thing I learned to do is put a cute face on the cup.

Overall I am happy with my final illustration and later will add some animations to it.

<!-- Don't forget to add a cover image to your post (if you want). -->

<!-- Thanks for participating! -->