teleren/devto huggingface dataset:
Making a GitHub Repository to Help People
Tags: help, discuss, opensource, webdev
Published: 2022-01-30 16:19:24

### Making a GitHub Repository to Help People Get Involved Into Open Source Make Their First Contribution

Hey folks! I've created a repository on my **GitHub** for those who are new to tech and get involved in open source they can contribute here. 
I need all your help to make the contributing guidelines and other things. 
[Link to the repository](https://github.com/Susmita-Dey/Contribute-To-This-Project-First )

The **aim** is to make the repository ready and so that it can help beginners to get involved into open source and make their first contribution to this repo and get involved into open source.

**Let's come and make this together.** Tell me your suggestions.

## Hope this helps you. Thank you for reading, and let's connect!
Thank you for reading my blog. Feel free to subscribe to my [YouTube Channel](https://www.youtube.com/channel/UCsuzc8lqAbgUYo4yzpjtfSw) and connect on [LinkedIn](https://www.linkedin.com/in/susmita-dey-15a15a210/) or [Twitter](https://twitter.com/its_SusmitaDey).
Also, feel free to [support](https://www.buymeacoffee.com/susmitadey) my work.😊
I Created A Text-To-Speech Converter With Flask
Tags: gtts, python, webdev, texttospeech
Published: 2022-01-30 17:03:41

Hello Friends❗ 😀😎

### What Is This?

Simply this is AdiSpeaks a text-to-speech converter on the web.

This is a website in which you can enter your text and emojis and then it will be converted to an mp3 file which you can also download

### How To Use It?


1. Clone the GitHub repository
    
    ```bash
    git clone https://github.com/AdithyanA2005/Text_To_Speech_Converter_Flask
    ```
    
2. Install the required dependencies
    
    ```bash
    pip install -r requirements.txt
    ```
    
3. Start the server
    
    ```bash
    python main.py
    ```
    
    This will show the output as
    
    ```bash
     * Serving Flask app 'app.app' (lazy loading)
     * Environment: production
       WARNING: This is a development server. Do not use it in a production deployment.
       Use a production WSGI server instead.
     * Debug mode: on
     * Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
     * Restarting with stat
     * Debugger is active!
     * Debugger PIN: 145-064-838
    ```
    
4. Open the running website
    
    > http://localhost:5000 or [http://127.0.0.1:5000](http://127.0.0.1:5000)
    
5. In the opened website click on the `Get Started` Button to open form
    
   ![Screenshot](https://cdn.hashnode.com/res/hashnode/image/upload/v1672031604441/94bdeee1-c0c8-4894-808d-4a6e966e6f2d.png)
    
6. In the form enter the desired text and click the `Play Audio` Button
    
    ![Screenshot](https://cdn.hashnode.com/res/hashnode/image/upload/v1672031835066/30b73d30-0dda-473e-9d5b-26dd2d41c8f8.png)
    
7. To download the audio file first click on the `triple-dot` button and then click the `download` button
    
    ![Screenshot](https://cdn.hashnode.com/res/hashnode/image/upload/v1672031722991/3ed2eef6-9fff-4d33-bf74-14b1cd14c44f.png)
How I can prompt a file manager of a known path in an android app?
Tags: help, android, java, programming
Published: 2022-01-30 16:53:01

As I ask upon:

{% stackoverflow 70916765 %}

I save a file into a pre-calculated path:

```java
private void saveFile(){
   String state = Environment.getExternalStorageState();
   if (!Environment.MEDIA_MOUNTED.equals(state)) {
      saveMsgHandler(null);
      return;
   }

   this.saveIntoFile.setEnabled(false);

   DateTimeFormatter pattern = DateTimeFormatter.ofPattern("yyyMMdd");
   File file = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS);

   file = new File( file.getAbsolutePath(),"voip_h300s_"+pattern.format(LocalDate.now())+".txt");
   try {
       file.createNewFile();
       PrintWriter out = new PrintWriter(new FileWriter(file));
        out.println("SOME VALUES");
        out.close();
        saveMsgHandler(file.getAbsolutePath());
   } catch (Exception e) {
     saveMsgHandler(null);
   }
 }
```

And I want once a file is successfully saved to prompt the device's file manager in order to convince the user that file is successfully saved.

But I do not know how to do that. Do far I found this piece of code:

```
public void displayFileIntoFileManager(String path){
        Intent intent = new Intent(Intent.ACTION_GET_CONTENT);
        intent.setType("*/*");
        startActivity(intent, 7);
    }
```

But I do not know how to provide the path to the Intent or whether is the correct one. Can you help me?
How to fix - Support for password authentication was removed on August 13, 2021. Please use a personal access token instead.
Tags: github, programming, tutorial, webdev
Published: 2022-01-30 16:37:59


{% youtube Ff66TqiaIto %}

GitHub has recently announced their migration to use token-based authentication which means you can no longer use your username and password for GtiHub authentication. You need to create personal access token to continue use of your GitHub Repository.
FormData doesn’t include disabled fieldsets
Tags: html, javascript, webdev
Published: 2022-01-30 16:19:32

When you disable the `fieldset` element **before** reading the form data using the `FormData` constructor, the data will be **empty**.

```js
// Find my form
const $form = document.querySelector('.my-form')
// Find all fieldsets inside my form
const $fieldsets = $form.querySelectorAll('fieldset')

// Set all fieldsets as disabled
if($fieldsets.length) {
  $fieldsets.forEach($fieldset => {
    $fieldset.setAttribute('disabled', true)
  })
}

// Construct FormData from the form
const formData = new FormData($form)

// You cannot log formData directly
console.log(Array.from(formData))

// Output: [] - doesn't work
```

So, if you want to disable the `fieldset` element, you should do it **after** using the `FormData` constructor.

```js
// Find my form
const $form = document.querySelector('.my-form')
// Find all fieldsets inside my form
const $fieldsets = $form.querySelectorAll('fieldset')

// Construct FormData from the form
const formData = new FormData($form)

// You cannot log formData directly
console.log(Array.from(formData))

// Output: [] - works

// Set all fieldsets as disabled
if($fieldsets.length) {
  $fieldsets.forEach($fieldset => {
    $fieldset.setAttribute('disabled', true)
  })
}
```

Also, if your fields are disabled, they won’t be included in the `FormData`, too.

Here’s a little demo of what works and what doesn’t work.

{% codepen https://codepen.io/CiTA/pen/VwMqaWz height=550 %}
Enrolling into SUSS at 30 revives my love for programming
Tags: study, suss
Published: 2022-01-30 15:59:32

I'm not a full believer of the utility of a university degree. I'm still not. I always wonder how many university graduates are underemployed. And I'm wondering about the percentage of the underemployed who utilises existing government programs to upskill in verticals unrelated to their studies. 

How many of your friends still work in a field related to their studies, be it poly or university?  

Regardless, I'm now pursuing my part-time BSc __Information and Communication Technology__ (ICT) in SUSS. There are various motivations behind my decisions. One is the fact that we as a society are still very much paper-crazed. Yes, even though we are moving away from that. 

The curriculum at SUSS intrigues me because of the practicality of it. Web application development, object-oriented programming, application analysis and project management, to name a few. 

I am at a crossroad in my life. I am grateful for the stability of my current job. Still, there is a nagging feeling that there is something out there more dynamic and more fulfilling. Something that makes me eager to start my day, again. 

There are still many pathways that I could grow as a frontend developer, like OWASP, PWA, GraphQL, service workers, typescript.

But I can't recall the last time that I sit in anticipation in front of my laptop. 

__I used to.__

__I used to love wrangling with the syntax of Javascript.__

__I used to spend hours on FreeCodeCamp, going through lessons after lessons.__

__I used to imagine the possibilities of the web.__

I used to.  That joy of opening up my IDE, and producing lines and lines of codes and marvel at my creation, it is missing. 

I don't know why and when it happens. Maybe it's burnout. Perhaps, it's the stark reality in comparison with what I imagine in my mind. I've been working in tech for a good 2-3 years. I still am amazed at how fast technology is advancing. I still love a good read on how technology and algorithms solve problems and improve people lives.

It's human to crave progression. Some people set their goals to build a family. While others set their sights on financial goals. In preparation and in hope for something bigger than what I am today, I make a target to get a degree before I'm 35. 

I have usually enjoyed the acquirement of knowledge. Still, I'm pleasantly surprised how working on the assignments give me joy. Even though there is a deadline to meet, even though some fellow coursemates feel stressed out, I rejoice in my refound passion for playing around code. 

I am fortunate to find the pace of the modules manageable as I have some background knowledge. I love the vibrancy of the chat group when people in it discuss programming even when I don't always fully participate in it.  I guess I miss the feeling of being in a community, though programming is a lonely task to undertake. 

December will mark the end of my Year 1, Sem 1 and I look forward to more advance classes in future.
The Mindset of a Coder.
Tags: javascript, webdev, beginners, react
Published: 2022-01-30 15:57:06

Hello, Dev Friends. Wish you all a very Happy New Year. 
For some of you, your New Year resolution might be to learn coding/ get a job in Tech / switch your career into Tech or to improve your skills as a Coder.
Here are some of the skills/mindset needed as per my understanding to be a better Coder.These are listed based on my learnings, experiences and what I learnt from others.

I am not saying that you are born with these skills as if you are Neo from Matrix movie and I am trying to tell you that "You are The One." No, you can be the one if you develop certain mindset along with the required skills.

So, let us go through the list:

1. The problem solving ability: You should be able to understand the problem correctly and completely.Then you must break the problem into chunks and solve it by communicating it to the Teddy Bear in front of you(if you have one or any person :D) and write a pseudo code in parallel.Once you are done with the solution,now code the solution in your respective language.Hence, practice DS & Algo questions.

2. Having a Growth mindset: In order to build a software you must behave like one.I meant to say that we should always be willing to update ourselves with the trend.For example,if you know JavaScript today,tomorrow in your job you might be expected to know TypeScript too.So you cannot survive with a fixed mindset.Be ready to learn new things.Be flexible.

3. Learn CSS/CSS frameworks- In order to make a complete application you should know CSS or any CSS framework so that you are able to design it responsively along with the working functionality.

4. Learn a programming language-Learn 1 programming language first.When you understand any 1 programming language in detail,it becomes easier to understand other languages/frameworks.Most of the languages have loops,Object oriented concepts,strings,arrays,etc in common.So you can understand the common concepts,language specific syntaxes in other languages easily.

5. Learn Git commands and know Github where you can push your projects.

6. Learn the coding concepts in detail as it makes the whole learning process interesting.
For example, Do you know how the concept of Closures has been used to save state?[Check out this video.](https://youtu.be/_-OE4bp0zSg)

7. Google: Yes,Google.You should learn how to find the answers if you do not know it.Google is definitely your Best Friend.

8. Consistency: To be a great Coder you need to stay consistent in your learning. Keep learning and practicing your skills regularly to be in the pace.

Let me know what more points you would like to add to the list.

Happy Coding :)
You can follow me on [Twitter](https://twitter.com/kritikasri27) and [Github](https://github.com/kritika27).
Pythonic Redis
Tags: python, redis, opensource, database
Published: 2022-01-30 15:48:19

## [pottery](https://github.com/brainix/pottery)
<span><strong><i class="fa fa-star">Star 611</i> <i class="fa fa-eye">Watch 11</i> <i class="fa fa-code-fork">Fork 23</i></strong></span>


Pottery is a Pythonic way to access Redis. If you know how to use Python dicts, then you already know how to use Pottery.

Pottery is useful for accessing Redis more easily, and also for implementing microservice resilience patterns; and it has been battle tested in production at scale.

```
>>> from pottery import RedisList
>>> tel = RedisDict({'jack': 4098, 'sape': 4139}, redis=redis, key='tel')
>>> tel['guido'] = 4127
>>> tel
RedisDict{'jack': 4098, 'sape': 4139, 'guido': 4127}
>>> tel['jack']
4098
>>> squares = RedisList([1, 4, 9, 16, 25], redis=redis, key='squares')
>>> squares
RedisList[1, 4, 9, 16, 25]
>>> squares[0]
1
```
RustLings III (conditions and convert)
Tags: rust, programming, beginners
Published: 2022-01-30 15:44:58

Bonjour!!!

I am back... it's been a while, but lets continue!!!

Next thing in rustlings is control flow which is very easy but if u come from C maybe a bit tricky. But nothing difficult!!!

The keywords are:
```rs
if <condition> {} // first condition
else if <condition> {} // other condition
else {} // none condition is true
```
nothing from another world. But you need to know that, `<condition>` has to be a **bool**, otherwise you will get an error.

**Ternary conditions** are weird... I like more C.

```rs
if <condition> { } else { }
```

You need those `{}` otherwise the compiler will say something like
![Not cool](https://media.giphy.com/media/4cQSQYz0a9x9S/giphy.gif)

The next thing I had to do was a quiz, very easy you don't miss nothing, except for one thing I have discovered!!

When u are using, say i8 and u want to return or you need it to be i32. There are two ways:

- `into`

```rs
let i: i8 = 0;
let x: i32 = i.into();
```
- `from`
```rs
let i: i8 = 0;
// u don't even need to specify here xd
let x: i32 = i32::from(i);
```

**from** is recommended by the [docs](https://doc.rust-lang.org/std/convert/trait.From.html)

---

## Follow me!
(I liked more the red bird :_()
🐦 [Twitter](https://twitter.com/blit12_)
🐙 [GitHub](https://github.com/blitty-codes)
👥 [LinkdIn](https://www.linkedin.com/in/blitty/)

---
Dedication towards Certification
Tags: aws, cloud, certification, cloudskills
Published: 2022-01-30 15:34:07

## My AWS + ULAP.org Cloud Computing Journey

Every day is a new opportunity to learn and to explore things.

I am Reniel Bryan De Lumban, a 3rd-year college student taking Bachelor of Science in Computer Engineering at Polytechnic University of the Philippines. I was an intern at ULAP.org, a non-profit organization known for its cloud/tech advocacy. The internship lasted for two months, and it introduced me to cloud technologies. I found the cloud fascinating because of its innovative applications that certainly represent the continuous advancement of modern technology nowadays.

As a part of my internship, me and my fellow interns attended an Amazon Web Services (AWS) study group hosted by AWSUG.PH. The study group is a three-day session conducted every Sunday where mentors, who are AWS certified, taught us about the fundamentals of AWS to help us pass the AWS Certified Cloud Practitioner certification exam. As a part of it, we were given plenty of study resources as well as laboratory activities for our self-paced learning. The study group made me gain knowledge regarding services provided by AWS such as EC2, RDS, S3, and many more.

I was so eager to be cloud certified hence I studied a lot to build up some confidence before taking the certification exam. For efficient learning, I allotted 3 to 5 study hours a day. I disciplined myself to study bits by bits of information and rest whenever I feel so. Through this, I enjoyed learning without feeling exhausted and overwhelmed with new things I discovered each day. When I assessed myself that I was ready enough, I decided to take my first certification exam. I booked an appointment at a testing center for the CLF-C01 - AWS Certified Cloud Practitioner exam. It was October 22, 2021, when I took the exam. Fortunately, the hard work paid off! I passed the exam and received my certificate and digital badge.

![Me with my certificate and digital badge](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5gchgvab9xf83jt4ept2.png)

I truly appreciate the help of AWSUG.PH and ULAP.org. I would like to thank Ms. Michelle Tabirao and Ms. Marilag Dimatulac, the ULAP.org founders, as well as Mr. Raphael Quisumbing and the mentors from AWSUG.PH. Especially, I also like to thank my parents who also supported me in this cloud computing journey.

My cloud computing journey is a blast. Being an AWS Certified Cloud Practitioner is not the end of it, yet it is the beginning as I continue to take more steps in this journey. May this brief story of mine inspire people, especially students, who are planning to start their cloud computing journey. Cloud is fun!
A Good Use for global .gitignore
Tags: git
Published: 2022-01-30 14:50:42

---
canonical_url: https://waylonwalker.com/til/global-gitignore-considered-useful/
published: true
tags:
- git
title: A Good Use for global .gitignore
---

I've never found a great use for a global `.gitignore` file.  Mostly I fear that by adding a lot of the common things like `.pyc` files it will be missing from the project and inevitably be committed to the project by someone else.

## Personal Tools

Within the past year I have added some tools to my personal setup that are not required to run the project, but works really well with my setup.  They are
`direnv` and `pyflyby`.  Since these both support project level configuration,
are less common, and not in most  `.gitignore` templates they make for great candidates to add to a global `.gitignore` file.

## create the config

Like any `.gitignore` it supports gits wildignore syntax.  I made a
`~/dotfiles/git/.global_gitignore` file, and added the following to it.

```bash
.envrc
.pyflyby
```

Once I had this file, I stowed it into `~/.global_gitignore`.

``` bash
cd ~/dotfiles/
stow git
```

> Always stow your dotfiles, don't set yourself up for wondering why your next
> machine is not working right.

## stow note

Note, the reason that it is a `~/.global_gitignore` and not a `~/.gitignore` is that I was unable to stow a `.gitignore file`.  They must be ignored by default, and I was unable to figure out how to turn it back on.

## set the config

Next run this command to add the `~/.global_gitignore` to your gitignore as a global excludesfile.

```bash
git config --global core.excludesfile ~/.global_gitignore
```

## commit it

Once you have done this you should have both your `~/dotfiles/git/.gitconfig` and `~/dotfiles/.global_gitignore` ready to commit.

```bash
cd ~/dotfiles

git add git/.global_gitignore
git add git/.gitconfig

git commit -m "add global_gitignore"
```

## You didn't stow your .gitconfig

_the shame!_

No worries, lets get it into your dotfiles repo and stow it.

```bash
cd ~/dotfiles

# if you don't have a git directory make it.
mkdir git mv ~/.gitconfig ~/devtainer/git
# now use stow to symlink it back to where it was
# so git works as expected.
stow git
```

## You don't have a dotfiles directory

_double shame 😲_

If you don't already have a dotfiles directory you should.  It is important for it to be in your home directory for stow to work properly, if you really don't want it there, look up how to configure stow to account for this.

```bash
# make a dotfiles directory and go there
mkdir ~/dotfiles cd ~/dotfiles

# make it a git repo
git init

# if you dont have a git directory make it.

mkdir git 
mv ~/.gitconfig ~/devtainer/git
# now use stow to symlink it back to where it was
# so git works as expected.
stow git
```
Seeking for React Custom template development process suggestion
Tags: react
Published: 2022-01-30 15:00:06

Hi, I am new in React.  

I want to build my upcoming project with React js. I already have XD prototype for the UI. 

Usually I always convert the XD prototype to html-css template, then implement the html-css template in frontend/backend  technology (e.g. laravel blade, vue.js, angular). But in this case, I am bit worried about my usual process. I heard react developers doesn't create the initial html-css template, they instantly make the template while working in the react project.  

So, should I follow the instant template creating process or stay with my usual? 

Also, should I use any react boilerplate or build from scratch?

Thanks in advance.
How to rename git branch?
Tags: git, webdev, codenewbie, beginners
Published: 2022-01-30 14:53:04

Made a small mistake while naming your git branch, don't panic this blog post will go through all the possibilities for renaming the git branch on local and remote.

**_Git branch can be renamed with a simple command "git branch -m <new-name>", this will rename your current git branch name. Once the branch is renamed on local you can push the new branch to remote and delete the old git branch on the remote._**

Now let's go through some detail on why and how to rename a git branch on local and remote.

## Why you might want to rename the git branch name?
Before going into details of how to rename local and remote git branches, let's see the reason why you might want to do it:
- You might want to rename your git branch if the branch name does not match your project branch naming standards.
- You might have the wrong branch name or a wrong ticket number in your branch name.
- Sometimes you might make a typo mistake while naming your branch and want to make it perfect by renaming it.

## How to rename the local git branch?
Now let's see how to rename a git branch on local with these steps:
1. The first step to rename a branch is to checkout the branch you might want to rename.
```
$ git checkout <old-name>
```
2. Now you can run the "git branch" command with -m and the new branch name
```
$ git branch -m <new-name>
```
3. To check if the branch is renamed correctly you can run the "git branch" or "git status" command to check your current branch
```
$ git branch
```
```
$ git status
On branch new-name
nothing to commit, working tree clean
```

If your old git branch was only on your local and not pushed to remote then you can stop here.

But if you have the wrong branch name on remote as well then continue reading.

## How to rename remote git branch?
In the previous stage, we rename the git branch on local and now we will follow these steps to update the branch name on remote as well.

1. Once the branch is renamed on local, run the below command to push the renamed branch to remote
```
$ git push origin -u <new-name>
```
2. Pushing the branch to remote with the new name will now delete the old branch on the remote. You need to run the below command to delete the remote branch with the old name.
```
$ git push origin --delete <old-name>
```

## Conclusion
Okay, now we know that there is no need to panic if you made a mistake while naming your git branch.

We have seen why might need to rename your git branch, how to rename a branch on local, and then how to push it to the remote repository if required.
 
And always remember to remove the old git branch from the remote to make sure no one uses it.

Leave a comment if you need to know more about renaming your git branch and do check out our blog post on [basic git commands](https://www.novicedev.com/blog/16-basic-commands-get-started-git) you should know.

Original post: [https://www.novicedev.com/blog/rename-git-branch](https://www.novicedev.com/blog/rename-git-branch)