teleren/devto huggingface dataset:
How to enable system-wide DNS-over-HTTPS on linux
Published: 2023-05-23 17:25:32

In this tutorial we learn how to enable system-wide DNS-over-HTTPS on linux to protect all queries. DNS-over-HTTPS, or simply DOH, encrypts DNS traffic by passing DNS queries through https.

This howto was tested on Fedora 38 but should work on other linux distributions too. 

First we need to install dnscryp-proxy. It works as a client for DOH servers:

```
sudo dnf install dnscryp-proxy

```
Now we need to edit its config file using:

```
sudo nano /etc/dnscrypt-proxy/dnscrypt-proxy.toml

```
In this example, we are adding 2 servers:

```
server_names = ['adfilter', 'ahadns']
listen_addresses = ['127.0.0.1:53']
```

You can also add more popular servers like 'cloudflare' or 'google' to `server_name`.   

Now we scroll down to the [static] section and add these:

```
[static]

   [static.'adfilter']
   stamp= 'sdns://AgMAAAAAAAAADjE2My40Ny4xMTcuMTc2oMwQYNOcgym2K2-8fQ1t-TCYabmB5-Y5LVzY-kCPTYDmIEROvWe7g_iAezkh6TiskXi4gr1QqtsRIx8ETPXwjffOEGFkbC5hZGZpbHRlci5uZXQKL2Rucy1xdWVyeQ'

   [static.'ahadns']
   stamp= 'sdns://AgMAAAAAAAAACTUuMi43NS43NQARZG9oLm5sLmFoYWRucy5uZXQKL2Rucy1xdWVyeQ'

``` 
For any DOH server you need to find the "stamp". It's usually on the DNS provider website.

Now we can save the file and exit nano editor.

We should restart the service:

```
sudo systemctl restart dnscrypt-proxy.service

```
Now we need to make our system use this configuration. The default dns server on modern linux systems is called systemd-resolved.

We should tell systemd-resolved to forward all DNS queries to 
dnscrypt-proxy, which is listening on 127.0.0.1:53.

To do so we create a so-called drop-in file for systemd-resolved using this command:
```
sudo cat <<EOF | sudo tee /etc/systemd/resolved.conf.d/dns_servers.conf
[Resolve]
DNS=127.0.0.1
Domains=~.
EOF
```


We also need to make sure all lines in /etc/systemd/resolved.conf file are commented out.

Now we can restart the systemd resolver:

```
sudo systemctl restart systemd-resolved.service
```
If everything has been set correctly, our DNS queries should be encrypted and sent via https.
AWS SNS
Tags: cloud, aws, devops, security
Published: 2023-05-19 14:01:07

**Anotações sobre o AWS SNS  para ajudar na preparação das certificações AWS.**

Até o momento as anotações são para as certificações abaixo:

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

- [Link oficial](https://aws.amazon.com/pt/sns/?whats-new-cards.sort-by=item.additionalFields.postDateTime&whats-new-cards.sort-order=desc)
- [FAQ](https://aws.amazon.com/pt/sns/faqs/)

##**Anotações gerais**

- Envia notificações aos usuários finais
- Publishers
- Push notifications
- CloudWatch é integrado com SNS

##**Protocolos**

- HTTP
- HTTPS
- E-mail
- E-mail json
- SMS
- Plataform application endpoint
- SQS
- Lambda

##**Confira os problemas comuns**

- O número de telefone é bloqueado por uma operadora como spam.
- O destino está bloqueado.
- O corpo da mensagem não é válido.
- O número de telefone está na lista “Não perturbe”.
- O telefone está em uma rede de roaming.
- A operadora de telefonia está bloqueando a mensagem.
- O telefone está bloqueando o SMS.
- O telefone está temporariamente fora da área de cobertura.
- O telefone está desligado.
- O telefone é um número fixo (não um celular).
- Há um URL não registrado no corpo da mensagem.
- O número do celular é inválido.
- Os parceiros downstream têm configurações de rede incorretas para um determinado número ou conjunto de números regionais.

##**Links importantes**

- [Como resolver o erro “Unknown error attempting to reach phone” (Erro desconhecido ao tentar acessar o telefone) do SMS no Amazon SNS?](https://aws.amazon.com/pt/premiumsupport/knowledge-center/sns-unknown-error-phone-sms/)
How to Check Domain (DNS) History?
Tags: webdev, domain, programming, beginners
Published: 2023-05-23 17:24:19

The digital landscape constantly evolves, and website owners and businesses must closely monitor their online presence. One critical aspect of managing a domain is understanding its DNS history. This article will explore DNS history, why it’s essential, and how to perform an environment DNS history check. We will also discuss the implications of DNS history on SEO and provide best practices for managing it effectively.

When managing a domain, it’s crucial to have a comprehensive understanding of its DNS (Domain Name System) history. DNS serves as the backbone of the internet, translating domain names into IP addresses and allowing users to access websites and other online services. By delving into a domain’s DNS history, we can gain valuable insights into its past configurations and changes.

## **What is DNS?**
Before diving deeper into domain DNS history, let’s briefly review the fundamentals of DNS. DNS, or Domain Name System, is the internet’s backbone. It acts as a directory that translates human-readable domain names, like example.com, into IP addresses, such as 192.0.2.1. This translation is essential for computers to locate and communicate with websites accurately. DNS forms the basis of our online experiences, enabling us to navigate the vast web effortlessly.

Domain name servers (DNS) are a critical part of your website’s infrastructure. By properly configuring your DNS, you can help ensure that your visitors can find your site and that your site can communicate with the external world. DNS is one of the primary systems used to identify the location of a host or server on the Internet.

The Domain Name System (DNS) stores the information that tells computers where to find one another by translating domain names into IP addresses.

---

Continue Reading......

This Blog is Originally Published at **The Last Words**

Read More from Here: [How to Check Domain (DNS) History](https://thelastwords.wiki/how-to-check-domain-dns-history-records/)
trenchless sewer repair Birmingham AL
Published: 2023-05-23 17:17:15

No one wants to deal with a broken sewer line in their home. The smell could be overwhelming and your lines could stop working. Sewer lines are often one of the most overlooked aspects of a plumbing system in a home. A sewer line drains wastewater from your home to the city’s main sewer system to prevent damage or contamination in your residential plumbing system. 
So if you have any doubts about the condition of your sewer lines, it’s best to call a professional.
Mr. Drippy Plumbing has over 50 years of combined experience in the plumbing industry, including sewer line installation, repair, and replacement. From clogged pipes to broken sewer lines and everything in between, our team has a [trenchless sewer repair Birmingham AL](https://mrdrippyplumbing.com/sewer-pipelining-services/) who has the knowledge and experience necessary to handle any sewer pipe issue you may have. Our company provides exceptional service and high-quality workmanship, with top-of-the-line technology and products that have been tested to ensure quality and safety.
Introduction to the Command Line Interface
Tags: beginners, coding
Published: 2023-05-23 17:13:28

A shell is a program that executes other programs in response to text commands. There are two types:
Graphical user interface(GUI)
Command line interface(CLI)

A command-line interface is a computer terminal that performs processes by text prompts from users. Unlike the GUI where users send prompts by interactions with the screen using the mouse/ touchpad, the command-line employs the use of the keyboard. The command-line is accessed via a shell. 

Advantages of the command-line
there’s more speed creating files. 
you have more control over your hardware. 
It can be used to search for files that are not available to the common user. 

Downsides of the command-line
In comparison to the GUI, the command-line is less user friendly. 
steeper learning curve associated with memorizing commands and complex syntax/arguments. 
different commands used in different shells.
#GithubHack23 : Pomotimer App using Vanilla JavaScript
Tags: githubhack23
Published: 2023-05-23 17:11:16

## What I built 
I created a [pomodoro](https://en.wikipedia.org/wiki/Pomodoro_Technique) timer app to help users to focus and rest at certain intervals. This app is based on the Pomodoro time management method developed by Francesco Cirillo in the late 1980s

### Category Submission: 
Phone Friendly: Projects built for Mobile (PWA)

### App Link
https://pomotimerjs.netlify.app/

### Screenshots 

Splash Screen in android PWA
![Splash Screen in android PWA](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/q9fcxyjd94f1gzpt1lki.jpeg)
Web Desktop Version
![Desktop Version](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rns090dsyoglcefjde6y.png)

### Description 
A simple application that will help users train their focus with the Pomodoro method. The way the Pomodoro method works is by doing the work for a set time, then resting for 5-15 minutes. then start focusing again and so on until the job is done. users can customize the sound of the alarm when finished focusing and finished resting. This app is build with HTML, CSS and Javascript

### Link to Source Code 
visit [this link](https://github.com/abiyyu03/pomotimer/) to get source code

### Permissive License 
This project is licensed under MIT

## Background
My main purpose to create this web app is because I want to learn more about Javascript, besides that, I am a person who easily loses focus when doing something, so I know the Pomodoro method. And I decided to make it in the form of a web-based application. even though there are many pomodoro timer applications out there, I want to make my own version in the hope that the application that I made can be useful for many people

### How I built it  
I utilize Github Actions to deploy static content to pages and for build Github pages. In developing process, i've learned much about JavaScript, like the how unique this language, applying asynchronous, etc. And also i've learned how to implement progressive web app in a static site.  

### How to install on mobile
open this app link, then find in your browser menu, "add to home screen" or something like that. 

### Additional Resources/Info
[https://en.wikipedia.org/wiki/Pomodoro_Technique](https://en.wikipedia.org/wiki/Pomodoro_Technique)
[https://www.freecodecamp.org/news/build-a-pwa-from-scratch-with-html-css-and-javascript/](https://www.freecodecamp.org/news/build-a-pwa-from-scratch-with-html-css-and-javascript/)
Transferring data between Middleware in Asp.net Core
Tags: webdev, programming, productivity, aspdotnet
Published: 2023-05-23 17:11:03

The "HttpContext" object in ASP.NET Core allows you to transport data between middleware. A single HTTP request's context is represented by the "HttpContext," which also contains data on the request and response.
Depending on your unique use case, there are different ways to transport data between middleware. Here are some strategies you can use:
### Route values or Query Parameters:
Using query parameters or route values, middleware can communicate data amongst each other. From the request URL, the information can be taken out and used in later middleware. For instance:
   ```csharp
   // Middleware 1
   public async Task Invoke(HttpContext context)
   {
       // Get data from query parameter
       string data = context.Request.Query["data"];

       // Pass data to next middleware
       context.Items["data"] = data;

       await _next(context);
   }
   // Middleware 2
   public async Task Invoke(HttpContext context)
   {
       // Get data from previous middleware
       string data = context.Items["data"] as string;

       // Use the data

       await _next(context);
   }
   ```

### Session State:
Data can be kept in the session and accessed by later middlewares. Make sure your ASP.NET Core application has session state configured. For instance:
   ```csharp
   // Middleware 1
   public async Task Invoke(HttpContext context)
   {
       // Store data in session
       context.Session.SetString("data", "value");

       await _next(context);
   }

   // Middleware 2
   public async Task Invoke(HttpContext context)
   {
       // Retrieve data from session
       string data = context.Session.GetString("data");

       // Use the data

       await _next(context);
   }
   ```
“HttpContext.Items”: Data that is specific to the current request but not persisted across subsequent requests can be stored in the "HttpContext.Items" dictionary. For instance:

   ```csharp
   // Middleware 1
   public async Task Invoke(HttpContext context)
   {
       // Store data in HttpContext.Items
       context.Items["data"] = "value";

       await _next(context);
   }

   // Middleware 2
   public async Task Invoke(HttpContext context)
   {
       // Retrieve data from HttpContext.Items
       string data = context.Items["data"] as string;

       // Use the data

       await _next(context);
   }
   ```

These are just a few instances of how ASP.NET Core allows you to transmit data between middlewares. The method chosen will depend on the type of data being used and the particular needs of your application.
DevToo
Tags: githubhack23, webdev, svelte, ai
Published: 2023-05-23 17:07:59

## What I built 

A suggestion and search engine for dev.to

### Category Submission: 

Wacky Wildcards

### App Link

https://devtoo.dev/

### Screenshots 

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


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

### Description 

A search engine and suggestion system for articles published on dev.to. Discover with ease related content of dev.to, by searching for topics of interest or by finding articles that relate to a particular one.

For example if you are reading an article on dev. to with this URL: 
https://dev.to/nikkilopez2/understanding-vector-databases-49n3

you can change `dev.to` to `devtoo.dev` like this:
https://devtoo.dev/nikkilopez2/understanding-vector-databases-49n3

and discover more related content.

### Link to Source Code 

https://github.com/tzador/devtoo

### Permissive License 

It is released under MIT License

## Background (What made you decide to build this particular app? What inspired you?) 

When reading articles on dev.to, only 4 related articles are suggested at the end. I wanted a suggestion and search engine that would allow to easily discover related content on dev.to.

### How I built it (How did you utilise GitHub Actions or GitHub Codespaces? Did you learn something new along the way? Pick up a new skill?) 

GitHub actions where utilised to fetch the fresh content from dev.to by scanning the latest sitemaps. They are run using CROM scheduler and update the database with new content.

For database I used for the first time PostgreSQL with `pgvector` extension, which indexes OpenAI based vector embeddings based on Title, Description and the Tags of articles. This allows to find related articles to a given one in a speedy manner.

### Additional Resources/Info

Additionally a chrome extension and a bookmarklet has been build, so that with on click you can jump from dev.to article to a list of related ones. They also work on other websites that provide OpenGraph metadata, which can be vectorised and used as a query in our system.
What Tools Do You Use To Make Your Products More Accessible?
Tags: productivity, design, discuss, webdev
Published: 2023-05-23 17:00:00

Hey hey!

CodeNewbie Podcast is coming out with a new episode tomorrow with [Daniel Devesa Derksen-Staats](https://twitter.com/dadederk?lang=en) about his route to a career in accessibility, making code more accessible, and the importance of adding accessibility into our coding tool kits.

---

Here is our link to where you can await the new episode, or  you can find it wherever you listen to your podcasts tomorrow!

{% embed https://www.codenewbie.org/podcast %}

---
Accessibility is important in product development because it advocates for the creation of products that can be used by people of all abilities. There are a huge amount of tools to help test accessibility across different platforms for a range of abilities, whether they be related to vision, hearing, cognition, speech, and/or mobility. While creating a product that meets accessibility guidelines, we must continually test different frameworks through a variety of resources to create the most inclusive design.

**So, my question for you all is: what resources, websites, books, and other tools have you used to test and improve the accessibility of your products?**
Convert ChatGPT conversations to Obsidian (Markdown format)
Tags: chatgpt, export, python
Published: 2023-05-23 16:50:18

---
title: Convert ChatGPT conversations to Obsidian (Markdown format)
published: true
description: 
tags: #chatgpt #export #python
# cover_image: https://direct_url_to_image.jpg
# Use a ratio of 100:42 for best results.
# published_at: 2023-05-23 16:12 +0000
---

I am usually asking ChatGPT the same questions and would like to store and index my chat history in Obsidian. First thing you need to do is to download your conversations. Follow the instructions here

https://help.openai.com/en/articles/7260999-how-do-i-export-my-chatgpt-history-and-data

Once you have done this, you will find a folder with your conversations and there is a json file with the data.

The following python script reads this json file and creates the each conversation as an output markdown file that you can just import to Obsidian

```python
import json
import os
def get_conversation(node_id, mapping, list):
    node = mapping[node_id]
    if 'message' in node and node['message'] is not None:
        content_parts = node['message']['content']['parts']
        if len(content_parts) > 0:
            author_role = node['message']['author']['role']
            list.append(f"## {author_role}\n {''.join(content_parts)}")

    for child_id in node.get('children', []):
        get_conversation(child_id, mapping,list)

if __name__ == '__main__':
    folder_path = "output"
    # Check if the directory exists
    if not os.path.isdir(folder_path):
        # If not, create the directory
        os.makedirs(folder_path)
    with open('conversations.json') as f:
        data = json.loads(f.read())
        for item in data:
            title = item["title"]
            title = title.replace("/","_").replace('"','')
            if title == "New chat":
                title = "New chat " + str(int(item["create_time"]))
            root_node_id = [node_id for node_id, node in item['mapping'].items() if node['parent'] is None][0]
            list = []
            get_conversation(root_node_id, item['mapping'],list)
            with open(f'{folder_path}/{title}.md','w') as outfile:
                outfile.write('\n'.join(list))

```

Sometimes ChatGPT fails to create a title for your conversation and in that case, it just uses "New chat", the script above concatenates the create time epoch to make it unique.
How do you list all the PODs and containers in your Kubernetes cluster
Tags: containers, kubernetes, docker
Published: 2023-05-23 16:44:09

Details on the below short blog 

[https://belowthemalt.com/2023/05/23/how-do-you-list-all-the-pods-and-containers-in-your-kubernetes-cluster/](https://belowthemalt.com/2023/05/23/how-do-you-list-all-the-pods-and-containers-in-your-kubernetes-cluster/)
Part 4: Working with Modules and Imports in TypeScript
Tags: typescript, javascript, tutorial, beginners
Published: 2023-05-23 16:07:21

## Section 4: Working with Modules and Imports

In this section, we will explore modules and imports in TypeScript. Modules provide a way to organize our code into separate files and promote reusability. We will learn how to create modules, export and import components, and leverage the power of module systems.

## Introduction to Modules

Modules in TypeScript are a way to encapsulate code within separate files. Each file can be treated as a module, with its own scope and dependencies. This promotes code organization, reusability, and maintainability.

To define a module, we use the `export` keyword to mark the components that we want to make available outside the module.

```typescript
// math.ts
export function sum(a: number, b: number): number {
  return a + b;
}

export const PI = 3.14;
```

## Exporting and Importing Modules

To use components from another module, we need to import them. We use the `import` keyword to specify the module and the components we want to import.

```typescript
// app.ts
import { sum, PI } from "./math";

console.log(sum(5, 10)); // 15
console.log(PI); // 3.14
```

We can also use the `import` statement with an alias to rename imported components.

```typescript
import { sum as add } from "./math";
console.log(add(5, 10)); // 15
```

## Default Exports and Imports

A module can have a default export, which represents the main exported component. It can be imported using the `import` statement without curly braces.

```typescript
// math.ts
export default function multiply(a: number, b: number): number {
  return a * b;
}

// app.ts
import multiply from "./math";
console.log(multiply(5, 10)); // 50
```

## Organizing Code with Module Systems

TypeScript supports various module systems, including CommonJS, AMD, and ES modules. The module system used depends on the target environment and the module loader being used.

To specify the module system, we can use the `module` compiler option in the `tsconfig.json` file.

```json
{
  "compilerOptions": {
    "module": "commonjs"
  }
}
```

TypeScript provides flexibility in choosing the module system based on the specific needs of the project.

## Conclusion

Modules and imports are powerful features of TypeScript that allow us to organize and modularize our codebase effectively. They promote reusability, maintainability, and better code organization. By leveraging modules, we can build scalable and maintainable applications.

---

In the next section, we will explore asynchronous programming with TypeScript, including promises, async/await, error handling, and working with async functions.

---

### **Subscribe to my newsletter where you will get tips, tricks and challenges to keep your skills sharp. [Subscribe to newsletter](https://prodigious-innovator-1238.ck.page/25e4b3fdce)**

---

<a href="https://www.buymeacoffee.com/Bobbyhalljr" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/v2/arial-yellow.png" alt="Buy Me A Coffee" style="height: 60px !important;width: 217px !important; margin-top: 2rem !important;" ></a>