teleren/devto huggingface dataset:
Amazon EC2 & Minikube
Tags: aws, kubernetes, cloudforet, beginners
Published: 2023-06-13 06:23:39

In a Amazon EC2 VM, this guide is to install

- docker
- kubernetes (minikube)
- kubectl
- helm

# Docker

https://docs.docker.com/desktop/install/fedora/

init docker repository

```
sudo dnf -y install dnf-plugins-core
sudo dnf config-manager --add-repo https://download.docker.com/linux/fedora/docker-ce.repo
```

Install docker

```
sudo yum update
sudo yum install docker
```

Start docker

```
sudo service docker start
sudo usermod -aG docker ec2-user && newgrp docker
```


# Minikube

https://minikube.sigs.k8s.io/docs/start/

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

```
curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-latest.x86_64.rpm
sudo rpm -Uvh minikube-latest.x86_64.rpm
```

start minikube

```
minikube start --driver=docker --memory=4096mb
```

# kubectl

https://kubernetes.io/docs/tasks/tools/install-kubectl-linux/

```
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl
```

# helm

https://helm.sh/docs/intro/install/

```
curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3
chmod 700 get_helm.sh
./get_helm.sh
```
CI/CD Pipeline Dual Helm Github Repo With Similar Canary Deployment
Tags: webdev, node
Published: 2023-06-13 06:06:30

Continuous Integration/Continuous Delivery VM Instance Pipeline:

$ gcloud config list project
[core]
GCP 2nd Gen Cloud Function Inflated With One Pub/Sub CLI Run For Squeezed Cloud Shell

gcloud  pubsub(-Module 1) subscriptions create --topic myTopic mySubscription
           

            1.Inflated Pub/Sub index.js - 

                  fun sleep(){
                          Pub/Sub Module 1.()

                                        - Module 2.() -Function 2(Here,Let us now identify if similar Cloud Function can be run in ingress way for another docker container enabled randomly to a subsequent Pub/Sub object) 

                           }

Java 11 Open JDK CLI: public class PipelineOptions implements Serializable
public String Module 2(){-Now let us redirect for one atomic Cloud Function to test its Dataflow API for another Similar Docker Container for a browser
void aq()
}
{
PipelineOptions xd = new PipelineOptions(new FileInputStream());
xd.Module 2() Function 2;
String xd = "";

  --Subsequent Module Function's Cloud Storage Bucket

        gsutil ls gs://Storage_Bucket/().txt
                                  1.CI/CD Pipeline API Analytics In Ingress Mode For Its Function In Storage Bucket 1 


}

Conclusion:

Whenever We run GCP Kubernetes pod for one Storage Bucket,FileInputStream class are managed for its Java 11/Kotlin CLI for one ingress Dataflow Docker Container
mysql support! — pebl supports mysql with release 0.0.6
Tags: pebl, devops, mysql
Published: 2023-06-13 06:06:28

## Quick Summary

With release 0.0.6, pebl now supports creating mysql instances in both Python and Go.


## Longform

Both Python and Go will now have a new method that will initialize a mysql instance on your behalf. The usage is quite similar to the way redis is handled.

### Python

In python the method is `pebl.mysql` that takes a single string argument to represents the mysql handle. The return value is a dictionary containing four keys, `host`, `port`, `user`, and `password`.

These are the exact keys that are needed for `pymysql.connect`, and so you can pass the dictionary as keywords args.

```python
import pebl
import pymysql

conn = pebl.mysql("mysql")
db = pymysql.connect(**conn)

with db.cursor() as cursor:
    cursor.execute("show databases")
    print(cursor.fetchall())
```

### Go

In Go the method is `pebl.Mysql` that takes a single string argument to represent the mysql handle. The return value is of type `MysqlConn`, which has the necessary fields required to connect to the mysql instance.

```go
package main

import (
	"database/sql"

    "github.com/peblcloud/go"
	"github.com/go-sql-driver/mysql"
)

func main() {
	conn, _ := pebl.Mysql("mysql-1")

    cfg := mysql.Config{
        User:   conn.User,
        Passwd: conn.Password,
        Net:    "tcp",
        Addr:   conn.Addr,
    }

    db, _ := sql.Open("mysql", cfg.FormatDSN())

    if err := db.Ping(); err == nil {
        println("Connected!")
    }
}
```

### pebl info

When using `pebl info` to display information about the local cluster, you will now see entries for any mysql instances that you utilize.

![a terminal showing the result of running pebl info](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4dy67li0428cn7gc8nmg.png)

The information will include the local port that you can utilize to connect, which you can pass into mysql:

```
$ mysql --host 127.0.0.1 --port 32799 -uroot
```

## Upgrading

Make sure to download the latest pebl CLI, which will be needed in order to utilize the new release on your local cluster. Follow the section about installing the CLI in the [setup guide](https://docs.pebl.io/setup).

### Go

The Go SDK is available with the [0.0.6 tag](https://pkg.go.dev/github.com/peblcloud/go). You can update your existing Go projects by running `go get -u github.com/peblcloud/go@v0.0.6`.

### Python

The Python SDK is available as pre-built [docker images](https://hub.docker.com/r/peblcloud/python). Update your Python projects by changing the `Dockerfile` to utilize one of the 0.0.6 images.
🚀 API Maker - Update by id & Replace by id API [Put operation]
Published: 2023-06-13 05:49:08

## Update By id
▸ Update the object's properties that match the payload and 
👉 leave the others unchanged.

## Replace By id [Mongo specific API]
▸ Update the object's properties that match the payload and 
👉 remove the rest of properties.

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

✅ List of Feature
⚡️ Primary key override
⚡️ Modify response using Query Params
⚡️ Nested level update
⚡️ Upsert support
⚡️ Retrive response prior to update or after the update


-----------------
⭐ Params ⭐
-----------------
👉 id  ▸ User can update single record by id
👉 primaryKey ▸ Based on primary key field, user can update data.


-----------------
⭐ Query Params ⭐
-----------------
👉 select ▸ Retrieve the fields based on the user's needs.
👉 deep ▸ Obtain more precise / details data in a certain field.
👉 upsert
  ▸ true :- If record is not present then perform insert operation
  ▸ false :- If record is present then perform update operation
👉 returnDocument
  ▸ before :- Retrieve the response prior to updating it.
  ▸ after  :- Retrieve the response after the update.

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


## Youtube video link
https://youtu.be/PhtWr4kVkMQ


## Websites
https://apimaker.dev


## API Docs link
#### Generated-APIs
https://docs.apimaker.dev/v1/docs/apis-all/generated-apis/auto-generated-update-by-id-api.html
https://docs.apimaker.dev/v1/docs/apis-all/generated-apis/auto-generated-replace-by-id-api.html

#### Schema-APIs
https://docs.apimaker.dev/v1/docs/apis-all/schema-apis/auto-generated-schema-based-update-by-id-api.html
https://docs.apimaker.dev/v1/docs/apis-all/schema-apis/auto-generated-schema-based-replace-by-id-api.html

## More Examples
#### Generated-APIs
https://docs.apimaker.dev/v1/examples/sys/db/updateById.html
https://docs.apimaker.dev/v1/examples/sys/db/replaceById.html

#### Schema-APIs
https://docs.apimaker.dev/v1/examples/sys/db/gen/updateByIdGen.html
https://docs.apimaker.dev/v1/examples/sys/db/gen/replaceByIdGen.html

## Follow on twitter
https://twitter.com/api_maker

## Linked In
https://www.linkedin.com/company/api-maker

## More YouTube Videos
https://www.youtube.com/@api_maker/playlists
Sharp & Glowing dark card | Chrome only
Tags: codepen
Published: 2023-06-13 05:48:21

<p>Based on this tweet: <a href="https://twitter.com/aleksliving/status/1620874863690014721?s=20" target="_blank">https://twitter.com/aleksliving/status/1620874863690014721?s=20</a></p>

<p>Please note that this pen uses CSS @property for that is not yet available everywhere, I’ll make a cross browser version. </p>

<p>Best viewed in chrome </p>

{% codepen https://codepen.io/LukyVj/pen/YzOXepM %}
How to Add Digital Signatures to PDF using .NET PDF Library
Tags: dotnet, csharp, pdf
Published: 2023-06-13 05:38:41

Learn how to add a digital signature to a PDF document in a console app using the Syncfusion .NET PDF Library. PDF documents can be digitally signed using x509 certificates such as .pfx files with private keys and support for hardware security module (HSM), online certificate status protocol (OCSP), certificate revocation list (CRL), and Windows Certificate Store to offer authenticity and integrity. 

_Product overview_: https://www.syncfusion.com/document-processing/pdf-framework/net/pdf-library

_Explore our tutorial videos_: https://www.syncfusion.com/tutorial-videos

_Example project_: https://github.com/SyncfusionExamples/how-to-add-a-digital-signature-to-PDF-document-in-net

{% youtube zuQRsrzdWgA %}
zsh on windows
Published: 2023-06-12 22:45:33

## End Goal

To build a terminal environment with:

- MSYS2
- Windows Terminal
- Winget
- Zsh
- Oh My Zsh
- Zsh Theme Of Choice: PowerLevel10k

## Instructions

Install Windows Terminal and MSYS2 using CMD or PowerShell:
```
winget install Microsoft.WindowsTerminal ;
winget install MSYS2.MSYS2 ;
```

Open MSYS2 from windows search bar and start installing from there:

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


```
# Install git and ZSH
pacman -S git zsh ;

# Install Oh My Zsh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" ;

# Generate ~/.zshrc
cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc ;
```

Create MSYS2 Profile for Windows Terminal (use zsh):
1. Open the Windows Terminal App
1. Open the Settings Pane (CTRL + .)
1. Click on Open JSON
1. Add this item to profiles.list and change profiles.default to the same guid (`{71160544-14d8-4194-af25-d05feeac7233}`)

```json
{
  "commandline": "C:/msys64/msys2_shell.cmd -defterm -here -no-start -msys -use-full-path -shell zsh",
  "elevate": true,
  "guid": "{71160544-14d8-4194-af25-d05feeac7233}",
  "icon": "C:/msys64/msys2.ico",
  "name": "MSYS / MSYS2",
  "startingDirectory": "C:/msys64/home/%USERNAME%"
}
```

Restart Windows Terminal and you should be able to see Zsh running.

Install ZSH Plugins
```
# Install Theme: Powerlevel10k
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k

# Syntax Highlighting
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting

# Autosuggestions
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
```

In your ~/.zshrc, look for a line that says ZSH_THEME and change it to 
```
ZSH_THEME="powerlevel10k/powerlevel10k"
```

In the same file, also modify the list of plugins: (ignore ssh-agent and gpg-agent if you haven't set up git)
```
plugins=( 
    git
    ssh-agent
    gpg-agent
    zsh-syntax-highlighting
    zsh-autosuggestions
)
```

Restart Windows Terminal for the final time and you should be brought to a powerlevel10k's wizard :)

## References
- [windows terminal / msys2](https://www.msys2.org/docs/terminals/#windows-terminal)
- [oh-my-zsh](https://github.com/ohmyzsh/ohmyzsh)
- [zsh-syntax-highlighting#install](https://github.com/zsh-users/zsh-syntax-highlighting/blob/master/INSTALL.md)
- [zsh-autosuggestions#install](https://github.com/zsh-users/zsh-autosuggestions/blob/master/INSTALL.md#oh-my-zsh)

EDIT: added suggestions from [James 'Dante' Midzi](https://dev.to/psypher1)'s comments
Diagram editor dgrm.net / Announcement / action history
Tags: webdev, programming, javascript, startup
Published: 2023-06-13 05:25:24


![Diagram editor action history](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1xwjesc3arw0ci1mhq73.png)

Now dgrm.net has action history. Hotkeys: Ctrl+Z, Ctrl+Y.

I’m adding new features to the editor.
Announcements on Twitter: https://twitter.com/boyko_tech
Анонсы в Telegram: https://t.me/dgrm_net
[Android] UserListApp - Setting - Part1
Tags: android, kotlin, retrofit, api
Published: 2023-06-13 05:19:27

**Plugins**

```
plugins {
    id 'com.android.application'
    id 'org.jetbrains.kotlin.android'
    id 'kotlin-kapt'
    id 'dagger.hilt.android.plugin'
}
```

**Dependencies**
[build.gradle(:app)](https://github.com/encorex32268/UserListApp/blob/master/app/build.gradle)

```
    // Coil Compose
    implementation "io.coil-kt:coil-compose:2.2.2"
    implementation "androidx.lifecycle:lifecycle-runtime-compose:2.6.1"
    implementation "androidx.lifecycle:lifecycle-viewmodel-compose:2.6.1"

    // Dagger - Hilt
    implementation "com.google.dagger:hilt-android:2.45"
    kapt "com.google.dagger:hilt-android-compiler:2.45"
    kapt "androidx.hilt:hilt-compiler:1.0.0"
    implementation "androidx.hilt:hilt-navigation-compose:1.0.0"

    // Retrofit
    implementation 'com.squareup.retrofit2:retrofit:2.9.0'
    implementation 'com.squareup.retrofit2:converter-moshi:2.9.0'
    implementation 'com.squareup.retrofit2:converter-gson:2.9.0'
    implementation "com.squareup.okhttp3:logging-interceptor:5.0.0-alpha.3"

```
[build.gradle(:project)](https://github.com/encorex32268/UserListApp/blob/master/build.gradle)

```
buildscript {
    ext {
        compose_ui_version = '1.4.0'
    }
    dependencies {
        classpath "com.google.dagger:hilt-android-gradle-plugin:2.45"
    }
}
// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
    id 'com.android.application' version '8.0.0' apply false
    id 'com.android.library' version '8.0.0' apply false
    id 'org.jetbrains.kotlin.android' version '1.8.0' apply false
}
```
Begin Your Open Source Journey
Tags: opensource, contributorswanted, beginners, webdev
Published: 2023-06-13 05:11:37

[Good First Issue](https://github.com/murtazajoo/openSourcer/issues)

[Repository](https://github.com/murtazajoo/openSourcer)

[Visit website](https://opensourcer.vercel.app/projects)


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/debv48ygij0lco90qt7k.png)
I will continue solo create a worth playing game in next 7 days because I just failed my previous plan :'(
Tags: challenge, unity3d, gamedev
Published: 2023-06-13 05:03:02

Well my previous plan "I will solo create a worth playing game in 7 days because I think I can" just brutally failed!!! :'( (sad!!!)
But now I create a new campain: "I will continue  solo create a worth playing game in next 7 days because I just failed my previous plan"
:D wish me luck!!!!!
DAY 1: create a save-able grid demo map :D

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/laqyw3wx1to45ct58w70.png)
FInd The Bug Challenge
Tags: python, beginners, programming, discuss
Published: 2023-06-13 04:50:17

```python
def calculate_average(numbers):
    total = 0
    count = 0
    for number in numbers:
        total += number
        count += 1
    average = total / count
    return average

numbers = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
result = calculate_average(numbers)
print(f"The average is: {result}")
```
####Explanation
The code defines a function called calculate_average that takes a list of numbers as input. It initializes total and count variables to zero. Then, it iterates over the numbers in the list and adds each number to the total variable while incrementing the count by 1.

After the loop, the average is calculated by dividing the total by the count. Finally, the calculated average is printed to the console.

The challenge is to find a tiny mistake in the code that has a significant impact on the output. Your task is to identify and fix the bug to obtain the correct average. Good luck with the bug hunt!
My YouTube channel : CSE Insights by Simran Anand
Tags: programming, datascience, java, machinelearning
Published: 2023-06-13 04:44:39

Hello everyone!

I have started a [YouTube](https://www.youtube.com/channel/UCHNkA15KHRoljTA2qhwwDEA?sub_confirmation=1) channel where I upload videos explaining and demonstrating Coding questions along with intriguing tech projects! Like the videos and please do Subscribe to my channel for receiving insights on tech domains like Data Science, Problem Solving, Software, Computer Science, Java, AI, ML, Data Structures and Algorithms! Do share the channel to spread the knowledge.

My YouTube Channel link: https://www.youtube.com/channel/UCHNkA15KHRoljTA2qhwwDEA?sub_confirmation=1

Thank you! :)
Enhance Your File Experience: Introducing ExtensionNamer - Beautiful Names for File Extensions! 🚀
Tags: python, productivity, webdev, beginners
Published: 2023-06-13 04:34:13

I recently worked on a file sorter for downloads and wanted to share my experience with the developer community. The goal was to group files based on their types, such as placing "hello.java" in a Java folder. However, I encountered an issue with some files having peculiar extension names, like "Microsoft Excel" with the extension ".xlsx". As a result, the folder created by my code ended up with a strange name like "xlsx", which looked quite odd to me.😵‍💫

To address this problem, I decided to create a Python package that generates beautiful names for extensions. For instance, ".psd" would be transformed into "Adobe Photoshop Document."

You can find the code on GitHub, along with usage instructions and guidelines for contributions on this [Git Repo](https://github.com/DeshyDan/Extension-Namer)

Here are a few use cases for this extension namer that may be of interest to the developer community:

- **File Management**: The script can be used to automatically retrieve and display the full names of file extensions when organizing, renaming, or categorizing files. This can greatly assist in file management tasks and make the process more efficient.

- **Data Processing** 💽 : If you're working with a large dataset that includes file extensions, incorporating this script can provide meaningful information about each extension. By adding the full names of the extensions, you can enrich the dataset for better analysis and reporting.

- **User Interfaces** 💻: When developing a user interface involving file handling, integrating the script can provide user-friendly names for file extensions. This improves the user experience by offering clear and recognizable information about the files being accessed or manipulated.

- **File Conversion Tools** 📂: If you're building a file conversion tool, the script can enhance the user interface by displaying the full names of both the source and target file extensions. This helps users select the appropriate file formats for conversion.

- **File Upload/Download Services** ⛓: For developers working on file upload or download services, the script can be utilized to display the full names of uploaded or downloaded files. This makes it easier for users to identify the file types they are working with.

These examples demonstrate just a fraction of the possibilities. You can customize and integrate the script into various applications or workflows to meet your specific needs. Feel free to explore the code and adapt it for your own projects. Link to repo: [Repo Link](https://github.com/DeshyDan/Extension-Namer)

Don't forget to show your support! Follow my [GitHub account](https://github.com/DeshyDan) and star the repository for [Extension Namer](https://github.com/DeshyDan/Extension-Namer) to stay updated and help spread the word! 🫡
The Engineering Handbook: Exploring Software Architecture and Development
Tags: architecture, softwareengineering, design
Published: 2023-06-13 04:11:12

Welcome to The Engineering Handbook, a platform dedicated to exploring software architecture and development. As a Software Technical Architect, I will share insights and experiences in Software Designing, Solution Designing, and Development. 

From understanding software architecture and design patterns to scalability, performance, security, and solution governance, this blog provides valuable knowledge and practical guidance. Discover the principles, methodologies, and best practices to enhance your skills in shaping robust software systems. 

Join me on this journey of mastering the art of software architecture and development.
How to Update or Remove Existing Menu in Magento 2
Tags: webdev, magento2, magento2tutorials
Published: 2023-06-13 03:57:40

Magento 2 is an open-source web based business stage that offers a variety of elements and functionalities for dealers to deal with their internet based store. 

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

To arrange Magento 2 is a clear interaction with its easy to understand interface, making it simple to modify and design the store to meet explicit business needs. A very much planned route menu can fundamentally upgrade the client experience and increment the possibilities of a client making a buy.

In this blog, we will go over the means engaged with **_how to update or remove existing menu in Magento 2_**. Whether you need to change the name of a menu thing, add new classes, or erase obsolete menus, this guide will assist you with rolling out the important improvements in the blink of an eye. 

For more info, visit **_https://webguru.dev/how-to-update-or-remove-existing-menu-in-magento-2/_**