teleren/devto huggingface dataset:
Recovering a Lost Keystore File for Android App Signing
Tags: mobile, android, reactnative, programming
Published: 2023-02-06 02:17:17

Losing your keystore file can be a nightmare for any mobile developer. That's exactly what happened to me when I deleted my React Native project from my Mac and cloned it back from GitHub. To my horror, the `my-upload-key.keystore` file, which I used to sign and publish my app on the play store, was missing. I tried generating a new one, but the play store rejected it, saying it didn't match the previous build key. I was stuck and didn't know what to do next.

I had a few options to consider, but I couldn't create a new `.keystore` file as that would take too much time and I didn't have a backup 🤦‍♂️. My last option was to find a way to restore my `.keystore` file. After a lot of searching and grinding, I discovered that I had been keeping a `.jks` file somewhere in my mac 😅, and I found out that it could be used to restore the `.keystore` file.

Converting a `.jks` file to `.keystore` is a straightforward process that can be done using the `keytool` command in the terminal or command line. First, navigate to the folder where the `.jks` file is located using the `cd` command. Then, run the keytool command with the necessary arguments to convert the `.jks` file to a `.keystore` file.

```
keytool -importkeystore -srckeystore upload-keystore.jks -destkeystore my-upload-key.keystore -srcstoretype JKS -deststoretype PKCS12

```

Note that, in this command, you need to replace "upload-keystore.jks" with the name of your `.jks` file, and "my-upload-key.keystore" with the desired name of your new `.keystore file`. The command will prompt you to enter the password for the `.jks` file, and then it will generate the new `.keystore` file. If you don't know the password and the name you can view it from your `android/gradle.properties` file. This is because when you first set up your React Native project you must have generated it. It will look something like this:

```
MYAPP_UPLOAD_STORE_FILE=my-upload-key.keystore
MYAPP_UPLOAD_KEY_ALIAS=my-key-alias
MYAPP_UPLOAD_STORE_PASSWORD=*****
MYAPP_UPLOAD_KEY_PASSWORD=*****
```

After generating the new `.keystore` file, I was able to successfully build my app and publish it on the Google Play Store 🎉.

In conclusion, if you ever face a similar situation, don't panic. Instead, check if you have any `.jks` files that could be used to restore your `.keystore` file. This simple solution saved me a lot of time and hassle, and I hope it helps you too!
7 great libraries for React
Tags: npm, react, javascript, webdev
Published: 2023-02-06 01:51:50

## 1: [usehooks-ts](https://usehooks-ts.com)

usehooks-ts is a great React Hook library that has saved me countless times. It's only 4.12kB minzipped.

`npm i usehooks-ts`

## 2: [Mantine](https://mantine.dev)
Mantine is a fully featured React component library - it saves time for designing/prototyping your UI.

## 3: [SWR](https://swr.vercel.app)

SWR (stale–while–revalidate) is a data fetching library. It’s hook–based, only 4.2kB minzipped, and developed by Vercel.

`npm i swr`

## 4: [Final Form](https://final-form.org/react)

Only 8.9kB minzipped, Final Form is the best way to build forms in react.

`npm i final-form react-final-form

## 5: [TanStack React](https://tanstack.com/)

TanStack React offers several versatile options for Charts, Tables, Routing, Data Querying, and more.

## 6: [Expo](https://expo.dev/)

Build Cross-platform mobile apps with react

## 7: [Remotion](https://remotion.dev)

Generate videos programmatically with React.

Thanks for reading!
Fetch linkedin data user easily with linkedin api & python
Tags: python
Published: 2023-02-06 01:37:04

In this article i will show to you how fetch a linkedin user's profile an anything related to data linkedin user with Linkedin API and Python.

So let's go 😄

## Setup

Before start in coding we must install the depedency and other tool, there are is.

- Python >= 3.6
- pip3

If you have done with both of tool next we can install the package with this command.

```
pip3 install linkedin-api~=2.0.0a
```

So the library was succesfully installed and now we can use them.

## Add package and credentials

First we must fill the credentials account for login, and dont remember to import the package into our python file.

```python
from linkedin_api import Linkedin

linkedin = Linkedin("youremaillinkedin", "yourpasslinkedin")

```

Now variable linkedin will become to object that can we use for any action with in.

## Uses

So lets with simple example.

### Get all user's information

```py
from linkedin_api import Linkedin

linkedin = Linkedin("youremail", "yourpassword")
profile = linkedin.get_profile("billy-g")

print(profile)
```

### Get only particular item

```py
from linkedin_api import Linkedin

linkedin = Linkedin("youremail", "yourpassword")
profile = linkedin.get_profile("billy-g")

print(profile["summary"])
print(profile["firstName"])
```

### Get more user linkedin data and import to csv

```py
import csv
from linkedin_api import Linkedin

# field header for csv
field_names = ['No', 'Name', 'Email', 'Contact','Address']

dataUsers = []

# users linkedin
# add your linkedin user that want you scrape here
usersLinkedin = ["aulina-indah","muhammad-ichsanul-fadhil"]

# increment number
no = 0

# do scrape
linkedin = Linkedin("ich***l67@gmail.com", "***")

for user in usersLinkedin:
    no += 1

    profile = linkedin.get_profile(user)
    profileContact = linkedin.get_profile_contact_info(user)

    userTemp = {
        'No': no,
        'Name': profile['firstName'] + ' ' + profile['lastName'],
        'Email': profileContact['email_address'],
        'Contact' : profileContact['phone_numbers'][0]['number']
        'Address' : profile['geoLocationName']
    }

    dataUsers.append(userTemp)

with open('linkedin.csv', 'w', newline='') as csvfile:
	writer = csv.DictWriter(csvfile, fieldnames = field_names)
	writer.writeheader()
	writer.writerows(dataUsers)
```

and more.....

You can find any more api at [https://linkedin-api.readthedocs.io/en/latest/api.html](https://linkedin-api.readthedocs.io/en/latest/api.html)

Thank you 😉
How to create apps for Microsoft Teams
Tags: webdev, javascript, beginners, course
Published: 2023-02-06 00:18:18

As Microsoft Teams becomes increasingly popular as a collaboration platform, demand for developers who can build apps for Teams has skyrocketed. Learning how to build apps for Teams can open up new career opportunities for you as a developer.

If you are looking for a free beginner course to learn how to build apps for Teams, look no further. We have a new [learning path] (aka.ms/learn/teamstoolkit) which will take you on a journey to build apps for Teams.

[Teams Toolkit] (https://marketplace.visualstudio.com/items?itemName=TeamsDevApp.ms-teams-vscode-extension), an extension for Visual Studio Code, will be used in the course, to help you create, test, and deploy Microsoft Teams apps with ease.

![ Teams Toolkit doodle showing the features like develop app in VS Code, local debug, provision etc] (https://dev-to-uploads.s3.amazonaws.com/uploads/articles/aicx2le45qm05bl31n99.png)

So, what are you waiting for? Go to [aka.ms/learn/teamstoolkit](aka.ms/learn/teamstoolkit) to take the course.

📖 [Read more about the course here] (https://devblogs.microsoft.com/microsoft365dev/learn-how-to-develop-apps-for-microsoft-teams-using-teams-toolkit-in-visual-studio-code/)
👀[Watch our video to get an overview of the course] (https://www.youtube.com/watch?v=vzmpJKMBOKk0)
How To Disable Buttons In Unity
Tags: unity3d, gamedev
Published: 2024-03-02 22:00:29

---
title: How To Disable Buttons In Unity
published: true
date: 2023-02-06 00:00:00 UTC
tags: unity3d, gamedev
canonical_url: https://www.ankursheel.com/blog/disable-buttons-unity
---

When working with Unity UI, there will be times when you will need to disable a button. Unity provides three ways to disable a UI Button, each of which can be used depending on the desired user experience.

## Using enabled property

The `enabled` property will make the button non-clickable, but it will not use the disabled colour.

```
testButton.enabled = false;

```

You will rarely want to use `enabled` as it results in a confusing user experience.

## Using interactable property

The `interactable` property will make the button non-clickable and will set the disabled colour (which is grey by default).

```
testButton.interactable = false;

```

In most cases, this is the option to use.

## Using GameObject.SetActive

`gameObject.SetActive` will deactivate the button and hide it from the user.

```
testButton.gameObject.SetActive(false);

```

This is an excellent option if you want to change what button is showing based on some conditions.

## Conclusion

Using these methods, you can customize how the user will interact with the UI Button. It is crucial to understand how each of these methods works so that you can choose the best one for your project.
Learning some JavaScript
Tags: javascript
Published: 2023-02-05 23:15:57

I learned a little about funcitons today. 

Arrow functions "=>" 

const varName = parameter => {

   return ``;


}

if more than one parameter 

const varName = (parameter1, parameter2) => {

   return ``;


}

implicit return syntax is as follows

const varName = parameter1 => 

 ``;
Soft skills in the world of code
Tags: webdev, beginners, career, discuss
Published: 2023-02-05 23:04:53

We devs are notoriously known for our lack of soft skills and when you say to someone that you're a software engineer, or web developer or whatever... they often picture you like this guy:

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

You may even fall victim to the office douche bag from marketing who makes sly remarks about you and your fellow devs each and every day, been there, got the t shirt. 

But the reality of the matter is this, we are so often caught up in our love for code and building things, that we often neglect one key skill that can contribute to the growth of our career's, whether you are a freelancer, an employee, or maybe you're building a startup, the message is the same, soft skills, whether you like it or not, will be the thing that enables you to succeed, not necessarily your coding ability. 

Here's the thing, people buy into people, your ability to work cohesively as a team-mate, pitch your idea or communicate with a client will ultimately define your success. You can be an average developer but have great soft skills and achieve more, because you allow other's to participate in your journey. 

So what soft skills do you think we lack? And do you agree with what I'm saying? If not, why not? I'm intrigued to hear your thoughts! :) 

Tom
Download Let Us C 18th Edition PDF and EPUB
Tags: tutorial, c, beginners
Published: 2023-02-05 22:53:47

![Let Us C 18th Edition PDF](https://m.media-amazon.com/images/I/715-zai-QtL.jpg)

# Let Us C 18th Edition Book PDF
Author: Yashavant Kanetkar

Let Us C is a popular computer programming book written by Yashavant Kanetkar. It was first published in the year 2000 and since then, has become a staple resource for students and professionals who are looking to learn the basics of the C programming language.

The book is written in a simple and concise manner, making it easy for readers to understand and follow the concepts presented. It starts with the basics of programming and covers all the fundamental concepts of the C language, such as data types, operators, control structures, functions, arrays, pointers, and structures. The book also covers advanced topics such as file handling, dynamic memory allocation, and programming in the Linux environment.

One of the key strengths of Let Us C is its focus on practical programming exercises. Throughout the book, the author provides numerous examples and exercises to help readers reinforce their understanding of the concepts covered. The book also includes a large number of solved problems and programs, making it a great resource for those who are looking to practice and improve their programming skills.

The author's writing style is engaging and approachable, making the book a great resource for both beginner and intermediate programmers. The book is designed to be used as a self-study guide, but it can also be used as a supplementary resource in a formal computer science course.

Let Us C is considered a classic in the world of programming, and it is widely regarded as one of the best books for learning the C programming language. It is an essential resource for anyone who is looking to gain a solid foundation in programming and develop a strong understanding of the C language.

# [Download Let Us C 18th Edition PDF PDF] (https://upfiles.com/KPDzMuX)
How to install Terraform on Linux (Ubuntu) and Link AWS User Credentials to it.
Tags: aws, terraform
Published: 2023-02-05 22:47:41

In this tutorial you would be needing an AWS console account and a Linux machine.

1.) Run the command below in a bash terminal to update the Linux software repository.

```
sudo apt update
```

2.) The next step after updating the Linux software repository is to install the following packages:
- gnupg
- software-properties-common

```
sudo apt-get install -y gnupg software-properties-common

```

3.) Download hashicorp signing key to a new keyring. 

```
wget -O- https://apt.releases.hashicorp.com/gpg | gpg --dearmor | sudo tee /usr/share/keyrings/hashicorp-archive-keyring.gpg

```

4.) Verify the key's fingerprint

```
gpg --no-default-keyring --keyring /usr/share/keyrings/hashicorp-archive-keyring.gpg --fingerprint
```
5.) Add hashicop repository to your machine list of repositories allowing you to have access to softwares in the hashicorp online repository. 

```
echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hashicorp.list
```
6.) Install terraform
```
sudo apt update && sudo apt install terraform

```
7.) Verify if terraform is installed

```
terraform --help
```

8.) Login to your AWS user account
In this tutorial I am logged into a IAM user with admin permissions, I strongly recommend doing the same thing to avoid creating resources with the root account. After login, go to the IAM Service on the console, click on the security credentials and generate new access keys

![User credetials](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fplosejtgs7kf2nbm8ur.png)

Finally we with add the user credentials to the .bashrc file allowing the variables to be available globally on the machine 
or we provide the user credentials for each project

9.) Run `terraform init`

## Conclusion
Now that you have learnt how to link AWS user account Terrafrom you are ready to create resources and infrastructures using Terraform. You should however note that when linking AWS user account to Terraform locally for each project you should ensure not to push your user credentials to an online public website like GitHub.
OSD700 - Eventful week contributing to Starchart
Tags: opensource, typescript, beginners, starchart
Published: 2023-02-05 22:35:29

Last week was all about getting started; this week, we were tasked with building on top of the Blues Stack template we set up last week. 

This week was quite eventful, and we broke things, but we also managed to fix things as a team. There was a lot of collaboration and active participation, which needs to be improved in some of the other courses I have previously taken. 

There were moments when I felt stuck or made a mistake that I thought was irreversible, but luckily the team I am working with was there to steer me in the right direction.

[My first task](https://github.com/Seneca-CDOT/starchart/pull/93) with porting over middleware used by Satellite and adding it to Remix's server. Remix's Blues Stack, by default, uses Morgan, but we wanted to use Pino instead. However, Pino seems to cause a problem, so David has to switch to using Winston.

[My second task](https://github.com/Seneca-CDOT/starchart/pull/125) was to configure Nodemailer to send email notifications in the future. We have set up the function responsible for sending emails, but there's no way of knowing if it will work. We may have to make some adjustments to the current Nodemailer configuration. Next week, I aim to implement functionality to ensure we can successfully send test email notifications. 

Finally, [setting up Dependabot](https://github.com/Seneca-CDOT/starchart/pull/44) was fun, but some of us got bothered by it, while others remained unaffected. One of the significant issues with the Dependabot setup was that it would raise PRs for major version updates. We do not want Dependabot to major version updates, as, according to David, it's risky and should be handled manually. Gladly, I resolved that issue by [restricting Dependabot to minor and patch-level version](https://github.com/Seneca-CDOT/starchart/pull/133) updates.

This week I want to ensure we can [send the test notifications successfully](https://github.com/Seneca-CDOT/starchart/issues/126). Also, I want to [enhance Dependabot's](https://github.com/Seneca-CDOT/starchart/issues/135) current configuration. I am open to helping in other areas of development if needed.
Convert CloudFormation to Terraform in two seconds
Published: 2023-02-05 22:34:57

---
title: Convert CloudFormation to Terraform in two seconds
published: true
description: 
tags: 
# cover_image: https://direct_url_to_image.jpg
# Use a ratio of 100:42 for best results.
# published_at: 2023-02-01 02:30 +0000
---
.

Last time I converted between [AWS CloudFormation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/Welcome.html) and Terraform, I cheated. I enabled [Copilot](https://github.com/features/copilot), told it to convert the CFN script to Terraform, and it worked!

Since AI always creates the *form* of the answer but not necessarily the *correct* answer, you have to very very carefully examine the output. But for me it took 2 seconds to convert, then 30 minutes to double-check, vs a couple hours tediously writing Terraform.
Moving from Avast Passwords to NordPass
Tags: python, programming, tutorial
Published: 2023-02-05 22:31:39

## Intro
For a while, I had wanted to change my password manager from Avast Passwords to another one. I finally decided to go with NordPass. Playing around with the application, I was glad to see that NordPass could import passwords from web browsers and other password managers. However, there was a bummer. NordPass cannot directly import passwords from Avast Passwords and it also does not support JSON, which is what Avast Passwords exports as.

So I started thinking, how on earth would I add 170+ passwords into NordPass manually? I then began to think of how I could do this.

## Python Pandas to the rescue 🚀
Suddenly, my problem-solving acumen as a software developer kicked in and I knew I could write a Python script using [pandas](https://pandas.pydata.org/) to transform from the JSON provided by Avast to the NordPass CSV format.

Here is the content of NordPass' CSV Template:
```
name,url,username,password,note,cardholdername,cardnumber,cvc,expirydate,zipcode,folder,full_name,phone_number,email,address1,address2,city,country,state
```
And here is how the JSON file exported by Avast Passwords looks like.

![Avast Passwords JSON export file](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xd7kii96q3wyr8zf83vx.png)

After looking at the structure of the JSON file, I then put only the logins into a new JSON file that contained a list of dictionaries containing each password.

The next step was writing the actual Python code, which is quite unsophisticated.

```python
import pandas as pd

# Import password data from Avast export
passwords_df = pd.read_json('avast_passwords_extract.json')
passwords_df.head()

# Rename column names of Avast Passwords JSON to fit Nordpass template
passwords_df = passwords_df.rename(columns={
    'custName': 'name', 
    'url': 'url',
    'loginName': 'username',
    'pwd': 'password',    
})

# Delete unused columns
del passwords_df['color']
del passwords_df['pwdChange']

passwords_df.head()

passwords_df.to_csv('nordpass_passwords.csv')
```

## Moment of Truth: Importing into NordPass 🤞
So let's test this.


![NordPass Import Passdwords](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4tm7nb4e6npjzidioeo3.png)

So it works perfectly!
I just wanted to show how that programming requires problem-solving skills and programming in turn helps develop the same! I hope you enjoyed reading this.


_Cover image by <a href="https://www.freepik.com/free-photo/flat-lay-hands-holding-notebook-with-password-laptop_8725542.htm#query=password&position=0&from_view=search&track=sph">Freepik</a>_
CSS Art: Nintendo Switch
Tags: css, art, webdev, showdev
Published: 2023-02-05 22:22:23

---
title: CSS Art: Nintendo Switch
published: true
description: Live-coding this iconic console with HTML and CSS
tags: css,art,webdev,showdev
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pkwg0rma5pwrjly5n91p.jpg
canonical_url: https://alvaromontoro.com/blog/68027/css-art-nintendo-switch
---

This weekend, I streamed while live coding/drawing a Nintendo Switch with HTML and CSS. The drawing is:

- Responsive: resize the window to see it change
- Semantic: sections, the buttons are buttons
- Customizable: CSS variables to change the JoyCon colors
- Realistic: at least that was the goal 😅

Here's the [demo on CodePen](https://codepen.io/alvaromontoro/full/LYBqdaR) (the drawing and the original photograph):

{% codepen https://codepen.io/alvaromontoro/pen/LYBqdaR %}

---

The process took around 4 hours (broken into different sessions that I will call "_my kids are finally sleeping_" and "_my kids are not awake yet_") that I put together and sped up on this video:

{% youtube 7IrOlF25_F0 %}

---

Later, I did another version. This time I plugged in a [library I created to handle the Gamepad API](https://github.com/alvaromontoro/gamecontroller.js), and I tried connecting the JoyCon to the computer... it works :)

If you have a Nintendo Switch, try plugging the left controller into your computer via Bluetooth, then [head to this demo](https://codepen.io/alvaromontoro/full/gOjERKW) (only some of the buttons will work):

{% codepen https://codepen.io/alvaromontoro/pen/gOjERKW %}
How to cherry-pick from separate repos with separate paths (with history)
Published: 2023-02-05 22:09:47

If you ever wanted to extract parts of code from one repository to another one, but you also wanted to keep the history of commits for those parts, there is a way.

**You can use**

`git log --pretty=email --patch-with-stat --reverse --full-index --binary -- <file_path | folder_path> > ~/toggle.patch`

**Explained:**
`--pretty=email` formats the output to show the hash, the date, the author, author date and subject + the commit message.

`--patch-with-stat` generates a [diffstat](https://linux.die.net/man/1/diffstat) for the file/folder

`--reverse` outputs the commits in reverse order (so that they can be applied in the correct order in the other repository).

`--full-index` this shows the full index of the commit when outputing the diffs (instead of showing just the first characters).

`--binary` outputs the diff in binary so that git-apply can use it. 

---

This will generate a patch file with the differences that were done on the file or folder that you pass to it (and will keep commits history as well).

After that, you must mass edit the generated `toggle.patch` file by changing the paths in diffs to match the new paths in the new repo. 

After you changed the patch, you can **apply it in your new repo by using**

`git am --committer-date-is-author-date < ~/toggle.patch`.

**Explained:**
`--commiter-date-is-author-date` allows the user to lie about the committer date by using the same value as the author date.

---

This way, you keep all of the history for this extracted file/folder (and you keep the dates as well when looking over the file history).

Hope this helps.