teleren/devto huggingface dataset:
Attempting to add Static Assets support to my Tool txt2html
Published: 2023-10-31 03:57:51

In my last post [Study Docusaurus Code: Static Assets ](https://dev.to/mingming-ma/study-docusaurus-code-static-assets-1amg), I shared my learning from exploring how Docusaurus handles static assets. I was inspired by its implementation and decided to incorporate support for static assets into my tool, [txt2html](https://github.com/mingming-ma/txt2html). As a result, users can display their images.

## The Need for Cleaner Syntax
I prefer to provide users with a cleaner method for importing pictures when composing their texts. After conducting some research, I believe that using '<' and '>' as delimiters could be a promising starting point. Consequently, I have chosen the syntax `</img/test.png>` and here the string `/img/test.png` path will correspond to `static/img/test.png`. 

```bash
Tool Directory
└── static
    └── img
        └── test.png
```

## Prototype implementation
I finished a prototype [implementation](https://github.com/mingming-ma/txt2html/commit/b4ebaf96f7bb4457815333948b62e0a28d44403f) which make the output HTML file display the imported picture. It used the regex match to find the string inside the "<>". In Docusaurus's implementation, there are `baseUrl` and `url`, similarly to my tool's folder path and relative path. Since my tool is developed by Python, I can use `os.path.abspath` to get the asset's path easily. To this point, I would say it much more close to the `import` or `require` methods used by Docusaurus.

## Issues
Currently, it was hard coded the path. Later I will update so that user can define their preferred location. 

## Closing Thoughts
The markdown [syntax](https://www.markdownguide.org/basic-syntax/) demonstrates that the angle brackets are used for the links and URLs, and images are added using `![Alt Text](URL)`. Although it is easier for users to type "<>" only, I'm still considering whether the different syntax would do more harm than good.
AFRICA AS A WHOLE
Tags: newbie, news, newrelic
Published: 2023-10-31 03:51:41

 Main reasons why most African countries are poor. -   : Read more: https://myblogpay.com/read/116506/main_reasons_why_most_african_countries_are_poor via @myblogpay #blogpay
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/y1fktgisfebmsmt8jn6x.jpg)
Webpack plugins
Published: 2023-10-31 03:48:33

Webpack offers a wide range of plugins to enhance and customize the build process. Here's a list of some commonly used Webpack plugins  in September 2021:

1. **HtmlWebpackPlugin**: Simplifies the creation of an HTML file to serve your bundles and automatically injects script tags.

2. **CleanWebpackPlugin**: Cleans the output directory before each build to remove old or unused files.

3. **MiniCssExtractPlugin**: Extracts CSS from your bundles into separate files.

4. **CopyWebpackPlugin**: Copies individual files or entire directories to the build output.

5. **DefinePlugin**: Allows you to define global constants that can be configured at build time.

6. **CompressionPlugin**: Compresses assets using gzip or Brotli algorithms to reduce file sizes.

7. **TerserPlugin**: Minifies and uglifies JavaScript code for production builds.

8. **OptimizeCSSAssetsPlugin**: Minifies and optimizes CSS for production builds.

9. **SplitChunksPlugin**: Automatically splits common dependencies into separate chunks to improve caching and loading performance.

10. **BundleAnalyzerPlugin**: Provides a visual representation of your bundle's contents and sizes.

11. **WebpackBar**: Adds a progress bar to the console during the build process.

12. **ProvidePlugin**: Provides global variables automatically to modules, reducing the need for explicit imports.

13. **CopyWebpackPlugin**: Copies files and directories from one location to another during the build process.

14. **StylelintPlugin**: Integrates Stylelint for linting your CSS or SCSS code.

15. **ESLintWebpackPlugin**: Integrates ESLint for linting your JavaScript or TypeScript code.

16. **ImageMinimizerWebpackPlugin**: Optimizes and compresses images during the build process.

17. **ForkTsCheckerWebpackPlugin**: Runs TypeScript type checking in a separate process to speed up build times.

18. **FriendlyErrorsWebpackPlugin**: Provides user-friendly error and warning messages during development builds.

19. **HotModuleReplacementPlugin**: Enables Hot Module Replacement (HMR) for live reloading during development.

20. **HtmlWebpackHarddiskPlugin**: Forces HtmlWebpackPlugin to write the HTML file to disk even in watch mode.

21. **WebpackDevServer**: Not a plugin, but a development server that works seamlessly with Webpack for live development.

22. **dotenv-webpack**: Loads environment variables from a `.env` file and makes them available in your application.

23. **workbox-webpack-plugin**: Generates a service worker for Progressive Web App (PWA) functionality.

24. **PurgeCSSPlugin**: Removes unused CSS styles from your bundles.

Please note that the availability and popularity of Webpack plugins can change over time, so it's a good practice to check the official Webpack documentation and the npm registry for the latest plugins and updates. Additionally, you can search for specific plugins based on your project's requirements to find ones that suit your needs.
Removing Applications Installed via dpkg: A Step-by-Step Guide
Tags: dpkg, linuxtips, softwareremoval, linuxcommands
Published: 2023-10-31 03:45:07

## Introduction:

Installing software packages on Linux systems using the dpkg command is a common practice. However, sometimes you might need to uninstall these applications. This guide outlines the steps to remove applications installed via dpkg in a straightforward manner.

&nbsp;
### Steps to Uninstall an Application Installed via dpkg:
&nbsp;
#### 1. Identify the Package Name:
First, you need to find the exact name of the package you want to uninstall. Use the following command to list all installed packages containing a specific keyword (replace PACKAGE_NAME with the actual keyword, e.g., skype):

`dpkg -l | grep PACKAGE_NAME
`
For example, to find Skype packages:
`dpkg -l | grep skype`

##### 2. Remove the Application:
Once you've identified the correct package name, use the following command to remove the application:

`sudo dpkg -r skype-package-name
`
Replace skype-package-name with the actual name of the package you found in the previous step.


![example](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/g8pdanfp4ph3kn3nodrg.png)
解析原生IP和广播IP
Tags: webdev
Published: 2023-10-31 03:14:57

经常有人问什么是原生IP？ 如何判断我的 VPS 是否为本地 IP？ 本文主要介绍什么是原生IP，什么是非原生IP（广播IP），分享一个常用的区分原生IP和非原生IP的方法。TG：@Sp_server

什么是原生IP和广播IP，建站是共享IP好还是独立IP好？

一、什么是原生IP和非原生IP

本地IP是指注册地址与VPS机房所在国家相同的IP。 相反，非本地IP是指注册地址与VPS机房位置不一致的IP。 .

总之，如果你在香港买了一个VPS，但是在IP数据库中查看该IP的Whois信息，发现是印度IP，那么这个IP就不是原生IP。

二、原生IP的区别

你自己的VPS必须知道机房的位置，所以我们需要做的就是检查这个IP的Whois信息中的地区/国家是否与你的机房位置一致。

3、如何判断你的服务器是否是本地IP？

1. Native IP（本地IP）

是本地ISP运营商提供的本地原生IP，100%本地所有权，价格比较高，限制区域内的服务或游戏都能被识别。

2.广播IP（非本地IP、国际IP）

来自其他国际区域的 IP 不使用本地 IP，而是通过广播分发到可用区域中的位置。 价格实惠，网络体验与本地IP一致。

3.原生IP和广播IP的区别

本地IP是指注册地址与机房所在国家相同的IP。 另一方面，非本地IP是指注册地址与机房位置不一致的IP。 .

4、建站时使用共享IP好还是独享IP好？

专用IP有什么意义？ 专用 IP 贵吗？ 被问题困扰。

那么，什么是专用IP？

简单地说，专用 IP 是您网站的唯一 IP 地址，仅供您使用。

共享 IP 是指许多人的网站使用一个 IP 地址。

使用专用 IP 有什么好处？

免受来自其他网站的不必要干扰

这是因为网站的基础是其长期的稳定性和安全性。 如果共享IP的使用因在其他网站上作弊或侵权而影响全身，该IP的信用将被降低。 严重的甚至可能被屏蔽，导致自己的网站瘫痪，得不偿失。

业务需求：第 3 方应用程序或脚本需要独立 IP 支持
尤其是外贸业务、跨境商城等，往往会使用第三方服务来处理支付业务，所以需要独立IP，而一些第三方应用和脚本也需要独立IP才能使用。

帮助SEO优化排名
一方面，独立IP空间为用户提供了更安全稳定的高层环境，不必承担搜索引擎共享IP的惩罚和裙带关系的拖累，因此独立IP有利于SEO优化。 另一方面，一些国外的搜索引擎优化师认为独立IP更受搜索引擎欢迎，他们可以有更好排名的想法在SEO行业争论了很长时间，但大多数谷歌排名靠前的网站 是独立IP。 证据。

实现泛域名解析
使用独立IP得到的泛域名解析的结果是，只要用户输入一个域名，并且该域名中包含你的网站域名，甚至你的部分域名都可以解析到你的网站，这也是 一个分支以获得更多的流量。

IP接入网站
与共享IP不同，由于专用IP只指向一个网站，这样做的好处是当域名出现问题时，仍然可以通过提示专用IP访问来留住老用户。 从另一个意义上说，独立IP访问的方式更方便，管理也更好。
How Powerful Step-Back Prompting Transforms LLM Performance
Tags: promptengineering, llm, ai, datascience
Published: 2023-10-31 03:11:32

Navigating the world of prompt engineering can be challenging, even for those seeking to unlock the potential of AI language models such as GPT-4.

 This craft involves creating instructions that are clear, unbiased, and specific enough to guide AI towards better Answers.

It’s not just about avoiding confusion or misinterpretation, but also about ensuring AI doesn’t respond to biased, offensive, or overly wordy content.

 For those who master prompt engineering (prompt Langchain), it opens up a world of possibilities for more effective, ethical interactions with AI.

In this easy-to-follow guide, we are going to see a complete example of how to use Step Back Prompting to improve performance.

I am thrilled to try out Langchain AI’s new support for Prompting, especially as someone passionate about Prompting

[This article was originally published on here](https://quickaitutorial.com/how-powerful-step-back-prompting-transforms-llm-performance/)
Hide email address on website
Tags: webdev, website, web, webscraping
Published: 2023-10-31 03:07:27

Here a basic tutorial on use veilMail.io to [hide email address from spammers](https://veilmail.io) using JavaScript. This method helps to protect your email address from being easily harvested by bots.

1. **Create a new HTML file:**
   Start by creating a new HTML file for your web page. You can use a simple text editor like Notepad or any code editor of your choice.

2. **HTML Structure:**
   Set up the basic structure of your HTML file.

   ```html
   <!DOCTYPE html>
   <html lang="en">
   <head>
       <meta charset="UTF-8">
       <meta name="viewport" content="width=device-width, initial-scale=1.0">
       <title>Your Website</title>
   </head>
   <body>
       <!-- Your website content will go here -->
   </body>
   </html>
   ```

3. **Add the JavaScript code:**
   Insert the following JavaScript code within the `<head>` tags of your HTML file.

   ```html
   <script type="text/javascript">
       // Function to generate the email link
       function generateEmailLink() {
           var user = "your-email"; // Replace with your email username
           var domain = "your-domain.com"; // Replace with your email domain
           var mailtoLink = "mailto:" + user + "@" + domain;

           // Set the href attribute of the anchor tag to the mailto link
           document.getElementById("emailLink").setAttribute("href", mailtoLink);
           document.getElementById("emailLink").innerHTML = user + "@" + domain;
       }
   </script>
   ```

4. **Insert the email link:**
   In the `<body>` section of your HTML file, insert an anchor tag where you want the email address to appear.

   ```html
   <p>Contact us at <a id="emailLink" href="#" onclick="generateEmailLink();">Loading...</a></p>
   ```

5. **Call the function:**
   At the end of your HTML file, call the `generateEmailLink` function to generate the email link.

   ```html
   <script type="text/javascript">
       // Call the function to generate the email link
       generateEmailLink();
   </script>
   ```

6. **Replace placeholder values:**
   Replace "your-email" and "your-domain.com" in the JavaScript code with your actual email username and domain.

7. **Test your page:**
   Save your HTML file and open it in a web browser to test if the email link is working correctly.

Remember that determined users can still find ways to extract email addresses from websites. This method simply adds a layer of protection against automated bots.

PRO TIP: Use VeilMail.io to [hide email address from spammers](https://veilmail.io)
Create your own calculator
Tags: hack23maintainer, beginners, opensource, javascript
Published: 2023-10-31 02:41:54

### Intro
For some years now, participating as a supporter during Hacktoberfest editions, small projects are always offered to the beginner public, so that they can make a valid contribution and learn more about how to contribute in the correct way.

{% embed https://github.com/RuanAragao %}

### Project
The project I focused on in this edition was a calculator, yes, but I'll explain it better below.

The proposal is for users to create their own calculators. The project has an `index.html` which has a title and links to each calculator. There is also a directory called `calculators`.

{% embed https://github.com/RuanAragao/calculator %}

The contributor creates an issue explaining the function of his calculator (his proposal), he must create his calculator following some basic rules: it will be created within the `/calculators` directory and within its own directory; there should be at least one file called `index.html`; add the relative link of the calculator to the list of links in the main `index.html`.

```text
calculator
├── calculators
│   └── my-awesome-calculator
│       ├── index.html
│       ├── style.css (optional)
│       └── script.js (optional)
└── index.html
```

File and directory names should follow the _Kebab Case_ convention.


### Highs and Lows
The challenge of managing people, especially when there are prizes involved. This edition I noticed something new, the generation of code through AI, not just snippets of code, but the entire code, and often the participants had no idea how the code that was generated worked.

I expected this, but it is still something that causes a certain sadness in us, especially when the person is not worried about learning, about receiving feedback, but just wants to push any PR up to the repository and repeatedly asks us to accept the PR.

But overall it was really cool, many were there genuinely contributing.

### Growth
Without a doubt, it was really cool to participate again this time and get the community moving a little, especially allowing some people to contribute for the first time in their lives. I am finishing this edition with more experience in managing projects involving people of multiple nationalities and levels of knowledge.
🚀 Explorando a Eficiência da Arquitetura Hexagonal em Projetos Golang! 🚀
Tags: webdev, go, backend, programming
Published: 2023-10-31 01:45:06

A arquitetura hexagonal, também conhecida como arquitetura de portas e adaptadores, é um padrão de design que promove a modularidade e a testabilidade em sistemas de software. Essa abordagem busca isolar o núcleo da lógica de negócios do restante do sistema, facilitando a manutenção, a evolução e a testagem automatizada. Ao aplicar a arquitetura hexagonal a projetos em Go (Golang), podemos aproveitar os benefícios dessa linguagem eficiente.
[Leia o artigo](https://www.linkedin.com/pulse/arquitetura-hexagonal-em-projetos-go-golang-jo%25C3%25A3o-pedro-rafael-silva-g5xgf/?trackingId=oxT%2F8XJoT9COv7f3Bt87iA%3D%3D)
New Product Launches in the Apple Event
Tags: news, apple
Published: 2023-10-31 01:24:58

---
title: New Product Launches in the Apple Event
published: true
tags: news,discuss,apple
canonical_url: https://firstfinger.in/apple-new/
---

## 1. New M3 Family with 3nm Fabrication Process

![New Product Launches in the Apple Event](https://firstfinger.in/content/images/2023/10/Screenshot-2023-10-31-at-5.35.58-AMCompress.webp)

![New Product Launches in the Apple Event](https://firstfinger.in/content/images/2023/10/Screenshot-2023-10-31-at-5.36.34-AMCompress.webp)

![New Product Launches in the Apple Event](https://firstfinger.in/content/images/2023/10/Screenshot-2023-10-31-at-5.41.11-AMCompress.webp)

![New Product Launches in the Apple Event](https://firstfinger.in/content/images/2023/10/Screenshot-2023-10-31-at-5.41.26-AMCompress.webp)

![New Product Launches in the Apple Event](https://firstfinger.in/content/images/2023/10/Screenshot-2023-10-31-at-5.41.55-AMCompress.webp)

![New Product Launches in the Apple Event](https://firstfinger.in/content/images/2023/10/Screenshot-2023-10-31-at-5.42.09-AMCompress.webp)

* * *

## 2. The New 14" & 16" MacBook Pro in Space Black Colour with M3 Processor

![New Product Launches in the Apple Event](https://firstfinger.in/content/images/2023/10/Screenshot-2023-10-31-at-5.54.27-AMCompress.webp)

![New Product Launches in the Apple Event](https://firstfinger.in/content/images/2023/10/Screenshot-2023-10-31-at-5.50.27-AMCompress.webp)

![New Product Launches in the Apple Event](https://firstfinger.in/content/images/2023/10/Screenshot-2023-10-31-at-5.50.55-AMCompress.webp)

* * *

## 3. The New 24" iMac with M3 Processor

![New Product Launches in the Apple Event](https://firstfinger.in/content/images/2023/10/Screenshot-2023-10-31-at-5.58.21-AMCompress.webp)
My Java Memo
Published: 2023-10-31 01:14:59

Various findings that would help me later.
## java: cannot find symbol error
For example `List#getFirst` method is a default method of the interface that is implemented since version 21. This doesn't compile well in IntelliJ with default settings.

To make the project allow compiling in Java 21, uncheck the `--release` option, as the binary won't be compatible with older Java.

![Uncheck release option](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/h1m9u5xe61z79fswezrw.png)
New Feature in BukuRain
Tags: osd600
Published: 2023-10-31 01:03:06

I have introduced a new feature to my CLI static site generator, which is support for syntax highlighting in code blocks.

### How it Functions

When a Markdown file is passed to our system, we parse all code blocks enclosed by triple backticks  line by line. We also identify the code's programming language. We then construct a `<pre>` tag with a `<code>` tag inside it, encapsulating the code lines. This code block is given a class corresponding to the language, enabling Prism to apply the appropriate styling.

I implemented this feature because I believe it greatly enhances the presentation of code snippets in web browsers, making them clearer and more comprehensible.

### Docusaurus Influence

While reading the Docusaurus documentation last week for my class project, I was struck by the appealing design of code blocks. The ability to copy code with a simple click further impressed me.

I originally conceived the idea of parsing Markdown using a separate parsing function and later integrating it with the main parsed text. I also utilized Prism for syntax highlighting. However, at present, I'm generating HTML with Prism even when it's not Markdown, which should be addressed. The only current distinction in my implementation is that I've streamlined it, as it's a raw implementation, with planned future enhancements.

I will continue working on this feature and will likely create a Trello board to help me stay organized, as I sometimes struggle with maintaining a consistent work schedule. For now, there are a few open issues that address basic functionality and some bugs, which you can find [here](https://github.com/pbelokon/BukuRain)
What I Learned From Hacktoberfest 2023
Tags: hack23contributor
Published: 2023-10-31 00:59:59

This is not my first Hacktoberfest rodeo, but last year was. As far as 'open source' as a culture, I'm still very new. I actually don't have lots of experience with Git either. Although I've developed dozens of websites over the years, made chrome plugins, Wordpress and Shopify plugins, and a few bots- it wasn't until I went back to school to finally get my Computer Science degree that I realized how insignificant what I could do really was. You see, it always earned me a living and I didn't do much else, so I didn't know how (er... stupid) I was really until I started actually trying to become a 'real' developer.

I tried my hand at Hacktoberfest last year but I got only 3 out of 4 merges complete. I had no idea what I was doing so I was really proud of what I did do. This year my goal was to complete Hacktoberfest, but mostly to REALLY learn Git and Github.

### Highs and Lows
I decided to make a repository with a theme switcher. I thought I was doing it right modeling after others but I found out later it got excluded because it was too simple. It broke some of the community standards but I think it was more in my approach. I didn't know that it was a red flag to use hacktoberfest in my repo name. And I got really caught up with the celebration, inviting dozens of people (some who don't even code) to learn about open source by practicing in my repository. Even though it was excluded, I'm still really happy that we made something that's now a free resource (even though it's simple and anyone could do it.) It was really tough for the non-coders at my school to try something they never did before. And it was exciting for me to learn about running a repo that other people contributed to. As for my own contributions, I decided to engage with a partner to Hacktoberfest: Illacloud. I worked on contributing AI agents to their community, and I signed up for their platform for a real subscription to learn about low-code App development. I also participated in Global Hack Week.

### Growth
This year I learned a lot more about Git and Github, mainly from the maintainer side. My repo was rejected, but I still gained valuable skills learning the other side of the fence. I also learned a lot about how to INQUIRE about how to help with a project that wasn't my own. And about the flow of how to contribute, wait, go back and forth, and finally submit something worth merging.

Through this experience I'll be better prepared and experienced for next year. Persistence and optimistic mindset will take me ahead. I think I almost know enough Java (through school) now to make a program to REALLY start an open source project (not for Hacktoberfest) or contribute to others without breaking them or wasting anyone's time, so I'm excited about that.
Free AWS Digital Badges - Boost Your Career and Job Prospects
Tags: aws, awstraining, awsdigitalbadges, freeawsdigitalbadges
Published: 2023-10-31 00:58:06

AWS is offering free Digital Badges as part of its training program. These are some great ways to get hours of free training from AWS and get certified.

**All the steps to get yourself started are listed in the link below.**

https://aws.amazon.com/training/badges/


1. Register for a free AWS Skill Builder account.

2. Enroll in select Learning Plans that offer a digital badge upon passing the corresponding assessment.

3. Complete the assessment associated with the learning plan with at least an 80% score.

4. Create a Credly account to claim your digital badge.

 
**Bellow are the listed trainings provided free digital badges.**


1. Migration Foundations (new!): https://lnkd.in/g88Zsrn3

2. Networking Core (new!): https://lnkd.in/gAeKA27u

3. Cloud Essentials: https://lnkd.in/gEMHQEtX

4. Media & Entertainment: https://lnkd.in/gPg8u4mz

5. Architecting: https://lnkd.in/gYaAgXBM

6. AWS for Games: https://lnkd.in/g7a5Jjwi

7. Serverless: https://lnkd.in/gQavBp5K

8. Object Storage: https://lnkd.in/gAA_3q8U

9. Block Storage: https://lnkd.in/gEAApKty

10. File Storage: https://lnkd.in/gZHx6iUQ

11. Storage Data Migration: https://lnkd.in/gq392QSq

12. Data Protection & Disaster Recovery: https://lnkd.in/gvQEhezx

 
Full credit to above list goes to Viktoria Semaan (https://www.linkedin.com/in/semaan). You can follow her in LinkedIn for some of the great content she is sharing related to AWS.