teleren/devto huggingface dataset:
Setup your NGINX proxy manager
Published: 2023-06-22 13:47:27




Hi Folks,
If you guys are looking to do self hosting and are considering between Traefik and NGINX proxy manager, look no further.
NGINX offers a good user experience to setup your very own self hosting environment.
This guide will teach you how to setup NGINX as your proxy manager.


First step
Installation of docker on your Linux environment.
[Docker Install documentation]

!["dockerimage"](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fzt73lbye6yc09hwu4x4.png)

(https://docs.docker.com/get-docker/)
[Docker-Compose Install documentation](https://docs.docker.com/compose/install/)

Depending on your OS, your download may vary, Redh8 does not support docker anymore, I would recommend [Kali ](https://www.kali.org/docs/containers/installing-docker-on-kali/)OS as I am using it.
Verify that you have docker and docker-compose installed successfully.



```
version: '3'
services:
  nginx:
    container_name: nginx
    image: 'jc21/nginx-proxy-manager:latest'
    restart: always
    ports:
      - '80:80'
      - '81:81'
      - '443:443'
    volumes:
      - ./config.json:/app/config/production.json
      - ./data:/data
      - ./letsencrypt:/etc/letsencrypt
  db:
    image: 'yobasystems/alpine-mariadb:latest'
    environment:
      MYSQL_ROOT_PASSWORD: 'npm'
      MYSQL_DATABASE: 'npm'
      MYSQL_USER: 'npm'
      MYSQL_PASSWORD: 'npm'
    volumes:
      - ./data/mysql:/var/lib/mysql
```
Create a docker-compose.yml file in your directory, run docker-compose up -d


!["router"](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ayks9ez7ed2ertevnabv.png)

Setup your router to have a Port Forwarding.
In this case, I censored out my IP address and the ports that are exposed, you will require to expose your port to the public. Also get to know what is your public IP from https://whatismyipaddress.com/ and access via your exposed port. 


!["Beforelogin"](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2dp9izugyyubeq3vzhqy.png)


For your first login, please use the below credentials.
You will be prompt to create a user thereafter.
`admin@example.com
changeme
`

!["getssl"](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/sowtvgqigdhjl26du3eh.png)
Lastly, setup your domain to be signed with an SSL cert



Pls note, you will have to purchase a domain to get an SSL on your website.
Happy self-hosting~
Creating custom integrations with Blackfire PHP and Python SDKs
Tags: opensource, php, tutorial, webdev
Published: 2023-06-22 13:45:41

**Shoutout to the makers and the explorers—let’s build something new together today.**😎

Developers are continually on the lookout for innovative methods to enhance their applications’ performance and ensure long-term success. As applications become more complex, they may rely on cutting-edge technologies or intricate scaffolding, necessitating custom tools to effectively monitor resource consumption. 

Blackfire SDKs are designed to address these challenges, providing a comprehensive solution that empowers developers to create tailored solutions for their specific needs. By building custom integrations with Blackfire SDKs, developers can confidently fulfill their observability needs and control resource consumption even for the most complex environments.

Explore how to get started with Blackfire PHP and Python SDKs in our latest article 👇 

## **[Explore, integrate, and innovate: creating custom integrations with Blackfire PHP and Python SDKs](https://blog.blackfire.io/explore-integrate-and-innovate-creating-custom-integrations-with-blackfire-php-and-python-sdks.html?utm_source=devto&utm_medium=social&utm_campaign=blackfireblog)**
iOS 17: Apple goes all-in with passkeys
Tags: webdev, passwordles, ios, authentication
Published: 2023-06-22 13:41:09

In its latest iOS 17 update, Apple has introduced groundbreaking features for passkeys, specifically designed to meet the demands of enterprise environments. These remarkable advancements not only bolster security measures but also provide users with a seamless and intuitive login experience. By setting a new standard for passkey authentication, Apple has raised the bar and placed pressure on competitors like Microsoft to keep pace with the latest developments.

1. **Managed Apple IDs with iCloud Keychain:** Organizations can now provide passkeys while maintaining control over account management using managed Apple IDs, ensuring secure storage in iCloud Keychain.

2. **Controlled Passkey Sync:** Administrators can manage passkey synchronization, ensuring that passkeys are synced only with approved devices in the managed environment and preventing access from private devices or personal iCloud accounts.

3. **Passkey Creation on Managed Devices:** Through declarative device management,passkey creation can be enforced on specific devices using access management controls, providing cryptographic attestation for origin verification.

4. **Passkey API for Password Managers:** The Authentication Services API allows third-party password managers to create and use passkeys in native apps, offering cross-platform compatibility and broader accessibility.

Apple's latest passkey updates have ushered in a win-win scenario, enabling enterprises to enhance security while delivering a streamlined user experience. Notably, Google has also enabled passkeys in its Google Workspace accounts, amplifying the momentum for passkey adoption in the enterprise realm. These developments put Microsoft, the current leader in the enterprise environment, under pressure to stay at the forefront of passkey technology.

Find out more on: <https://www.corbado.com/blog/apple-goes-all-in-with-passkeys>
Top 100 Developers per Country - Exploring Stack Exchange Data Explorer
Tags: top, developers, stackexchange, country
Published: 2023-06-22 13:03:37

After a while, I decided to revisit my Stack Exchange query, which I had previously used to gather information about Stack Overflow users and their reputations. The query itself is straightforward and written in plain SQL, making it easily accessible for anyone interested in gaining insights about users in their respective countries.

**The Stack Exchange Data Explorer (SEDE)** is an incredibly powerful tool that enables users to query and analyze data from various Stack Exchange sites. With SEDE, you can access a vast amount of information, including details about users, posts, tags, and more."

As I compared the results of my recent query with the data I had gathered during my last checkup, I noticed that the list of top developers in Bosnia and Herzegovina hadn't changed significantly over the years. Without further ado, here are the top 10 developers in Bosnia and Herzegovina according to my recent analysis:

  Name                 Reputation
-----------------------------------
1 Stewie               60337
2 Filip Dupanović      32500
3 Adnan                25806
4 Damir Zekić          15610
5 Haris Krajina        14734 
6 Branislav Lazic      14256 
7 Faris Zacina         14046 
8 Senad Meškin         13547 
9 seidme               12433 
10 Miroslav Popovic    12090

Actual query used here is with result of 100 but you can replace edit for your needs:
```
-- Top Bosnian Developers

SELECT TOP 100
    ROW_NUMBER() OVER(ORDER BY Reputation DESC) AS [#],
    Id AS [User Link],
    Reputation,
    UpVotes,
    DownVotes,
    Views,
    Location,
    AboutMe,
    WebsiteUrl
FROM
    Users
WHERE
    LOWER(Location) LIKE '%bosnia%'
    OR LOWER(Location) LIKE '%bosna%'
    OR Location LIKE '% BiH%'
ORDER BY
    Reputation DESC;
```
Here is also link to the query and results: 
[TOP 100 Bosnians on StackOverflow](https://data.stackexchange.com/stackoverflow/query/1148839/top-100-bosnians-on-stackoverflow)

My position didn't change a lot still on 17 position.

![top 100 Bosnia developers ](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3uwrrajooho9vkv05hc1.png)

I am aware that hiring managers don't use so much stackoverflow.com as important reference in placing new candidates. Somehow, I think this is one of best place to see more about candidate, his knowledge, professionalism, cooperation with other's. When I come to position to decide about new hire I would definitely love to see their stack* profile. And definitely good ranking will have big impact on final decision.

So, for the young guys in IT, I am suggesting you to spend more time there by helping others and to learn more. Stack* place is so valuable and helpful for all of us even today.
Consume RESTful APIs like a Pro with axios and fetch()
Published: 2023-06-22 13:03:23

Hello there, fellow developers! Today, we're going to learn how to consume RESTful APIs like a pro using the awesome axios library and the native fetch() function. So, buckle up and let's dive into the world of APIs! 🚀

An API (Application Programming Interface) allows different software applications to communicate with each other. As a front-end developer, knowing how to consume data from an API is crucial because it gives your web app superpowers. It enables you to fetch data from external sources and display it on your website or manipulate it in any way you want. 

## Consuming APIs with fetch()
Fetch is a native browser API that makes it easy to fetch resources asynchronously. Let's see how we can use Fetch to consume a REST API.

```js
const getData = async () => {
  try {
    const response = await fetch('https://jsonplaceholder.typicode.com/posts');
    const data = await response.json();
    console.log(data);
  } catch (error) {
    console.error('An error occurred while fetching the data:', error);
  }
};

getData();
```

## Consuming APIs with axios
Axios is an NPM package for making HTTP requests in your apps. Axios is a promise-based HTTP client library that makes it easy to send asynchronous HTTP requests to REST endpoints. Let's see how we can use Axios to consume the same API in our React app.

First, we need to install Axios:

```
npm install axios
```
Now, let's make a GET request using Axios with async/await:

```js
import axios from 'axios';

const getData = async () => {
  try {
    const response = await axios.get('https://jsonplaceholder.typicode.com/posts');
    console.log(response.data);
  } catch (error) {
    console.error('An error occurred while fetching the data:', error);
  }
};

getData();

```
And voilà! We've successfully fetched data from a REST API using Axios. 🎉

## Fetch vs Axios: Which One to Choose?
Both Fetch and Axios are great for consuming RESTful APIs, but which one should you choose?

- Fetch is a native browser API, while Axios is an external library.
- Axios automatically converts the response to JSON, while Fetch requires an additional step.
- Axios has better browser compatibility than Fetch.
In general, it's advised to use Fetch for small applications and Axios for larger applications for scalability reasons

Congratulations! 🎉 You've learned how to consume RESTful APIs like a pro using both Fetch and Axios. Both methods have their advantages and use cases, so choose the one that best fits your needs and the size of your application. Now go out there and start consuming APIs like a pro! And remember, practice makes perfect. Happy coding! 😊
touchpad toggle linux
Tags: asuszenbookux32l
Published: 2023-06-22 12:39:34




1- instaliraj xinput
`sudo dnf install xinput`

-------------------

2-  kreiraj skriptu u ~/my_scripts  kao 'toggle-touchpad.sh'

```

#!/bin/sh

TOUCHPAD_STATUS=$(xinput list-props "ETPS/2 Elantech Touchpad" | grep 'Device Enabled' | awk '{ print $4 }')

if [ "$TOUCHPAD_STATUS" == "1" ]; then
    xinput disable "ETPS/2 Elantech Touchpad"
    notify-send --icon=dialog-information "Disabled" "Your computer's touchpad is disabled."
else
    xinput enable "ETPS/2 Elantech Touchpad"
    notify-send --icon=dialog-information "Enabled" "Your computer's touchpad is enabled."
fi

```

------------------


3- u keyboard shortcuts, stavi kao:
`/home/igor/my_scripts/toggle-touchpad.sh`

i make sure, da pritisnes, Fn + F9 na keyboard od laptopa, ne sa eksterne tastature (jer eksterna tastatura ima na F9, za volume control).
jer onda prepozna kao "Touchpad toggle"
Set up data science development: from zero to hero
Published: 2023-06-22 12:03:19

When it comes to data science, python with jupyter-lab seems to be the go-to choice. 

However, when we start a new project, it always costs us half an hour or two to configure the right environment. Even just launching jupyter-lab and install our kernel to it. 

In this tutorial, I give a quick step-by-step guidance on setting up a new data science development environment. 

First, make sure `anaconda` or `miniconda` is installed. 

Then, create a new python environment using 

```bash
$ conda create -n myenv python=3.9
```

Now you create a new environment called `myenv` with python version 3.9. 

Next, activate the environment 
```bash
$ conda deactivate

$ conda activate myenv
``` 

You should see something like this in terminal: 

```bash
(myenv) $
```

Next, install jupyter-lab

```bash
(myenv) $ conda install -c conda-forge jupyterlab
```

As the last step, install current kernel to jupyterlab

```bash
(myenv) $ python -m ipykernel install --name myenv --display-name "myenv-display-name"
```

Now, you can run 

```bash
(myenv) $ jupyter-lab
```

A new window of jupyter-lab will pop up. 
OK, you are all set! Let's do real data science! ;)
Google’s Plan to Manufacture Pixel Phones in India: A New Chapter in Smartphone Industry
Tags: news, tech, google
Published: 2023-06-22 16:13:15

---
title: Google’s Plan to Manufacture Pixel Phones in India: A New Chapter in Smartphone Industry
published: true
date: 2023-06-22 11:52:00 UTC
tags: News,Tech,Google
canonical_url: https://ektechnerd.com/googles-plan-to-manufacture-pixel-phones-in-india-a-new-chapter-in-smartphone-industry/
---

In a move that has piqued curiosity in the tech world, Google is in talks to manufacture its Pixel smartphones in India. This development comes on the heels of a meeting between Indian IT Minister Ashwini Vaishnaw and Google parent Alphabet CEO Sundar Pichai at Google’s California headquarters.

Google’s decision is influenced by the production-linked incentives (PLI) that India is offering to international tech giants to manufacture smartphones in the country. This move could significantly diversify Google’s production portfolio, which has been largely centered in China. Notably, Apple is also planning to shift 18% of its global iPhone production to India by 2025.

Reports suggest that Google is already in discussions with Foxconn Technology Group’s Indian unit, Bharat FIH, as well as domestic manufacturers like Lava International and Dixon Technologies India. Key Google representatives, including Ana Corrales, the operating chief of its consumer hardware arm, and Maggie Wei, a senior director of global sustaining product operations, have visited India recently to initiate talks.

While these discussions are still in the initial stages, Google’s interest in India is not new. The tech giant has been introducing exclusive Maps features for Indian audiences in multiple regional languages and has collaborated with Reliance Jio to offer a tailor-made Android OS for Jio smartphones.

Despite this, Google’s hardware often lags in reaching India. The company skipped launching its flagship Pixel 5 and 6 series, though it introduced the Pixel 7 series last year. Google’s latest hardware, including the Pixel Fold, Pixel Watch, and Pixel Tablet, remains unavailable in India. However, the company has been ramping up efforts to bring smartphones to the Indian market, as evidenced by the recent introduction of the Pixel 7a.

India’s aggressive push for the Made-in-India initiative has already compelled Chinese smartphone players to set up factories in different Indian cities. Samsung also manufactures smartphones in India and boasts the world’s largest mobile factory in Noida, Uttar Pradesh. Mobile phone exports saw a growth of 128% in April-May this year, driven by iPhone exports.

In related news, Prime Minister Narendra Modi met with Tesla CEO Elon Musk to discuss the possibilities of bringing Tesla’s high-end electric cars to India and launching satellite internet connectivity via Starlink Satellites in the country.
Liman Cihaz Yönetim ile Zaman Sunucusu Ayarları (Debian 12)
Published: 2023-06-22 11:20:41

- Liman arayüzü açılır.
- Menüye girilir.
- Menüde sunucunun alt başlıklarında bulunan <u>Cihaz Yöneticisi</u> eklentisinin içine girilir.
- İlgili makineye sağ tıklanır ve **Ağ** sekmesine tıklanır.
- NTP Adresi kısmına hatalı bir NTP adresi girildiğinde ve kaydet butonuna tıklandığında (null) dönecektir. (ÖR: hatali.ntp.adresi girildiğinde) Ancak, bu adres doğru bir NTP sunucusu olmadığı için zaman senkronizasyonu gerçekleştiremeyecektir.

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


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mc1pj18ib42b3ojf6k7g.png)
- NTP Adresi kısmına geçerli bir adres girilirse ve kaydet butonuna tıklanırsa adres havuzundaki bir sunucuyu temsil eden IP adresi çıkacaktır. (ÖR: pool.ntp.org girildiğinde pool.ntp.org havuzundaki bir sunucuyu temsil eden 176.236.133.5 IP adresi görüntülenecektir.)


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

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


**:bangbang:** Dolayısıyla, 176.236.133.5 IP adresi, pool.ntp.org havuzundaki bir sunucuyu temsil eder ve doğru ve güvenilir zaman bilgileri sağlamak için kullanılabilir. Ancak, belirtmek gerekir ki, pool.ntp.org havuzunda bulunan IP adresleri zaman içinde değişebilir ve farklı sunuculara yönlendirilebilir. Bu nedenle, zaman senkronizasyonu sağlamak için genellikle pool.ntp.org alan adını kullanmak daha uygundur, çünkü bu, güncel ve doğru NTP sunucusuna yönlendirme yapacaktır.

- Ayrıca ilgili Debian 12 makinede şu komut girilir ve konfigürasyon gerçekleştiği görülür:

```bash
cat /etc/systemd/timesyncd.conf
```
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/s0x6ysss7txh23qsqke6.png)
Конспект по Highload Клеппман. Часть 1. Глава 1
Tags: highload, programming, theory, books
Published: 2023-06-22 11:19:45

В систему закладывается 3 столпа: _надежность_, _масштабируемость_, _удобство эксплуатации_.

**Надежность системы** обуславливается правильностью работы, как этого ожидает пользователь, устойчивостью к сбоям и неправильному использованию программы, предотвращение несанкционированного доступа к системе, высокой производительностью при предполагаемой нагрузке и объеме данных.

_Сбой_ (fault) и _отказ_ (failure) — разные вещи. Сбой — прекращение или ошибка в работе одного из компонентов. Отказ — прекращение работы приложения в целом (прекращение предоставления сервиса пользователю).

> Лучше спроектировать механизмы устойчивости к сбоям, которые бы предотвращали переход сбоев в отказы.

Сбои происходят чаще всего по трем факторам: аппаратные сбои, программные ошибки, человеческий фактор. Последняя причина занимает наибольший процент всех сбоев.

**Масштабируемость** (_scalability_) — способность системы справляться с возросшей на нее нагрузкой.

Для описания нагрузки на приложение, можно выбрать основные функции. Напр. в twitter — чтение домашней ленты и написание твита. Далее можно заняться описанием производительности. Главный показатель для онлайн-систем — это _время отклика_ (это не равнозначно _времени ожидания_ (!)).

> **Время отклика** (_response time_) — фактическое время обработки запроса (время обслуживания, service time) + задержки сети + задержки очереди.
> **Время ожидания** (_latency_) — время на протяжении которого запрос ожидает обслуживания.

Для метрики _времени отклика_ лучше использовать _процентили_, а не _среднее арифметическое_. Их как раз можно встретить в таких документах, как SLO (service level objectives) и SLA (service level agreements). Важно измерять время отклика на стороне клиента, так как его время всегда равно времени самой медленно выполняющейся части запроса.

Бывает **горизонтальное масштабирование** (_hs_, распределение нагрузки по нескольким машинам) и **вертикальное масштабирование** (_vs_, улучшение железа). Их можно проводить как в _ручном режиме_ (проще и предсказуемо) так и использовать _адаптирующиеся системы_ меняющие конфигурации в зависимости от нагрузки. Хорошая практика — это баланс между этими двумя подходами (_hs_ и _vs_). Так или иначе, все масштабируемые архитектуры строятся из универсальных блоков, на основе проверенных паттернах.

> На начальных стадиях важнее скорость работы текущего состояния системы, чем её оптимизация под возможные нагрузки в будущем.

**Удобство эксплуатации системы** строится на основе трех принципов:

- _Удобство эксплуатации_. Облегчает поддержку системы.
- _Простота_. Облегчает ее понимание новыми инженерами.
- _Возможность развития_. Облегчает введение нового функционала.

Избежать усложнение кода по мере разработки приложения — использовать _абстракции_.

> Чем проще система, тем легче ее менять. Важно на начальном этапе задать системе **возможность развития** (_evolvability_).
Is It Worth Learning Coding Or Tech Skills Anymore Ai With AI?
Tags: programming, codewithai, learningcoding
Published: 2023-06-22 11:12:40


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

Learning coding or tech skills is still highly valuable in the era of AI. The article at https://readmorr.com/is-it-worth-learning-coding-or-tech-skills-anymore/ delves into this topic further. Here is a summary:

In today's technologically advanced world, acquiring coding or tech skills remains relevant and worthwhile. Although AI technologies are advancing rapidly, they do not eliminate the need for human expertise in coding and technology. The article discusses three key reasons why learning these skills is still important.

1. Adaptability and innovation: Coding and tech skills empower individuals to adapt to changing technological landscapes and drive innovation. By understanding the fundamentals of programming, individuals can effectively work with AI technologies, harness their potential, and create new solutions.

2. Career opportunities: Despite the automation potential of AI, there is a growing demand for professionals with coding and tech skills. Many industries require individuals who can develop, maintain, and improve AI systems. Learning these skills can open up diverse and rewarding career opportunities.

3. Problem-solving abilities: Coding and tech skills enhance problem-solving abilities, logical thinking, and computational reasoning. These skills are valuable not only in the context of AI but also in various aspects of life and work. They enable individuals to approach complex problems, break them down into manageable components, and develop effective solutions.

The article at https://readmorr.com/is-it-worth-learning-coding-or-tech-skills-anymore/ provides further insights into why learning coding or tech skills is still relevant and valuable in the age of AI