teleren/devto huggingface dataset:
We need 100% organic, human crafted code with no AI assistance
Tags: ia, gpt3, programming
Published: 2023-03-16 13:37:46

I find using Artificial Intelligence (Co-Pilot, GPT3 and friends) for coding, similar to money; a good worker, but a bad boss.

If we rely too much on IA assistance for coding we may loose the human factor in our projects.

We will become more like a curator, a revisor and corrector of generated IA code than creators.

Sure, does this means we cannot use libraries or google or stackoverflow because they can be generated by AI?. It surely we can not avoid using AI generated code at this point. More and more code would be influenced by AI in the future.

But you can say that at least the code you are writing is yours.

It's like a Poem. 
Maybe human crafted code would be an art in itself. You maybe won't be able to work properly without AI assistance in the near future, but at least you can create work of arts 100% human made.

Maybe a Badge like https://notbyai.fyi/ would help
How to publish React App (CRA) on Github Pages using Github Actions with Turborepo
Tags: react, turborepo, github, actions
Published: 2023-03-16 13:37:00

---
title: How to publish React App (CRA) on Github Pages using Github Actions with Turborepo
published: true
description: Publishing an App inside of Monorepo using Github Actions
tags: react, turborepo, github, actions
# cover_image: https://direct_url_to_image.jpg
# Use a ratio of 100:42 for best results.
published_at: 2023-03-16 13:37 +0000
---



Create a `.yml` file inside of the `.github/workflows/`
give any semantic name, like `publish-app.yml`:

```yml
name: Deploy to GitHub Pages

on:
  push:
    branches:
      - main

jobs:
  build-and-deploy:
    runs-on: ubuntu-latest
    steps:    
      - name: Check out code
        uses: actions/checkout@v3
        with:
          fetch-depth: 2

      - uses: pnpm/action-setup@v2.0.1
        with:
          version: 6.32.2

      - name: Setup Node.js environment
        uses: actions/setup-node@v3
        with:
          node-version: 16
          cache: 'pnpm'

      - name: Install dependencies
        run: pnpm install

      - name: Build
        run: pnpm build

      - name: Deploy
        uses: JamesIves/github-pages-deploy-action@4.1.0
        with:
          branch: gh-pages
          folder: apps/web/build
```

Steps: 

Every `push` on branch `main`, will run the job on ubuntu virtual machine, install the pnpm as node package manager, and setup the node.js with the version 16.

Then will install the dependencies of the project, do the build.

Finally, will do the deploy on github pages using the scripts from [JamesIves/github-pages-deploy-action](https://github.com/JamesIves/github-pages-deploy-action), and create a branch `gh-pages` with the code from `apps/web/build`.

So, you need to go to the GitHub repository settings page:

`https://github.com/<username|org>/<repository>/settings/pages`

And do this settings: 

Source: Deploy from a branch
Branch: gh-pages

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

Done, your site is live at `https://username|org.github.io/your-repository`


🚀
Flutter Animations - A Smiley That Reacts to Your Every Move
Tags: flutter, mobile, programming, beginners
Published: 2023-03-16 13:35:11

By incorporating micro-interaction into your app, you can create an immersive experience that keeps users returning for more. 

Micro-interaction can range from simple button clicks to complex animations that provide feedback and guide users through the app.

Today we will explore how to create a smiley that reacts to your every move using Flutter! 

Imagine having a fun and interactive smiley that responds to your gestures, such as our mouse pointer movements.

Let’s get started and create a smiley that will put a smile on your face!

At the end of the article what we’ll have? A Nice Smiley 🙂 Like this:


![Smiley Animation](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kqruon7t9x20x67j3vty.gif)

What will you learn from this article?

- Create a Smiley
- Draw the face
- Create an EyeBall
- Updating Pointer position
- Passing Mouse offset to EyeBall
- Limit the Pointer movement.
- Adding a Smile Curve.
- Conclusion

The source code for the example project in this article is available on [GitHub](https://github.com/cp-sneha-s/micro-interaction/blob/main/lib/smiley_face.dart).

For step by step implementation, check out [Canopas Blog](https://blog.canopas.com/flutter-animations-made-fun-a-smiley-that-reacts-to-your-every-move-9ebfb0a0657f).
The Future is Now: Exploring the Latest Breakthroughs in Technology
Published: 2023-03-16 13:32:14

The world we live in is constantly evolving, and new technologies are emerging at an unprecedented pace. These new technologies are changing the way we live, work, and communicate. In this blog, we will explore some of the latest technologies that are making a significant impact in our lives.

1) Artificial Intelligence (AI)
Artificial Intelligence is one of the most exciting and promising technologies of our time. AI has the potential to transform almost every industry, from healthcare to finance, transportation, and more. AI systems can learn from data and make predictions, automate processes, and perform complex tasks that were previously impossible for machines.

2) Internet of Things (IoT)
The Internet of Things is a network of interconnected devices that can communicate and exchange data with each other. IoT technology is making our lives more convenient and efficient by enabling us to control our devices remotely and monitor our homes and businesses from anywhere.

3) 5G Technology
The fifth-generation wireless technology, or 5G, is the latest evolution in wireless communications. 5G networks offer faster download and upload speeds, lower latency, and the ability to connect more devices simultaneously. This technology is critical for the development of autonomous vehicles, smart cities, and other applications that require high-speed, low-latency connectivity.

4) Blockchain
Blockchain is a decentralized digital ledger that is used to record and store transactions. This technology is gaining popularity because it provides a secure, transparent, and immutable record of transactions that cannot be altered or deleted. Blockchain technology has the potential to revolutionize the way we conduct transactions, from banking and finance to supply chain management and more.

6) Augmented Reality (AR)
Augmented Reality is a technology that allows us to overlay digital content onto the physical world. AR technology is being used in a variety of industries, from gaming and entertainment to education, healthcare, and more. AR is changing the way we interact with the world around us and has the potential to transform the way we learn, work, and communicate.

In conclusion, these are just a few examples of the latest technologies that are transforming our lives. These new technologies are creating new opportunities, disrupting traditional industries, and changing the way we live, work, and communicate. As these technologies continue to evolve, we can expect even more exciting developments in the years to come.
How to fix 'Unsupported platform for fsevents@1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
Tags: npm, ignoreengines, javascript, yarn
Published: 2023-03-16 13:20:54

To resolve this issue, you can make your build command to be:

```
`yarn set config ignore-engines true`
```
 This is if it is the YARN package manager that you are using.

If you had started the project with either NPM or YARN, it is not advisable to switch or mix these commands has they will corrupt your package-lock.json and your project may not start until you delete this file.

For NPM; make the following settings in your package.json file, has the error is from the fsevents module that is only available on Mac OS:

```
"optionalDependencies": {
    "fsevents": "*"
  }
```

Did you resolve this issue with a different method, what's the method - share with us.

Connect with me on Twitter @wahabind
CheatGPT is Here: Upgrade Your Chat Experience
Tags: gpt3, chatgpt, svelte, ai
Published: 2023-03-16 13:06:03

I'm excited to announce the launch of **[CheatGPT](https://cheatgpt.app/)**, the ultimate AI writing assistant (based on GPT-3.5-turbo, soon on GPT-4) that will help you write faster and better than ever before!
With CheatGPT, you'll have access to all the advanced features of ChatGPT, plus additional premium features like concise responses, text summarization, grammar fixing, image text recognition, and more.

## Why CheatGPT?
CheatGPT is a powerful tool for anyone who wants to improve their writing skills and productivity. Whether you're a content creator, a student, or a professional writer, CheatGPT can help you get your work done faster and more efficiently. It uses cutting-edge AI technology to provide you with accurate and relevant responses to your writing prompts, and it can even help you fix common grammar and spelling mistakes.

## Early Bird Promo Code
To celebrate the launch of CheatGPT, we're offering an Early Bird promo code that will give you a 40% discount on your monthly subscription. Just use the code "EARLYBIRD" when you sign up for CheatGPT, and you'll get full access to all our premium features for just $5.99 per month.

## Technologies Used
CheatGPT is built using the latest web technologies, including [SvelteKit](https://kit.svelte.dev/), [Tailwind](https://tailwindcss.com/), [DaisyUI](https://daisyui.com/), [Supabase](https://supabase.com/), and [Vercel](https://vercel.com).
We've chosen these technologies for their speed, efficiency, and ease of use, and we're confident that they'll provide a great user experience for everyone who uses CheatGPT.

If you're interested in learning more about CheatGPT, you can visit our website at [CheatGPT.app](https://cheatgpt.app/) or check out our [GitHub repository](https://github.com/epavanello/cheatgpt.app)

You can also follow us on Twitter at [@e_pavanello](https://twitter.com/e_pavanello) for updates and news about CheatGPT.

Thank you for your support, and we look forward to helping you write better with CheatGPT!
Paracetamol.js💊| #205: Explica este código JavaScript
Tags: javascript, webdev, spanish, programming
Published: 2023-03-16 13:00:00

## **<center>Explica este código JavaScript</center>**
#### <center>**Dificultad:** <mark>Intermedio</mark></center>

```js
const one = () => {
  return new Promise((resolve, reject) => {
    setTimeout(() => {
      resolve("one")
    },5000)
  })
}

const two = () => {
  return new Promise((resolve, reject) => {
    setTimeout(() => {
      resolve("two")
    }, 2000)
  })
}

const three = () => {
  return new Promise((resolve, reject) => {
    setTimeout(() => {
      resolve("three")
    }, 0)
  })
}

const res = () => {
  return Promise.allSettled([one(), three(), two()])
}

res()
  .then(x => console.log(x))
  .catch(err => console.log(err))
```

- A. (después de 5s)
```js
[{
  status: "fulfilled",
  value: "one"
}, 
{
  status: "fulfilled",
  value: "three"
}, 
{
  status: "fulfilled",
  value: "two"
}
}]
``` 
- B. (después de 2s)
```js
[{
  status: "fulfilled",
  value: "one"
}, 
{
  status: "fulfilled",
  value: "three"
}, 
{
  status: "fulfilled",
  value: "two"
}
}]
```  
- C. (de manera inmediata, después de 0s)
```js
[{
  status: "fulfilled",
  value: "three"
}]
``` 
- D. `Promise.allSettled() no existe en Javascript`  

Respuesta en el primer comentario.

---
Natural Language Processing: A Powerful Tool for Understanding Human Language
Tags: machinelearning, nlp, programming, python
Published: 2023-03-16 12:57:51

Natural Language Processing (NLP) is a field of artificial intelligence that focuses on the interaction between computers and human language. With the ability to analyze, understand, and generate human language, NLP has become an increasingly important tool in various industries, including healthcare, finance, and customer service.

At its core, NLP involves a combination of machine learning algorithms, statistical models, and linguistic rules that allow computers to analyze and interpret human language. This includes tasks such as language translation, sentiment analysis, text summarization, and named entity recognition.

One of the key challenges of NLP is the complexity of human language. Unlike programming languages or mathematical equations, human language is highly ambiguous and can vary greatly depending on the context and the speaker. This means that NLP algorithms must be able to handle a wide range of linguistic nuances and understand the context in which the language is being used.

One of the most exciting applications of NLP is in the field of chatbots and virtual assistants. These tools use NLP algorithms to understand and respond to human language, allowing them to provide personalized customer support or perform a wide range of tasks, from scheduling appointments to ordering food.

Another important application of NLP is in healthcare, where it is used to analyze patient records and detect patterns that may indicate disease or other health issues. NLP algorithms can also be used to analyze social media posts or other forms of text data to identify public health trends and track the spread of infectious diseases.

Overall, natural language processing is a powerful tool that has the potential to revolutionize the way we interact with technology and with each other. As NLP algorithms continue to improve and become more sophisticated, we can expect to see even more exciting applications in a wide range of industries.
Execute ECS task by ecsta
Tags: ecs, tool, aws
Published: 2023-03-16 12:53:35

---
title: Execute ECS task by ecsta
published: true
description: description
tags: ecs, tool, aws
---

Are you tired of debugging when you use an ECS? If so, ecsta is a tool for you!
ecsta is to help you execute the ECS container by cmd.

## What is ecsta?

ecsta is a tool that you can use to execute your ecs tasks, such as describing, listing, and even port forwarding your ecs task easily.

[fujiwara/ecsta: ECS Task Assistant tool.](https://github.com/fujiwara/ecsta)

## Features

- list tasks
- describe task
- exec task
- portforward task
- stop task
- trace task
- logs

```
Usage: ecsta <command>

Flags:
  -h, --help                        Show context-sensitive help.
  -c, --cluster=STRING              ECS cluster name ($ECS_CLUSTER)
  -r, --region=STRING               AWS region ($AWS_REGION)
  -o, --output="table"              output format (table, tsv, json) ($ECSTA_OUTPUT)
  -q, --task-format-query=STRING    A jq query to format task in selector
                                    ($ECSTA_TASK_FORMAT_QUERY)

Commands:
  configure
    Create a configuration file of ecsta

  describe
    Describe tasks

  exec
    Execute a command on a task

  list
    List tasks

  logs
    Show log messages of a task

  portforward --local-port=INT --remote-port=INT
    Forward a port of a task

  stop
    Stop a task

  trace
    Trace a task

  version
    Show version
```

## How to use?

I will show you some features

NOTE: you need to set your aws credential `(~/.aws/credentials)`

### Install

```
brew install fujiwara/tap/ecsta
```

### List task

```
ecsta list -c cluster-name -s service-name

|                ID                | TASKDEFINITION  | INSTANCE | LASTSTATUS | DESIREDSTATUS |         CREATEDAT         |         GROUP         |  TYPE   |
+----------------------------------+-----------------+----------+------------+---------------+
| 12e1e24342a6bddddbf148393ab6e4cf3 | task-definition:1 |          | RUNNING    | RUNNING       | 2023-03-16T00:00:00+09:00 | service:service-name | FARGATE |
```

### Exec task

This command is wrapper of [ECS Exec](https://docs.aws.amazon.com/AmazonECS/latest/userguide/ecs-exec.html)

```
ecsta exec --service=service-name --container=container-name

Enter cluster name: cluster-name
Enter task ID: 12e1e24342a6bddddbf148393ab6e4cf3

Starting session with SessionId: ecs-execute-command-0dvv124623eaaf0f
/api #

```

## Conclusion

This tool is quite helpful to exec your ecs task!

Thank you for reading my article, Happy Coding!

### Reference:

[Using Amazon ECS Exec for debugging - Amazon ECS](https://docs.aws.amazon.com/AmazonECS/latest/userguide/ecs-exec.html)

[fujiwara/ecsta: ECS Task Assistant tool.](https://github.com/fujiwara/ecsta)
How to build an image from Dockerfile?
Published: 2023-03-16 12:50:00

To build a Docker image from a Dockerfile, you can follow these steps:

    Open a terminal or command prompt and navigate to the directory where your Dockerfile is located.

    Run the following command: docker build -t <image_name> .

The docker build command is used to build a Docker image, and the -t flag is used to give the image a name. The . at the end of the command tells Docker to use the current directory as the build context.

For example, if your Dockerfile is located in a directory called myapp, and you want to name the image myapp-image, you would run the following command:

docker build -t myapp-image myapp

    Docker will start building the image based on the instructions in your Dockerfile. It will download any necessary dependencies and packages and execute any commands specified in the Dockerfile.

    Once the build process is complete, you can verify that the image was created by running the docker images command. This will show a list of all the Docker images on your system, including the one you just built.

That's it! You have successfully built a Docker image from a Dockerfile. You can now use this image to create and run Docker containers.
How to delete file from S3 using API
Tags: api, aws, s3, tutorial
Published: 2023-03-16 12:48:59

I wanted to show, how you can delete data from S3 using **API**. With a simple **curl**, you can delete files from S3. In the following example, I delete the `test_empty.txt` file from the bucket named `BUCKET_NAME` from the `eu-west-1` region. For correct operation, you must provide `ADD_YOUR_KEY_ID` and `ADD_YOUR_SECRET_KEY_VALUE` .

```
#!/usr/bin/env bash

access_key_id=ADD_YOUR_KEY_ID
secret_key=ADD_YOUR_SECRET_KEY_VALUE
file_path=test_empty.txt
bucket_name=BUCKET_NAME
region=eu-west-1



# metadata
content_Type="application/octet-stream"
date=`date -R`
full_path="/${bucket_name}/${file_path}"
signature_string="GET\n\n${content_Type}\n${date}\n${full_path}"
signature=`echo -en ${signature_string} | openssl sha1 -hmac ${secret_key} -binary | base64`

# save file in file_path ( -o, --output <file>)(-s, --silent)(-S disable progress meter but still show error messages)
curl -Sso ${file_path} \
  -H "Host: ${bucket_name}.s3.${region}.amazonaws.com" \
  -H "Date: ${date}" \
  -H "Content-Type: ${content_Type}" \
  -H "Authorization: AWS ${access_key_id}:${signature}" \
  -X "GET" https://${bucket_name}.s3.${region}.amazonaws.com/${file_path}
```

By making a small change, you can download the file first and then remove it from S3. More information can be found on my blog.

I also recorded a video on **YouTube** in which I show **7 ways to delete data from S3** - https://youtu.be/SckbCTULsHM

You'd rather read than watch, no problem. On **my blog** you will also find an article in which I described **7 ways to delete data from S3** - https://lepczynski.it/en/aws_en/7-ways-to-delete-data-from-s3/
React Project for Beginners: Todo App with Drag and Drop - React DnD Tutorial
Tags: react, webdev, javascript, beginners
Published: 2023-03-16 12:46:43

Practice React by creating a simple but cool Todo app in `React`, `TailwindCSS` and `React DnD`

Features:
- Using Forms in React (Create Task)
- Using useState and useEffect Hooks
- Passing data via props to child components
- Using browser localStorage
- Toast messages (react-hot-toast)
- .filter() array method
- Listing tasks
- Drag and Drop tasks to different sections (react dnd)
- Style TailwindCSS

##Video Tutorial 👇

{% youtube r-m3L3m2IW8 %}
Sanity Vs Smoke Testing: Understand The Difference With an Example 🔍
Tags: testing, programming, performance, webdev
Published: 2023-03-16 12:37:29

In order to provide premium quality products to customers, software testing is necessary. The purpose of software testing is merely to ensure that customers have an excellent user experience and to avoid any problems with software products or services. Sanity tests and smoke tests are types of software testing that are designed to catch issues early in the development process before they become more significant and costly.

Sanity testing verifies rationality, whereas smoke testing verifies stability. Smoke testing is performed by software developers or testers, while sanity testing is performed by testers alone. Sanity testing is a subset of acceptance testing, while smoke testing is a subset of regression testing.

## Smoke Testing VS Sanity Testing
Smoke testing is an initial and essential step in software testing. It is a high-level testing process that is performed to verify if the most critical functionalities of the application are working correctly. It is called “smoke testing” because, in the hardware context, smoke might be generated if a significant issue occurs. Similarly, if the smoke test fails, it indicates a significant problem in the application.

Sanity testing is software testing performed to quickly verify if the newly added functionalities or changes have not adversely affected the application’s critical functionalities. It is called “sanity testing” because it focuses on testing the basic and most important functionalities of the application to ensure that it is still sane and working correctly.

![Smoke Testing VS Sanity Testing](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/96jo31svadmqetsf3xfn.png)

**While both smoke testing and sanity testing are used to verify the functionality of the software, there are several key differences between the two:**

{% embed https://bit.ly/3ljBq0Q %}
Emojis in Development?
Tags: webdev, programming, github, emoji
Published: 2023-03-16 11:58:29

Emojis. Either you love them or you hate them. The internet has been split on this point for years. Especially in the developer community, the concept of emojis has been called a no-go for years.

However, this seems to be changing at the moment. More and more developers see the advantage of well as sociable emojis, especially in open source projects. 

Especially projects like [GitMoji](https://gitmoji.dev/) are driving this trend.

Now that I've been able to follow a trend more and more often in GitHub projects, I'd like to know from you: Do you use emojis in your code, in Git or otherwise in the development process?
Cách tắt đèn led cảm biến cầu thang tại Đà Nẵng
Published: 2023-03-16 11:57:45

Tắt đèn LE

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/odv1ouwc01uux42u0uki.jpg)
den cảm biến cầu thang là một giải pháp tiện lợi và an toàn cho ngôi nhà của bạn. Dưới đây là hướng dẫn cơ bản về cách cài đặt đèn LED cảm biến cầu thang tại Đà Nẵng:

Bước 1: Chuẩn bị đầy đủ các vật liệu và công cụ cần thiết, bao gồm đèn LED cảm biến, dụng cụ gắn nhanh, mắt khoan và bộ kết nối.

Bước 2: Tắt điện và tiến trình sửa lỗi trên bậc thang cầu thang ở vị trí muốn gắn đèn LED cảm biến. Nên sử dụng mắt khoan kích thước phù hợp với đèn LED cảm biến để tránh khoan quá mức gây hư hỏng bề mặt cầu thang.

Bước 3: Sau khi khoan xong, đặt bộ kết nối trong lỗ khoan và chặt chẽ. Bộ kết nối được sử dụng để giữ chặt đèn LED cảm biến vào vị trí.

Bước 4: Gắn đèn LED cảm biến vào bộ kết nối, đảm bảo đèn LED được chắc chắn và mức độ phù hợp cao với khoảng cách giữa các bậc thang.

Bước 5: Kết nối dây điện cho đèn LED cảm ứng biến theo hướng dẫn của nhà sản xuất và đảm bảo việc kết nối dây điện được thực hiện đúng cách để tránh nguy cơ gây chập điện.

Bước 6: Cuối cùng, kiểm tra đèn LED cảm biến để đảm bảo chúng hoạt động đúng cách và sáng đều trên các bậc cầu thang.

Việc tắt đèn LED cảm biến cầu thang sẽ giúp bạn tiết kiệm năng lượng, bảo vệ môi trường, đồng thời tăng tính thẩm mỹ cho ngôi nhà của bạn. Nếu bạn không tự lắp được đèn LED cảm biến, bạn có thể thuê một nhà thầu chuyên nghiệp tại Đà Nẵng để họ lắp cho bạn.