teleren/devto huggingface dataset:
Spring Cloud Config
Tags: java, spring, microservices
Published: 2023-02-15 23:59:50

> Spring Cloud Config provides server-side and client-side support for externalized configuration in a distributed system. With the Config Server, you have a central place to manage external properties for applications across all environments.

Source: https://docs.spring.io/spring-cloud-config/docs/current/reference/html/

# Spring Cloud Config Server

> Spring Cloud Config Server provides an HTTP resource-based API for external configuration (name-value pairs or equivalent YAML content). The server is embeddable in a Spring Boot application, by using the @EnableConfigServer annotation. Consequently, the following application is a config server:

```java
@SpringBootApplication
@EnableConfigServer
public class ConfigServer {
  public static void main(String[] args) {
    SpringApplication.run(ConfigServer.class, args);
  }
}
```

Source: https://docs.spring.io/spring-cloud-config/docs/current/reference/html/#_spring_cloud_config_server

The config server application needs this dependency:

```xml
<dependency>
    <groupId>org.springframework.cloud</groupId>
    <artifactId>spring-cloud-config-server</artifactId>
</dependency>
```

The default implementation of the server storage backend uses git, but you can also use SVN, file system, CredHub, AWS (Secrets Manager, Parameter Store, or S3), JDBC, Redis, or Vault. For git, you must create a  repository containing YAML and properties files in the master branch. Then, define it in the application.properties file of the Config Server application:

```properties
spring.application.name=spring-cloud-config-server
server.port=8888
spring.cloud.config.server.git.uri=file:///C:/Users/home/Desktop/yourProject/git-repo
```

If you added a config-client.properties file, for instance, in the git repository, you can run the config server application and access http://localhost:8888/config-client/default to view the properties (default is the profile).

# Spring Cloud Config Client

Spring Boot applications can use the Spring Config Server. The config client applications need this dependency:

```xml
<dependency>
	<groupId>org.springframework.cloud</groupId>
	<artifactId>spring-cloud-starter-config</artifactId>
</dependency>
```

Then, add in the application.properties file of the Config client applications this property:

```properties
spring.config.import=optional:configserver:http://localhost:8888
```

Additionaly, if you are using different profiles you must define the profile and it will use the corresponding properties file. Add this property: spring.cloud.config.profile=profile (where profile is dev, qa, etc)

Finally, you can use the @ConfigurationProperties or @Value annotations to access the properties from the config server.

For more information see: https://www.baeldung.com/spring-cloud-configuration
Why Terraform is an essential tool for DevOps Engineers
Tags: terraform, devops, cloud, programming
Published: 2023-02-15 23:54:45

Terraform is an open-source “Infrastructure as Code” tool. It allows you to define and manage your infrastructure automatedly. With Terraform, you can write and maintain reusable code for provisioning cloud infrastructure, like servers and databases, on multiple providers such as AWS, Google Cloud Platform, and Azure. This makes it easier to deploy and manage multiple resources quickly and efficiently.

Terraform also simplifies the process of upgrading and managing infrastructure over time, as you can easily apply changes to existing code or add new resources. With Terraform, businesses can build secure, reliable, and cost-effective cloud environments. 

It is a powerful tool for automating the management of your infrastructure while also improving its scalability, security, and cost-effectiveness. In short, Terraform is a powerful tool that helps businesses automate their infrastructure deployment and manage it reliably and cost-efficiently. 

Read More [Why Terraform is an essential tool for devops engineers](https://www.bitslovers.com/terraform/)
React Application Structure
Published: 2023-02-15 23:51:00

For the most part, React apps have a common structure. 

1. index.js
   This is best thought of as a the place where the first bit of code is executed. You also call createRoot and render from react-dom here. 

This file typically renders <App /> 
2. App.js
This is kind of the floor plan or the schematics of the app.
3. Modules
A Comprehensive Guide to Server-Side Encryption on Amazon S3
Tags: aws, tutorial, cloud, devops
Published: 2023-02-15 23:49:03

Server-side encryption on Amazon S3 enables you to store your data using server-side encryption securely. This feature encrypts the objects stored in your Amazon S3 buckets, providing an additional layer of security to help ensure the confidentiality of your data. This encryption helps protect against unauthorized access.

Read More: [Server-Side Encryption on Amazon S3](https://www.bitslovers.com/server-side-encryption-on-amazon-s3-a-comprehensive-guide/)
JavaScript for loop
Published: 2023-02-15 23:19:13

For Loop is one of the most used concepts in JavaScript. It helps you to perform repetitive actions.
It has amazing parts.
`for(let i =1; i<=5;i++){
//you can write any code you want
console.log("life is awesome");
}`

The first part (let i =1) is where you declare your variable. Just like the way you usually declare variables. It's much safe to use let and var rather than const because, const variables can't be resigned. Your variable could be anything but alot of people are using "i".

If you want to loop through an array, the value of your variable should be 0, which is the first element in an array.

The second part is the logic part (i<=5).After each iteration, it checks whether "i" is less than 5 or equal to 5. If it's less than 5, The third part will add 1 to the variable till it's up to 5 or any number you specified. If the third part is missing, then the loop will continue till eternity because the condition will always be true. The logic must be false before the iteration will stop.

That's the basic explanation of for loop in JavaScript.
Day 696 : Happy Valentine's Day
Tags: hiphop, code, coding, lifelongdev
Published: 2023-02-15 23:02:36

_liner notes_:
- Professional : Had no meetings so I thought that I would be able to update a bunch of repos. I should have known better, haha. Of course the repo I started was written pretty differently from the other ones. haha I had a time trying to follow how things worked. Everything was split up into different files and one function in a file would call another function in another file and it was kind of confusing to follow. Especially when the other repos examples were not as complex. I got a lot of it rewritten and refactored, but my brain is tired. haha

- Personal : I really need to stay off Twitter when I want to get stuff done. While I was eating I saw a tweet from a person saying that working with Dates and Time in JavaScript is difficult. I've run into my own issues when working with them as well so I asked what they were working on. They wanted to be able to figure out the dates that are the second Tuesday of each month in 2023. I thought it was a pretty interesting problem and wanted to try to solve it. Dived in and like 40 minutes later, I had a working solution. I sent it to them and they said it could help. Cool. Those 40 minutes though really threw the rest of my night off. haha I didn't finish looking up the Instagram accounts for the artists in the playlist. And it didn't help that I basically broke the authentication / authorization for my side project some how. My brain was tired and I just went to sleep. Didn't even watch any anime. haha.

![A dirt path through a dense forest with rays of sunlight coming through tree branches in Garibaldi Lake, BC, Canada](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ssxhkk4g2jqix9ghtymk.jpg)

During lunch, I did some coding on my side project and figured out the authentication / authorization issue. The bug I was running into seems to be fixed. And the cool thing was that I did it through the custom store I made which is helping me understand it more. Now I'm feeling pretty good about going forward with the dashboard. Going to eat dinner (stay of Twitter), find the Instagram accounts for the playlist, work on side project dashboard and watch anime. Also didn't post this video yesterday even though it would have been perfect. But hey, "Everyday's the 14th", right? haha

Have a great night!

peace piece
Dwane / conshus
https://dwane.io / https://HIPHOPandCODE.com
{% youtube b5HyMZdrNLY %}
AWS Cloud Quest: Design NoSQL Databases Study Note
Tags: aws
Published: 2023-02-15 22:19:11

This is the DIY challenge of the Design NoSQL Databases in AWS Cloud Quest.


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



### DIY Steps:
1. Create an additional global secondary index `game-score-index`

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vj3iy8t9hnfyxvm6e2cj.png)
AFFiNE - the new knowledge management system ...evolves quickly
Published: 2023-02-15 22:15:55

FFiNE, das neue System, das Miro (collaborating-whiteboard) und Notion (note-taking) und Monday resp. Trello. (Projektmanagement) ablösen will - es kündigt an die Integration der Features beider Systeme zu bieten - und quelloffen zu sein. 

ganz neu: AffineOfficial sucht Botschafter:

We've been working hard on upgrading our systems and have now launched our community platform. We look forward to developing this platform and growing it with your help and support.
So come along and join in the fun over at: https://community.affine.pro and introduce yourself to the rest of the community.
And then we'd like to say congratulations as we'd love to add you to the ambassador program.
So what are you waiting for?
See you in the community!
Any issues, just let me know.
Kind Regards
Chris @ AFFiNE



[b]Links:[/b] https://github.com/toeverything/AFFiNE 
Interessant: eine Kombination von Notion & Miro-Features zu haben, und gleichzetig ein Open-Source-Projekt, welches offen entwickelt wird.	
	
[b]Zentraler Ansatz:[/b] das Open-Source-Konzept, welches komplett anders ansetzt u. sogesehen radikal anders ist als alle o.g. Projekte: 
[b]Motto:[/b] Open-source, privacy-first,and always free. Built with Typescript/React/Rust  https://github.com/toeverything/AFFiNE

AFFiNE is the Next-Gen Knowledge Base to Replace Notion & Miro. Open-source, privacy-first, and always free. Built with Typescript/React/Rust
https://github.com/toeverything/AFFiNE

[b]Projekt: [/b]
https://affine.pro :: https://github.com/toeverything/AFFiNE

[b]Demo: [/b]
- https://livedemo.affine.pro/AFFiNE/
- https://pathfinder.affine.pro/workspace

[b] weitere Links, Quellen, Ressourcen::[/b]

AFFiNE is an open source alternative to Notion & Miro and can help build knowledge base.
Click Here to know more: https://github.com/toeverything/AFFiNE

ein Artikel auf Medium:  https://medium.com/@affineworkos/affine-the-next-gen-knowledge-base-to-notion-and-miro-403f0afd9fba 
	
community-page: https://community.affine.pro/home
Twitter:  https://twitter.com/AffineOfficial

AFFiNE - FREE, Open Source, Privacy First Monday Notion Miro Alternative
https://www.youtube.com/watch?v=lYmjgzyckQc
AFFiNE, das neue System, das Miro und Notion (note-taking) resp. Trello ablösen will sucht Botschafter
Tags: webdev, miro, trello
Published: 2023-02-15 22:13:49

AFFiNE, das neue System, das Miro (collaborating-whiteboard) und Notion (note-taking) und Monday resp. Trello. (Projektmanagement) ablösen will - es kündigt an die Integration der Features beider Systeme zu bieten - und quelloffen zu sein. 

ganz neu: AffineOfficial sucht Botschafter:

We've been working hard on upgrading our systems and have now launched our community platform. We look forward to developing this platform and growing it with your help and support.
So come along and join in the fun over at: https://community.affine.pro and introduce yourself to the rest of the community.
And then we'd like to say congratulations as we'd love to add you to the ambassador program.
So what are you waiting for?
See you in the community!
Any issues, just let me know.
Kind Regards
Chris @ AFFiNE



[b]Links:[/b] https://github.com/toeverything/AFFiNE 
Interessant: eine Kombination von Notion & Miro-Features zu haben, und gleichzetig ein Open-Source-Projekt, welches offen entwickelt wird.	
	
[b]Zentraler Ansatz:[/b] das Open-Source-Konzept, welches komplett anders ansetzt u. sogesehen radikal anders ist als alle o.g. Projekte: 
[b]Motto:[/b] Open-source, privacy-first,and always free. Built with Typescript/React/Rust  https://github.com/toeverything/AFFiNE

AFFiNE is the Next-Gen Knowledge Base to Replace Notion & Miro. Open-source, privacy-first, and always free. Built with Typescript/React/Rust
https://github.com/toeverything/AFFiNE

[b]Projekt: [/b]
https://affine.pro :: https://github.com/toeverything/AFFiNE

[b]Demo: [/b]
- https://livedemo.affine.pro/AFFiNE/
- https://pathfinder.affine.pro/workspace

[b] weitere Links, Quellen, Ressourcen::[/b]

AFFiNE is an open source alternative to Notion & Miro and can help build knowledge base.
Click Here to know more: https://github.com/toeverything/AFFiNE

ein Artikel auf Medium:  https://medium.com/@affineworkos/affine-the-next-gen-knowledge-base-to-notion-and-miro-403f0afd9fba 
	
community-page: https://community.affine.pro/home
Twitter:  https://twitter.com/AffineOfficial

AFFiNE - FREE, Open Source, Privacy First Monday Notion Miro Alternative
https://www.youtube.com/watch?v=lYmjgzyckQc
How to create a custom random ID with Postgres
Published: 2023-02-15 21:49:54

---
title: How to create a custom random ID with Postgres
published: true
description: How to create a custom random ID with Postgres
tags: 
# cover_image: https://direct_url_to_image.jpg
# Use a ratio of 100:42 for best results.
# published_at: 2023-02-15 16:07 +0000
---


Create a function:

```
CREATE OR REPLACE FUNCTION generate_random_id(length integer)
RETURNS text AS $$
DECLARE
  alphabet text;
  id text := '';
  i integer;
BEGIN
  alphabet := 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
  FOR i IN 1..length LOOP
    id := id || substr(alphabet, floor(random() * length(alphabet) + 1)::integer, 1);
  END LOOP;
  RETURN id;
END;
$$ LANGUAGE plpgsql;
```

Test

```
SELECT generate_random_id(10); -- returns a random ID with 10 characters
```

Now you can create a table this way:

```
CREATE TABLE "public"."product" ("id" text default generate_random_id(6), "name" text NOT NULL, PRIMARY KEY ("id") , UNIQUE ("id"));
```

Try to insert and select the product table to see the id auto generated.

```
INSERT INTO product (name) VALUES ('paper');
```

Done.
Ferramentas para quem é DevRel
Tags: devrel, braziliandevs
Published: 2023-02-15 21:49:19

Criando esse artigo para poder compartilhar um pouco sobre algumas ferramentas que ajudam no dia-a-dia das pessoas que atuam como Developer Relations e áreas relacionadas.

Acredito que o principal seja sempre pensar que a ideia é que nós possamos criar relações, além de entender possíveis métricas que tenhamos que atender. Ou até mesmo usar ferramentas para descobrir quais métricas podem fazer sentido acompanharmos.

Uma ferramenta completa que atenda à todas as nossas expectativas, não sei dizer se existe. Mas dependendo da categoria que você precisa suprir, talvez tenham algo que possa ser um apoio no seu trabalho.

Por favor, fique à vontade para complementar este artigo comentando outras ferramentas que você usa, conhece ou tem vontade de explorar mais.

## Ferramentas para organização de planejamento e tarefas
- [Notion](https://www.notion.so/product);
- [Trello](https://trello.com/);
- [Jira](https://www.atlassian.com/software/jira);
- [Asana](https://app.asana.com/);
- [Microsoft Planner](https://www.microsoft.com/pt-br/microsoft-365/business/task-management-software);
- [GitHub Project](https://docs.github.com/pt/issues/planning-and-tracking-with-projects).

## Ferramentas para documentação, registros ou anotações
- [Notion](https://www.notion.so/product);
- [Confluence](https://www.atlassian.com/br/software/confluence?);
- [Sharepoint](https://www.microsoft.com/pt-br/microsoft-365/sharepoint/collaboration).

## Ferramentas relacionadas a redes sociais
- [Orbit](https://orbit.love/);
- [Zapier](https://zapier.com/).

## Ferramentas para conteúdos
- [Dev.to](https://dev.to/);
- [Wordpress](https://wordpress.com/);
- [Sharepoint](https://www.microsoft.com/pt-br/microsoft-365/sharepoint/collaboration).

## Ferramentas para organização e relações
- [Logseq](https://logseq.com/);
- [Obsidian](https://obsidian.md/).

## Ferramentas para reunir conteúdos e portfólio
- [Polywork](https://www.polywork.com/).

## Ferramentas para criar conteúdo e/ou posts
- [Canva](https://www.canva.com/).

## Ferramentas para fórum e discussão
- [GitHub Discussion](https://docs.github.com/pt/discussions);
- [Discourse](https://www.discourse.org/);
- [Stack Overflow](https://stackoverflow.com/).

Agradecimentos especiais a algumas pessoas que compartilharam algumas ferramentas: @biosbug, @gikapassuti e @vtnorton.

---

Compartilhe também seus pontos sobre essas ferramentas e outras que você conheça que possam agregar ao conteúdo feito.

Obrigada por ter lido o artigo e deixo o canal aberto para troca de ideias e feedbacks.
WordPress 6.2 Beta 2 released - many fixes - improved performance
Tags: webdev, wordpress, php
Published: 2023-02-15 21:41:59

WordPress 6.2 Beta 2 freigegeben: 71 Probleme gelöst (seit Beta1 vergangener Woche) und Performance Verbesserungen für Block Themes: wesentlich bessere Ladezeiten nun möglich: Wie man sieht - intensives Testen in der Community hilft - Rückmeldungen verbessern alles bis zum Final-Release erheblich.

Hallway Hangout: Let’s chat about performance improvements for WordPress 6.2 & more
https://www.youtube.com/watch?v=BnqhuYhE3b0



First Look: WordPress 6 2 Site Editor and Gutenberg Enhancements
David McCan Here is a quick look at the WordPress 6.2 beta to see some of the cool new features and enhancements coming to Gutenberg and ...
https://www.youtube.com/watch?v=V1KwBrtcNFI



New changes in WordPress 6.2 Beta! 
https://www.youtube.com/watch?v=G28KnbyqMxU
The WP Minute WordPress news
Today we're looking at the upcoming features in WordPress 6.1 through the first beta they released today. Full site editing is ...
Introduction to Container Native CI/CD
Tags: devops, containers, cicd, docker
Published: 2023-02-15 21:16:03

**Introduction to Container Native CI/CD**

As the software industry continues to evolve and grow, so does the need for efficient and effective Continuous Integration and Continuous Deployment (CI/CD) processes. With the rise of containerization, many organizations have shifted towards using containers in their CI/CD pipelines to improve their overall development workflow. This book will provide an in-depth understanding of what Container Native CI/CD is and how to implement it in your organization.

**Chapter 1: Understanding Containers**

In this chapter, we will cover the basics of containers, including what they are, why they are important, and how they differ from traditional virtualization techniques. You will learn about containerization technologies like Docker, and understand how containers can be used in a CI/CD pipeline.

**Chapter 2: CI/CD Basics**

Before diving into Container Native CI/CD, it's important to understand the basics of CI/CD. This chapter will provide a comprehensive overview of CI/CD, including what it is, why it's important, and how it works. You'll learn about the different stages of the CI/CD pipeline, such as build, test, and deploy.

**Chapter 3: Container Native CI/CD**

In this chapter, we will explore the concept of Container Native CI/CD in detail. You will learn about the benefits of using containers in your CI/CD pipeline, including improved scalability, faster deployment times, and increased security. You will also learn about popular tools and technologies used in Container Native CI/CD, such as Kubernetes and Jenkins.

**Chapter 4: Implementing Container Native CI/CD**

This chapter will cover the step-by-step process of implementing Container Native CI/CD in your organization. You will learn about the various stages involved in setting up a Container Native CI/CD pipeline, such as creating and deploying containers, setting up a continuous integration server, and automating the deployment process.

**Chapter 5: Best Practices and Challenges**

In this final chapter, you will learn about best practices and common challenges when implementing Container Native CI/CD. You will learn about important considerations to keep in mind, such as security, scaling, and continuous delivery. You will also learn about common challenges and how to overcome them, such as debugging, testing, and integrating with existing systems.

**Conclusion**

In conclusion, Container Native CI/CD is an important and growing trend in the software industry, and it's essential for organizations to understand and implement it in their development workflow. With the information in this book, you will have a solid foundation for implementing Container Native CI/CD in your organization, and be well on your way to improving your overall development process.
No. 1 Custom Kitchen Cabinets Company in BC
Tags: cabinets
Published: 2023-02-15 21:41:32

BC Cabinets: The Best Quality Kitchen Cabinets, Vanities, and Countertops

Are you looking for the best quality kitchen cabinets BC has to offer? Look no further than BC Cabinets! We have a wide selection of kitchen cabinets, bathroom vanities, and countertops that are perfect for your home. Our cabinets are made from the finest materials and are designed to last for years to come. With our commitment to quality and customer service, we ensure that you will be satisfied with your purchase.

https://bccabinets.ca/
A taste on MidJourney
Tags: midjourney, ai, chatgpt, tifa
Published: 2023-02-15 21:33:33

[MidJourney](https://midjourney.com/home/?callbackUrl=%2Fapp%2F) is a text-to-image AI generator. [ChatGPT](https://helloacm.com/how-chatgpt-impacts-ugc-user-generate-content/) is a text-to-text AI engine.

Currently, you can go to their official discord channel and issue /imagine command. The following is a "cute tifa". The tifa is the goddess from Final Fantasy VII.

![image.png](https://cdn.steemitimages.com/DQmbybjMhkvuPxHSvzaQiNHg2iWif13xQa96rU3sVLGne7j/image.png)

comic like white squirrel with large black dots and glasses on his nose 

![image.png](https://cdn.steemitimages.com/DQmWf9NCxcS8mB2L8s61wBGsoRdZVZvGLjkeJTxTmHThpNd/image.png)

masterpiece, best quality, ultra-detailed, illustration, 1girl, solo, looking at viewer, smile, short hair, bangs, closed mouth, pink hair, from side, lips, gradient, grey eyes, gradient background, eyelashes, wavy hair, portrait


![image.png](https://cdn.steemitimages.com/DQmSetAVijHp63GkV3AP429hNbbZFTCVtT6pLEEEkfT99ts/image.png)



<hr/>

### [Steem](https://steemyy.com) to the Moon!
You can swap the STEEM/SBD to USDT (TRC-20) via [Steem2USDT](https://steemyy.com/steem2usdt.php)
Stop/Start EC2 instance on a scheduled basis
Tags: aws, cloud, awscommunity, 100daysofcloud
Published: 2023-02-15 20:41:24

[46/100] #100DaysOfCloud Today, I created a scheduled stop for the EC2 instances using a  combination of Lambda and CloudWatch Events.

This solution helps reduce operational costs by stopping resources that are not in use and starting resources when their capacity is needed. For example, a company can use Instance Scheduler on AWS in a production environment to automatically stop instances outside of business hours every day. If you leave all of your instances running at full utilization, this solution can result in up to 70% cost savings for those instances that are only necessary during regular business hours (weekly utilization reduced from 168 hours to 50 hours).

You can try do it by yourself by following the steps from the link below: [GitHub](https://github.com/aaditunni/100DaysOfCloud/blob/main/Journey/046/Readme.md)