teleren/devto huggingface dataset:
First Hacktoberfest PR
Tags: hacktoberfest23, osd600
Published: 2023-10-04 00:40:00

In the first days of October, I participated in my first Hacktoberfest. The primary objective of this event is to contribute to open-source projects and have your pull requests (PRs) approved and merged.

For me, it has been a learning experience. Initially, I aimed to tackle a small issue, but it took quite some time to find a one I can do to get familiar with contributing. However, I was pleased to see the high level of activity among all participants. As I complete my PR, I plan to take on more challenging tasks to further my learning.

For my initial contribution I worked on the [Would-You-Bot Website](https://github.com/Would-You-Bot/website) repository. On [issue 48](https://github.com/Would-You-Bot/website/issues/48). This issue involved creating a Contribution Guidelines document to help new contributors understand how to get involved with the project.

You can find my PR [here](https://github.com/Would-You-Bot/website/pull/55)

To complete this task, I first reviewed the project's files to locate any useful issue/PR templates and guidelines that new contributors might not be aware of. I added them as links within the document to ensure easy access in one place. Additionally, I took inspiration from how other projects structured their contribution guidelines.[Dominik K,](https://github.com/mezotv) the code owner, provided valuable feedback for improving the document.

I must admit, seeing my work integrated into someone else's project is an incredible feeling! Now, I'm looking to discover more projects to contribute to.
Arduino remotely controlled (part 3)
Tags: arduino, iot, tutorial, reactnative
Published: 2023-10-03 23:14:44

## Introduction

In the [previous post](https://dev.to/iagows/arduino-remotely-controlled-part-2-1b1n), we created a server to talk with an Arduino.

Now it's time to create a simple mobile application to interact with the server.

## What are the problems I want to solve?

I don't want to interact with my Arduino using URLs. I want to interact with a nice (?) UI.

## What is the solution?

Create an React Native + Expo application to connect and interact with the server.

## Weak points

1. I'm not doing a very complex and fully working application. It's just a POC.
1. Ideally each interaction with the 'slider' should take some milliseconds before calling the server to avoid multiple callings
  1. Now I'm thinking of making a change into the Arduino library to make percent values change into steps to make it smooth.
1. I'm not storing/recovering the server IP into the application. I'm sure you can do it easily.

## Intended public

I expect you to have some knowledge of: Typescript, React, React Native and Expo.

## Let's start 

### Code
I created tag into the [app repository](https://gitlab.com/arduino_io/iot_app/-/tree/3.0.5?ref_type=tags), so you just have to download and read the code.

### What is the code idea?

1. It waits for user input the server URL or IP
1. Tests the connection
1. Loads the server data
1. Shows the hubs components
  1. Waits for user interaction to send the value back to Arduino

## Results

It's running in my old Android 7 smartphone. The screen is damaged and I had to do multiple touches to make the buttons work. I didn't want a long video, so I cropped some parts of it.

![Testing the app and verifying the results](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8dshaijuoh3ka2w4x77t.gif)

## Previous steps

1. [Create an Arduino library to remote communication](https://dev.to/iagows/arduino-remote-io-1mc7)
1. [Connect the Arduino to a server](https://dev.to/iagows/arduino-remotely-controlled-part-2-1b1n)

## Last words

- This project is far from complete.
- It's NOT intended to be used in production as is.
- It needs lots of refactoring (that I intend to do, and I'll keep the tags for everyone who's reading this tutorial)
- Maybe someday, after all refactoring, I'll connect my Arduino to an solid state relay and do some 220V tests (children, don't try this)
- If you did try my code, please let me know if it worked, any problems you faced and how you got around those issues
- And last but not least, if you got this far, thank you for your patience
Feedback Loops
Published: 2023-10-04 19:31:44

---
title: Feedback Loops
published: true
date: 2023-10-04 00:00:00 UTC
tags: 
canonical_url: https://blog.pitermarx.com/2023/10/feedback-loops/
---

I’ve been thinking recently about feedback loops. In control theory, one way to manage dynamic systems is via feedback loops.
Future Code Capsule: What Wisdom Would You Bury?
Tags: discuss, codenewbie, beginner
Published: 2023-10-04 00:00:00

---
published_at : 2023-10-04 00:00 +0000
---
If you were to retire from coding today, what one piece of code or project would you want to be remembered for? How does this reflect your coding values and aspirations for your career?

Follow the [CodeNewbie Org](https://dev.to/codenewbieteam) and [#codenewbie](https://dev.to/t/codenewbie) for more discussions and online camaraderie! *{% embed* https://dev.to/codenewbieteam *%}*
JS faz sentido
Tags: javascript, beginners, braziliandevs
Published: 2023-10-03 23:38:46


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


Sempre vejo esses Memes de js de como a linguagem não funciona porque acontece tal coisa absurda, e normalmente é engraçado mas também pode fazer com que pessoas sem experiencia, como eu mesmo, se confundam ainda mais quando estão estudando. 

Esse aqui não é nada diferente. 
Como o operador "in" funciona: ele é busca se a chave existe no objeto. 
```js
const pirate = {
    hat: "straw",
    shoes: "flipflops",
    power: "rubber",
  };
 // Defini o objeto pirate aqui. E preciso saber se ele tem poder.
if ("power" in pirate) { // TRUE
  return "Esse pirata comeu uma fruta"
}
// Mas o objeto pirate poderia ser diferente.
const pirate = {
   hat: "bandana",
   shoes: "shoe",
   weapon: "swords"
};

if ("power" in pirate) { // FALSE
  return "Esse pirata comeu uma fruta"
}

```

O exemplo acima mostra um uso para o operador in, algo util porque muitas vezes podemos receber um objeto sem a chave e precisamos verificar isso. 
E vejam, não existe nas propriedades nenhum "power" apenas nas chaves.

Ai você pode se perguntar: Mas então como funciona num array, se array não é um objeto?
Na verdade, o array é um objeto especial onde seus indices são as chaves. 
```js
const array = [1,2,3,4];

Object.keys(array) //[0,1,2,3]

const object = {
  0: 1,
  1: 2,
  2: 3,
  3: 4
}

typeof Array() // 'object'
```

E o javascript tenta não nos punir tanto, então quando passa o operador em um array ele faz essa conversão por baixo dos panos. 
Assim como os casos de "0" e 0, porque ele transforma qualquer valor em string. 
```js
let number = 0;
let string = "0";

string === number.toString(10) // TRUE
```

Nas próximas vezes que ver um meme assim, antes de achar "Nossa, realmente não faz sentido" procure pelo motivo daquilo e vai perceber que é tudo esperado. E na maioria dos casos você nunca vai ver nenhum desses exemplos de meme na vida real.

[in - JavaScript | MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/in)
Crypto Recovery with GearHead Engineers
Published: 2023-10-03 23:06:51

I was a target of a bitcoin heist where my coins were syphoned from my wallet to another. I of course reached out to the support team but they were slow to respond my emails and when they did, they argued that it was someone who knew all my credentials to make the transaction and so they couldn’t do anything about it other than to assist me in setting up an authenticator to enhance security. So I had to solve this through my own means. I reached out to gearhead engineers through their website, gearheadengineers dot org and presented my case. I was impressed with how fast and knowledgeable they are when they eventually discovered where my coins were sent to. They helped me get back everything. Reach out to them through their website.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/78l94o4cgtip2ku4lqbz.jpeg)
Always have plan B when your federated component fails
Tags: react, webpack
Published: 2023-10-03 22:54:05



You are now used to the following code:

```tsx
import React from "react";

const App1 = React.lazy(() => import("app1/App"));

function App() {
  return (
    <>
      <App1 />
      <div className="App">host</div>
    </>
  );
}

export default App;
```

But what if the `host` could not load the `app1`? 
what if `app1` site is down? 

In these cases you will have the house of cards falls all over the place, meaning if single microfrontend fails in a page the entire page will throw an error.

We can agree that this is not the best solution, but what can we do in this case?

## When you federate a component, you need to have a fallback component 

Maybe you're thinking of suspense? but suspense is designed for components that will eventually be loaded rather than components that fails, what we need specifically is an `ErrorBoundary`

Checkout the code here:

```tsx
// app1-wrapper.tsx

import { Suspense, Component } from 'react';


const App1 = React.lazy(() => import("app1/App"));

class App1Wrapper extends Component {
  constructor(props) {
    super(props);
    this.state = { hasError: false };
  }

  static getDerivedStateFromError(error) {
    return { hasError: true };
  }

  render() {
    if (this.state.hasError) {
      return <div>Our plan B for app1</div>
    }

    return <App1/>
  }
}

export default App1Wrapper;
```

> NOTE: the error boundary currently only supported on class based components


Now you import your wrapper safely inside your Host `app.tsx`

```tsx
import React from "react";
import App1 from './app1-wrapper'

function App() {
  return (
    <>
      <App1 />
      <div className="App">host</div>
    </>
  );
}

export default App;
```

And that's it!


## Your homework

- Add a spinner that the host fails back into when waiting the component from the `app1`, (Use Suspense)
Exportar e importar una base de datos dentro de Docker.
Tags: spanish, docker
Published: 2023-10-03 22:37:21

En este pequeño articulo vamos a revisar como exportar e importar una base de datos #MariaDB o #MySQL que esta dentro de un contenedor de Docker.

Si lo hiciéramos de manera muy manual lo que tendríamos que hacer es entrar al contenedor, exportar el archivo de base de datos y posteriormente salir para copiar del contenedor hacía el host y ya de ahí a donde lo necesites.

Gracias a una funcionalidad de Docker lo podemos hacer en 2 comandos.

1.- Comando para exportar.
Lo que hacemos es ocupar exec seguido del nombre del contenedor para poder interactuar con el mismo desde fuera y ejecutamos el comando de mysqldump pasando los argumentos que siempre hemos pasado como lo es el usuario, la contraseña y nombre de la base de datos, al ultimo ocupamos el operador > para dirigir el resultado hacia el archivo backup.sql


![Exportar BD](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dnkt5yi35q99m8yd20fm.png)

2.- Comando para importar.
En cuanto a importar lo que tenemos que hacer es ocupar el comando cat que nos muestre como salida el contenido del archivo ocupamos el operador | para redirigir la salida como entrada al siguiente comando en este caso volvemos a ocupar docker exec pero con la diferencia del argumento -i y volvemos a pasar los datos como si fuera una importación normal usuario, contraseña y nombre de base de datos.


![Importar BD](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4y6n50taw7tk9jfh0d73.png)

Con estos sencillos comando exportamos e importamos una base de datos mucho más sencillo aún estando dentro de un contenedor.
Placeholder Contributor
Tags: hack23contributor
Published: 2023-10-03 22:53:42

<!-- ✨This template is only meant to get your ideas going, so please feel free to write your own title, structure, and words! ✨ -->

### Intro
<!-- Share a bit about yourself as a contributor. Is this your first Hacktoberfest, or have you contributed to others? Feel free to embed your GitHub account by using [% embed LINK %] -->

### Highs and Lows
<!-- What were some of your biggest accomplishments or light-bulb moments this month? Did any problems come up that seemed impossible to fix? How did you adapt in those cases?  -->

### Growth
<!-- What was your skillset before Hacktoberfest 2023 and how did it improve? Have your learning or career goals changed since working on these new projects? -->
Day 824 : Holding On
Tags: hiphop, code, coding, lifelongdev
Published: 2023-10-03 22:23:38

_liner notes_:
- Professional : Had a meeting to start off the day. Then spent the rest of the day creating the documentation and pushing the code of the Web Component I made to GitHub. Also published it so that others can use it in their own applications. Had a couple of things to modify, but got it working.

- Personal : Last night, I went through some tracks for the radio show. Put together a list of sites to show a friend for a side project I'm looking to put together. Other than that, I went to bed.

![Looking though an opening in the forest of Yosemite Valley, CA, USA up at a waterfall coming down from a grey stone mountain](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/z9t7ai10v9q1b0f8eh5q.jpg)

Looking to go through some more tracks for the radio show. Work on a proof of concept for a side project. Still need to catch up on "Bleach". Holding on to the hope that I'll actually watch it. haha

Have a great night!

peace piece
Dwane / conshus
https://dwane.io / https://HIPHOPandCODE.com
{% youtube khCr3rlbfvs %}
Install PHP & MySQL in MacOS
Published: 2023-10-03 21:03:40

### Step 1) Install Brew
Ref: https://brew.sh/
```
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
```

### Step 2) Install PHP
```
brew install php
```

To install a specific version
```
brew install php@8.1
```

To make a specific php version as default:
```
brew link --overwrite --force php@8.1
```

### Step 3) Install PHP Extensions
```
brew tap shivammathur/php
```

```
brew tap shivammathur/extensions
```

Eg: Install `imap`
```
brew install imap@8.1
```

To verify run:
```
php -m
```

### Step 4) Install Composer
```
brew install composer
```

### Step 5) Install Laravel Valet
Ref: https://laravel.com/docs/10.x/valet 

```
composer global require laravel/valet
```

```
valet install
```

To change the default version of valet:
```
valet use php@8.1
```

To verify:
```
valet php -v
```

To install composer packages in a project root directory, run
```
valet composer install
```

then run
```
valet link
```

Now, you can visit: `http://<project-directory>.test`, it should render default page.


### Step 6) MySql Database
Install DBngin from https://dbngin.com/

### Step 7) Install PhpMyAdmin
- Download https://www.phpmyadmin.net/downloads/
- Unzip and setup site using `Laravel Valet` 
- Open `config.inc.php`
- Update following:
```
$cfg['blowfish_secret'] = ''; //some random key
$cfg['Servers'][$i]['auth_type'] = 'cookie';
$cfg['Servers'][$i]['host'] = '127.0.0.1';
$cfg['Servers'][$i]['AllowNoPassword'] = true;
```

Try to open and login.

Or you can also install https://apps.apple.com/us/app/sequel-ace/id1518036000?mt=12
Yoga and Mind Healing
Published: 2023-10-03 22:06:12

Stress Reduction: Yoga involves deep breathing and relaxation techniques that help reduce stress and promote a sense of calm. Regular practice can lower cortisol levels and improve the body's stress response.

Mental Clarity: Through meditation and mindfulness practices, yoga can enhance mental clarity and focus. This can be especially beneficial for those dealing with anxiety or racing thoughts.

Emotional Regulation: Yoga encourages self-awareness and self-acceptance. It can help individuals process and manage their emotions, making it a valuable tool for those dealing with mood disorders.

Physical Benefits: While yoga is primarily a mental and spiritual practice, it also has physical benefits. Improved physical health can positively impact mental well-being, as a healthy body often leads to a healthier mind.

Community and Support: Many people find a sense of community and support in yoga classes or groups. This social connection can be essential for those struggling with loneliness or isolation.

Trauma Healing: Some yoga practices, such as trauma-informed yoga, are specifically designed to help individuals heal from emotional or physical trauma. These practices focus on creating a safe and supportive environment.

Self-Care: Yoga encourages self-care and self-compassion. Taking time for oneself and practicing self-love are essential components of healing the mind.

It's important to note that while yoga can be a valuable complement to traditional mental health treatments, it is not a replacement for professional therapy or medication when needed. People experiencing severe mental health issues should seek help from qualified mental health professionals.

If you're interested in specific yoga practices, meditation techniques, or resources related to mind healing through yoga, please let me know, and I can provide more detailed information or guidance.
How to store google api key as secret with expo
Tags: reactnative, javascript
Published: 2023-10-03 22:03:02

If your react native expo application needs to access google services (such as google maps) you will need to create a google api key. The problem is this api key must remain hidden from the public or you risk receiving a large unannounced bill from Google.

You also do not want the api key embedded in the client application as this can be extracted by a determined hacker.

Fortunately this is pretty easy.


Open a terminal and enter
* `eas init`


This is will generate an app.json file or if you already have one, it will add `extra.eas.projectId` to app.json


* Rename your app.json file to app.config.js. 


Now edit app.config.js, it should something like this.


![app.config.js](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/z73phl9jm3aft0ny8g93.jpg)

First notice line 1. Since this is a js file we must export the json. Add `export default {...}`

Now note line 40: `"apiKey": process.env.GOOGLE_SERVICES_API`

GOOGLE_SERVICES_API is the secret variable we must now create on expo.dev

Login to your expo.dev account, click secrets, and add the new variable `GOOGLE_SERVICES_API` and set the value to your google api key.


![Expo.dev secrets](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4ayoc8xggq0dqr7ens1h.jpg)



Go back to your terminal and type
*  `eas secret:list` 


you should see something like:


```
Secrets for this account and project:
ID          30af395a-70bb-4b33-afe7-xxxxxxxxxxx
Name        GOOGLE_SERVICES_API
Scope       project
Type        STRING
Updated at  Oct 03 11:29:30
```


That's it! Now you can checkin your files to a public repository with no worries of a hacker exploiting your google api key.
Mass Mail For Free with eM Client
Published: 2023-10-03 21:40:28

---
title: Mass Mail For Free with eM Client
published: true
description: 
tags: 
# cover_image: https://direct_url_to_image.jpg
# Use a ratio of 100:42 for best results.
# published_at: 2023-10-03 21:32 +0000
---

# Cheaper and Easier than a CRM or Mailchimp: Sending Mass Email for Free with eM Client

Many times a selling point for a Customer Relationship Management (CRM) tool or email marketing tool like Mailchimp is it's ability to send mass emails. This often takes the form of being able to use variables like name, title, and more, to personalize a templated email. While the fields that you can use are limited to those supported by eM Client, we have some ways to get unique and make it work!

# Sending Mass Mail for FREE with eM Client


1.Download the client

(Our friends at West Tennessee Consulting helped us vet this solution, we know this is safe!)

[Windows+Mac](https://www.emclient.com/download?lang=en)

This works with almost any type of email account, for the demo we used a @gmail.com account.

2.Setup your account

We used a gmail account, it had us got our default browser and complete the login process, then started syncing our email!

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

3.Send a Mass Mail

Open up new mail, then click to send as mass mail.

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

4.Use a variable in your Mass Mail

In order to personalize the email you need to use variables, right click to insert, then insert a variable and select from available contact fields. This is how you write the email 1 time and can personalize it for the masses!

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

5.Select all the contacts to send to

Now you have a variable, fill out who you want to send it to and click send!

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

6.Bask in the Glory!

The emails come out like this!

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

Nice and easy.


# Next Steps
Enjoy? Like, Follow, Subscribe at the below links and send us your feedback!

[Twitter](https://bit.ly/twittersecmaven)
[Youtube](https://bit.ly/youtubesecmaven)
[Facebook](https://bit.ly/facebooksecmaven)
[LinkedIn](https://bit.ly/linkedinsecmaven)
YugabyteDB in Jupyter Notebook in Google Colab
Tags: yugabytedb, postgres, distributed, sql
Published: 2023-10-03 21:27:29

When you want to play with a Database, especially when connecting with Python, Jupyter notebooks are quite handy. Google Colab even provides a runtime environment for free with 12.7 GB RAM and 107.7 GB disk, which is sufficient to run YugabyteDB especially when started with `yugabyted`.

Here is an example of such Notebook, you can look at it and run it:
{% embed https://colab.research.google.com/gist/FranckPachot/5b19c841444abf4739a3a656f9dad9bc/demo-yugabytedb.ipynb %}

Here is the iPython cell I use to download and install the latest preview version of YugabyteDB:
```sh
# Install YugabyteDB if not already there (get the latest preview version from docs.yugabyte.com)
! [ -f ./yugabyte/bin/yugabyted ] || { \
  rm -rf yugabyte-* && \
  apt install gawk  && \
  tgz=$(curl -Ls https://docs.yugabyte.com/preview/quick-start/linux/ | awk '$0~re{print gensub(re,"\\1",1,$0)}' re="^.*wget (.*$(uname -m)[.]tar[.]gz)") && \
  wget -O yugabyte.tar.gz "$tgz" && \
  tar xfz yugabyte.tar.gz && \
  rm -rf yugabyte.tar.gz && \
  mv ./yugabyte-* yugabyte && \
  ./yugabyte/bin/post_install.sh >/dev/null 2>&1 ; \
  }
! [ -f ./yugabyte/bin/yugabyted ] || echo YugabyteDB is installed
! ./yugabyte/bin/yugabyted status
```

Here is the iPython cell I use to start it (on same port as the default PostgreSQL one):
```sh
%env PGHOST=127.0.0.1
%env PGPORT=5432
# Start YugabyteDB
! ./yugabyte/bin/yugabyted start --advertise_address=$PGHOST --ysql_port=$PGPORT & \
  echo "Starting in the background because it seems iPython doesn't detect when done..."
```

Here is the cell I use to wait for the PostgreSQL enpoint to be available:
```sh
# Wait that the PostgreSQL compatible endpoint accepts connections (PGHOST and PGPORT are set)
! until ./yugabyte/postgres/bin/pg_isready ; do sleep 1 ; done | uniq ; ./yugabyte/bin/yugabyted status
```

You can run `./yugabyte/bin/ysqlsh` which is the fork of `psql` with the same features. You can use psycopg2, SQLAlchemy, iPython SQL Magic, as you would do with a PostgreSQL database

The status of the YugabyteDB cluster is also available from the http console. Here is an example listing the servers:
```python
pandas.read_html('http://localhost:7000/tablet-servers')[0].replace(":9000 [0-9a-f]{32}","",regex=True)
```
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tlmj1ry8n1ippbugn8hb.png)


The SQL magic `%%sql` is a convenient way to run simple SQL, connecting to YugabyteDB and running PostgreSQL queries:
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dgkp1wrasycke8b2yh5m.png)