teleren/devto huggingface dataset:
How do you measure the success of your developer-facing activities?
Tags: devrel, developermarketing, developerelations, survey
Published: 2022-09-29 08:08:46

The Developer Program Leaders survey focuses on understanding “what makes a developer program successful” as viewed from the perspective of professionals in the field.

This survey brings you and the members of the DevRelX Community insights on how DevRel and Developer Marketing professionals:

- Run their developer programs
- Prioritise their work 
- Segment their audience 
- Measure success
- Justify the value of their developer program to senior management and more!
- If you are a DevRel, Developer Marketing, or Product Manager, your input is precious.

You may also think of it as an open-source initiative to better understand how the world understands the value of developer marketing and relations. 

In the survey, you will find questions such as:

> What metrics do you use to measure the success and ROI of your developer program? Do you segment your audience?

These questions (and a few more) need your input. The latest wave of the Developer Program Leaders survey is now [live](https://survey.developernation.net/name/dpl9?utm_source=DPL9&utm_medium=Devto&utm_campaign=dpl9_survey). 

What you gain by responding:

- Full access to the findings in an interactive session supported by SlashData’s research analysts hosted within the DevRelX community
- A chance to win exclusive DevRelX swag
- You take part in a community effort to understand and improve how your peers work and set their strategy

**How long is the survey?** It is short. You’ll need ±8 minutes

Shape how the world understands the value of developer marketing and relations!  

Take this [short survey](https://survey.developernation.net/name/dpl9?utm_source=DPL9&utm_medium=Devto&utm_campaign=dpl9_survey).

The survey closes on November 14.
Dude, do the initial Git configuration
Tags: git, beginners, webdev, codenewbie
Published: 2022-09-29 07:41:06

## Intro
Hello, Let me tell you that I just restarted my work computer, why is this relevant? because I lost all my settings and it's time to configure them again. I imagine you got an idea with the title, we will see the initial git configurations, the ones I need to start working.

I hope this publication is useful to you, I am sure it will be useful for my future self.

## what is Git?
Git is a free and _open source distributed_ **version control system** designed to handle everything from small to very large projects with speed and efficiency. there is more software for version control, but git is the one I like to use.

## Initial Configuration


First of all, to start a new repository we can use the command

```
git init
```


Now let's set the user information (us).
```
git config --global user.email "your@email.com"
git config --global user.name "your_name"
```

To find where the settings are stored we can use the command.
```
git config --list --show-origin
```

Git works with branches, I'm sure you already know that, as I write this, the default name of the main branch is 'master'. By convention we could call it 'main', let's see how to change the name


```
git branch -m old_name new_name
```

to ensure that all projects start with the main branch name 'main'
```
git config --global init.defaultBranch main
```

## BONUS
For bonus we are going to connect our project to a repository in GITHUB. As a first step we are going to set the 'origin'

```
git remote add origin repository_URL
```
To verify that the URL was saved correctly
```
git remote -v
```

To fetch the latest version from the remote repository
```
git pull origin main
```
if there is an error for different versions we can add the flag '---allow-unrelated-histories'
```
git pull origin main --allow-unrelated-histories
```
Finally, to send our information to the remote repository we can do git push and save the changes from our local repository to GitHub
```
git push origin main
```
No Emojis on IntelliJ IDEs Terminals
Published: 2022-09-29 07:39:06


I find it pretty annoying IntelliJ IDEs does not support emojis on terminal yet.

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

There is an issue tracked for it:
https://youtrack.jetbrains.com/issue/IDEA-248010/Terminal-does-not-support-Emoji-Characters

Also, VSCode does support them, along with most Terminal apps.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/sxwfgr6uaom2erx10p1z.png)
Turkish Food Recipe Scraper
Tags: scrapper, php, dataset, laravel
Published: 2022-09-29 07:18:39

[Turkish Food Recipes](https://github.com/ilyasozkurt/turkish-food-recipes)

A scrapper allows you to scrape 20000+ Turkish food recipes and export them to JSON files.

## How to install and use Scrapper?

1. `git clone https://github.com/ilyasozkurt/turkish-food-recipes && cd turkish-food-recipes/scrapper`
2. `composer install`
3. `php artisan scrape:recipes --force-download`

The `--force-download` option downloads all sitemaps instead of reading from the cache.

## How to use the dataset?

After you run the command `php artisan scrape:recipes --force-download` you'll be able to see `/data/` directory at the root of the project. 

The dataset is in JSON format. 

Enjoy!
React news app 📰 with customized news feed recommendation!!✨
Tags: react, api, javascript, webdev
Published: 2022-09-29 07:16:46

This project is a simple React, API-based app which is best for beginners, If you are a beginner, this will be very helpful. It is built using react-context-api and also API integration. If you don't know the concept of basic Javascript API integration and react-context-api then please learn that before and after completing that Please continue with this project. If you are interested, read all conditions, and want to get into this, please look at the app's main features.

**Some of the main features of the app:**

Get customized news feeds according to your interest.

![Get customized news feeds according to your interest](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5p6c0jwi6rsjjbqv6gxa.png)

Get news according to the category selected.

![Get news according to the category selected](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kc61m838opr1w8v2rolp.png)

Consist of dark and light mode with unlimited customized themes.

![Consist of dark and light mode with unlimited customized themes](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1ak3y96lluzknuaccn9s.png)

Enjoy news in both grid and card view.
   
   - Card View.

![Card View](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bx2rstqjfb8fgnko1lfo.png)

   - Grid View.

![Grid View](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qj8ftpk3qp1azxpxu7a2.png)

Single page, fully responsive design with best user experience.

**You can get the source code from my github repo:**
[@github/anandpothraj/newshut](https://github.com/anandpothraj/newshut)

**Also the website is live and hosted on netlify:**
[@newshut/anand](https://anand-newshut.netlify.app/)

Please follow me to get such wonderful content❤️.

Thanks! Happy Coding......./>
Running medusa in docker
Tags: javascript, webdev, beginners, docker
Published: 2022-09-29 07:08:54

Now that we have medusa up and running, I wanted to move away from the default SQLite database as those are very limited.

The alternative would be Postgres, which medusa can efficiently work with.
However, I didn't want to set this up locally, as it can be a pain to manage.

Luckily, it's relatively easy to set up medusa in docker.
Even better, it kind of comes prepared for us!

Let's see how that works.

## Running medusa in docker

Once you installed the [medusa server project](https://daily-dev-tips.com/posts/setting-up-the-medusa-server/) you'll see that you have a `Dockerfile` and a `docker-compose.yml` file.

With those, we can spool up a running docker version of the medusa server.
This will spool up Redis, Postgres, and the server itself.

Run the following command:

```bash
docker-compose up --build
```

Once it's done, you should see the container with the part.

![Medusa docker images](https://cdn.hashnode.com/res/hashnode/image/upload/v1663606190231/OZ_QYSbcP.png)

This already would have run the migration, but you can always open up the specific server docker terminal and execute commands.

Sometimes you might want to connect to the database to see what's happening there.

To connect, use the following details:

- host: `127.0.0.1`
- user: `postgres`
- password: `postgres`
- database: `medusa-docker`
- port: `5432`

And once in you should see all the tables!

![Database connected medusa docker](https://cdn.hashnode.com/res/hashnode/image/upload/v1663606366162/VtN8KEUJu.png)

And that's it. Your actual server will be running on `localhost:9000` as you would expect, and you can do everything as before.

### Thank you for reading, and let's connect!

Thank you for reading my blog. Feel free to subscribe to my email newsletter and connect on [Facebook](https://www.facebook.com/DailyDevTipsBlog) or [Twitter](https://twitter.com/DailyDevTips1)
What Are the Tokens In JAVA
Tags: webdev, beginners, programming, java
Published: 2022-09-29 06:51:01

**What are the tokens in JAVA.**
**Tokens:-** Tokens are the smallest unit of programming language which helps the the programmer to create instructions

**Tokens are two types**
1- Keyword:- 
2- Identifier:-

**Keyword**:- 
      
1. compiler aware words are called keyword

2. Keyword have predefine meaning and cannot be altered by programmer's 

3. All Keywords are written low case.

**Identifier**:- Identifier are the names given by the programmer to the members of java such as class name, method name, variable name, interfaces name, packages etc.

There are certain rule to follow while naming the identifiers
if the rules are not followed we get complie time error(rules are checked by complier)

**Rules to name Identifier**
1- An Indentifire cannot start with number
e.g  **1Programm** ❌
     **Program1** ✅ 

2- Character spaces are not allowed while naming the identifiers
e.g **My First Program** ❌
    **MyFirstProgram** ✅

3- Special character are not allowed while naming the Identifiers other than '$' and '_'
e.g **$Programs** ✅
    **_Program**  ✅

4- Keyword cannot be used in Place of **Identifiers**
An Intro to Linux
Tags: linux, ubuntu
Published: 2022-09-29 06:39:25

## Users and Permissions
For each file, `ls <filename> -l` displays the permission of the file, something like `-rw-rw-r--`:
- the first char specifies the type of file: d for directory, - for file, l for link.
- every following 3 chars specify the permissions to 3 different groups respectively: **the file owner, the group and others**

**The purpose of having these 3 different tiers** for each file could be explained easily with an example:
You(t1) and your teammates(t3, t2) are working on a project, and you and your teammates and other random people are all using the same Linux machine in the school lab. You wanna give yourself the permission to read, write and execute the program "project.py", while giving your teammates the rights to read and execute but not modifying it, and you don't even allow others to look at your code. 
Then what you could do is to create a group named "team", putting t1, t2 and t3 all under this group, then do `chmod 750 project.py`

## Changing permissions
Only the file owner or the root user is able to change the permissions of a file. Three commands are used:
- `chmod <xxx>` changes the permissions of the file, where each x corresponds to the permissions to the file owner, group and others respectively. Note that the numbers are: r:4, w:2, x:1
- `chgrp <group_name> <file_name>` changes the group. Note that
`<group_name>` must be an existing group in /etc/group
- `chown`changes the owner of the file. I've never used it though.

## $PATH
This variable stores all the paths that are looked up when executing a command. For example, the command `ls` is stored under `/bin/`.
To inspect the vairable, do `echo $PATH`
To add something to the $PATH variable, do `PATH="${PATH}:<absolute_path>"`

## Inspecting files
`cat <filename>`: print the content of the file
`more <filename>`: display the file page by page. Press **space** for next page, press **q** for quit, press **Enter** for next line.
`head -<n> <filename>`: display the first n lines of the file
`tail -<n> <filename>`: display the last n lines of the file
Pure CSS Vercel Logo
Tags: codepen, css, html, webdev
Published: 2022-09-29 06:34:15

---
title: Pure CSS Vercel Logo
published: true
tags: codepen,css,html,webdev
---

{% codepen https://codepen.io/AsyrafHussin/pen/oNdEQxB %}

<p>Speed Code Video
<a href="https://twitter.com/asyrafhussin4/status/1575336036200161280" target="_blank">https://twitter.com/asyrafhussin4/status/1575336036200161280</a></p>
Bot detection evasive techniques for web scrapers
Tags: javascript, python, proxies, web
Published: 2022-09-29 06:28:40

Join more than 5,000 readers who have learned some of the biggest kept secrets of large scale web scraping - https://levelup.gitconnected.com/web-scraping-and-the-art-of-war-5-tools-that-will-help-your-bot-win-c2a3840d8b71
Azure DevOps pipelines shallow fetch =1 is now default
Tags: azure, devops, git, shallowfetch
Published: 2022-09-29 06:17:17

Pipeline doesn’t work? The old one, exactly the same, is working?
You came to the right place :)

> UPDATE 2023.01.27: You may also set `fetchDepth: 0` in your `checkout` step.
>
>The team responsible for the documentation has been very fast, and they updated [steps.checkout definition](https://learn.microsoft.com/en-us/azure/devops/pipelines/yaml-schema/steps-checkout?view=azure-pipelines#remarks) and [Build Azure Repos Git or TFS Git repositories](https://learn.microsoft.com/en-us/azure/devops/pipelines/repos/azure-repos-git?view=azure-devops&tabs=yaml#shallow-fetch) within two days from reporting this issue. If you come across any documentation articles that need this info, try reporting it =)

This may come as a surprise, and I imagine it will "break" many newly created pipelines. 
All of a sudden things that used to work, won't.

Newly created Azure DevOps pipelines have **shallow fetch** enabled by default, and the depth is set to **1**.

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

It's not documented, not even in [what's new](https://learn.microsoft.com/en-us/azure/devops/release-notes/docswhatsnew/) (although I asked for it to be mentioned so maybe by the time you are reading this, it's there).

You have two options now, if you want to change it. 
Either [fetchDepth](https://learn.microsoft.com/en-us/azure/devops/pipelines/yaml-schema/steps-checkout?view=azure-pipelines) in _checkout_ step, or disable shallow fetch on the pipeline level.

## Disable shallow fetch

1. Navigate to your pipeline and click **Edit**
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/f9m2i8ht2z7nreixv9fl.png)
2. Click the ... button and choose **Triggers**
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zmj6r6zxhh8l4np64fgk.png)
3. Switch to **YAML** tab and click on **Get sources**
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/x0wk1pg6qvgspnoxgjra.png)
4. Here it is, at the very bottom
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7rtv9jzasttxoh0s7zfg.png)
How To Generate PDF and Send Email In Laravel 8
Tags: laravel, laravel8, pdf, email
Published: 2022-09-29 06:13:56

In this article, we will see how to generate a pdf and send an email in laravel 8. 

For generating PDF files we will use the "laravel-dompdf" package also we will use "mailtrap" for email sending. 

dompdf creates a pdf file and also provides download file functionalities. it is very easy to generate pdf in laravel 8. 

Using this tutorial you can directly create an invoice pdf and send it to email in laravel 8.

So, let's see generate a pdf file and send mail in laravel 8.

```
Step 1: Install Laravel 8

Step 2: Install the dom-pdf package

Step 3: Set mail configuration

Step 4: Add Route

Step 5: Add Controller

Step 6: Create PDF View File
```
Setup Node on Debian ..and !Yarn
Tags: node, yarn
Published: 2022-09-20 13:51:28

[Overview](https://dev.to/chmich/setup-vite-svelte-inertia-stimulus-bootstrap-foundation-on-rails-7-overview-1bk1)

**Note**

Vite needs `Node` and its included `npm` and `npx`.

⚠️ **Yarn** Since 2.x, by default, deletes the node_modules folder, see [Stackoverflow](https://stackoverflow.com/questions/68735025/yarn-erased-my-node-modules-folder-every-time). For Vite it means that it breaks. Finally i decided for `npm`, removed all yarn and all folders and files it created on my projects.

## Production server

**remove all Nodes from root level**

Login on production server with root user and check that the output is «command not found». If there would be a stale smylink, the `-v` would also not work but different output

```
$ node -v
bash: node: command not found
$ npx -v
bash: npx: command not found
$ npm -v
bash: npm: command not found
$ yarn -v
bash: yarn: command not found
```

Check `/bin/`, `/sbin/`, `/usr/bin/`, `/usr/sbin/` for stale symlinks and check for `node_modules/` folder in `/bin/lib/`.

Check **sources** (`/etc/apt/sources.list`, `/etc/apt/sources.list.d/` for any nodes, and, if, remove them.

**Check on user level**

Login on the user where your app should run.

NVM is [recommended by npm](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm) and i am satisfied since years. Just updating Node version did'nt work for me, so i gone the hard way, removed the old, installed it  anew and then installed the current Node version.

```
`$ rm -rf ~/.nvm`
```

Like on root level, check that no nodes are there.

**Install Node**

Regarding to [GitHub/nvm#installation](https://github.com/nvm-sh/nvm#installing-and-updating), perform:

```
$ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
```

Logout, Login, and `nvm -v` should work.

```
$ nvm install node
```

**=>** `node -v`, `npm -v`, `npx -v` should print out the current versions.

**⚠️ Pitfall!**

In `~/.bashrc` there may be a piece of code like this:

```
# If not running interactively, don't do anything
case $- in
    *i*) ;;
      *) return;;
esac
```

If shell is running [interactive](https://www.geeksforgeeks.org/shell-scripting-interactive-and-non-interactive-shell/), which means you are not logged in by username and password ([login-shell](https://linuxhandbook.com/login-shell/)) the code execution ends there.

nvm needs a code piece like this, i have it also  in `~/.bashrc`

```
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"  # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"  # This loads nvm bash_completion
```

So, **make sure that its above the previous mentioned code block**. Otherwise, if the app is running, it runs shell as interactive and nvm is not working, while you, by ssh on the server, think its working.
XAMPP MySQL Shutdown Unexpectedly
Tags: database, errors, mysql, xampp
Published: 2022-09-29 05:48:05

Artikel kali ini, kita akan sedikit membahas mengenai penanganan error pada XAMPP MySQL dengan pesan error shutdown unexpectedly. Developer yang menggunakan XAMPP untuk melakukan running database secara local, cepat atau lambat memiliki potensi error semacam ini pada XAMPP MySQL nya. Sudah banyak artikel yang membahas mengenai permasalahan ini, namun terkadang cara yang menjadi rekomendasi belum efektif maupun efisien. Bahkan, mungkin dapat menimbulkan error lain yang kadang tidak tersadari.

Pada kesempatan kali ini, kita akan mencoba melakukan penanganan error tersebut dengan cara yang cukup aman untuk dilakukan untuk  XAMPP MySQL shutdown unexpectedly, tanpa perlu khawatir akan terjadi penurunan stabilitas fungsi XAMPP MySQL itu sendiri. Selanjutnya kita akan melakukan penanganan langkah demi langkah berikut ini.

## Error Handling
Error yang terjadi pada artikel ini kurang lebih memiliki tampilan seperti di bawah ini pada XAMPP:

![Database XAMPP error](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8m4m5jormrncwiarkaec.png)

## Pemecahan Masalah

1. Langkah pertama, kita masuk ke direktori XAMPP kita, untuk yang melakukan instalasi normal, biasa terdapat pada drive C:\xampp. Pada direktori tersebut, kita masuk ke direktori mysql.

2. Pada direktori mysql, lakukan rename pada foler data dengan nama data_backup. Langkah ini untuk melakukan backup data untuk menghindari kesalahan yang tidak diinginkan. Kita dapat memberikan nama dengan nama yang lain, sesuai dengan keinginan kita.

3. Langkah selanjutnya, kita copy folder backup, dengan nama data. Langkah ini untuk membuat folder data baru dengan menggunakan data-data yang ada di folder backup.

4. Selanjutnya, kita copy database yang ada di folder data_backup, ke dalam folder data. Database yang perlu dicopy adalah semua folder yang ada pada data_backup, selain folder mysql, performance_schema, phpmyadmin, test. Sehingga hanya database yang benar-benar kita buat saja yang kita pindahkan.

5. Langkah terakhir, kita copy file ibdata1 yang ada di folder data_backup, kedalam folder data, lakukan replace file.

Sampai sini, seharusnya XAMPP MySQL kita sudah dapat berjalan dengan benar kembali, dan tidak terjadi error. Lakukan running kembali pada XAMPP MySQL kita, dan perhatikan bahwa error sudah tertangani dengan baik.

![Database XAMPP berhasil diperbaiki](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/w1r82oiauqhae25qmmf4.png)

Apabila semua berjalan dengan benar, maka kurang lebih tampilan XAMPP kita saat running MySQL, seperti gambar di atas.

---

Daftar Referensi:
https://stackoverflow.com/a/61859561/16632789