teleren/devto huggingface dataset:
A HackerNews clone built with Next.js and shadcn/ui
Tags: nextjs, react, typescript, showdev
Published: 2024-04-02 02:56:47

## Introduction
[Next.js Hackernews](https://github.com/WhiteDG/nextjs-hackernews) is an open-source hackernews clone written in TypeScript and built with Next.js and shadcn/ui.

- Utilizes the latest Next.js features, including App Router, RSC, and Server Action.
- With a stunning UI powered by shadcn/ui, it seamlessly adapts to both desktop and mobile environments, providing an exceptional user experience.
- Data is retrieved from various sources, including the official API](https://github.com/HackerNews/API), [official website](https://news.ycombinator.com/), and [HnAlgolia API](https://hn.algolia.com/api).
- Feel free to explore a [live demo](https://nextjs-hackernews-omega.vercel.app/)!

## Features
- Next.js App Router
- React Server Components (RSCs) and Suspense
- Server Actions for mutations
- Beautifully designed components from shadcn/ui
- Styling with Tailwind CSS
- Browse stories: Top, Newest, Best, Show, Ask, Jobs.
- Search for stories.
- User authentication: Create an account or log in using your Hacker News account to access personalized features.
- Mark stories as favorite.
- Upvote stories or comments.
- Add comments.
- View user profile: About, Submitted, Comments, Favorites, Upvoted(private).
- Responsive design: Friendly to both mobile and desktop.
- Automatic light/dark mode based on system settings.

## Screenshots

### Desktop
![index-desktop](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/l71fslm3763mv5lhsjyt.png)

![story-desktop](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2uofp4lxhcqrbuv2eer9.png)

![upvoted-desktop](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qoi6d4b7tuk1tqu05l4i.png)

![login-desktop](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/c16uv4vl01jwf2n9ckmv.png)

### Mobile

![index-mobile](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7btddta0lmhgabn8pklv.png)

![story-mobile](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8iqueuqwpjz1dqr38zeg.png)

![upvoted-mobile](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9rpmgn01glp0n1vfa7g3.png)

![login-mobile](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/y3ce5ep3xooxl2tlhpjq.png)

## Running Locally
Requires Node.js 18.17 or later.

- Clone the project.
```bash
git clone https://github.com/WhiteDG/nextjs-hackernews.git

cd nextjs-hackernews
```
- Install dependencies.
```bash
pnpm install
```
- Copy `.env.example` to `.env.local` and update the variables.
```bash
cp .env.example .env.local
```
- Run the development server with hot reload.
```bash
pnpm dev
```
- Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
- Build for production
```bash
pnpm run build
```
- Serve in production mode
```bash
pnpm start
```

For more information, see: https://github.com/WhiteDG/nextjs-hackernews
Its 2024. Software Development has changed. Completely.
Published: 2024-04-02 02:47:57

In this conversation, Krish discusses the need for software development to evolve. He emphasizes the importance of adapting to change and exploring new ways of doing things. Krish also highlights the role of AI in software development and the potential benefits it can bring. He encourages reevaluating problem-solving approaches and finding more efficient ways to document and create tickets. Ultimately, Krish emphasizes the need to embrace change and stay ahead in the rapidly evolving software industry.

### Takeaways

- Software development needs to evolve by adapting to change and exploring new approaches.
- AI can play a significant role in improving software development processes and delivering solutions more efficiently.
- Problem-solving approaches should be reevaluated to ensure they are still relevant and effective.
- Efficient documentation and ticket creation processes can enhance productivity and collaboration.

### Chapters

00:00 Introduction
01:01 Adapting to Change
03:54 Reevaluating Problem Solving
05:18 Approaching Documentation
06:40 Efficient Ticket Creation
07:08 Embracing Change

### Summary

**Overview:**
   - Discusses the need to adapt to changes and explores the two approaches to software development: traditional methods versus evolving methods utilizing AI.
   - Mentions the incorporation of AI tools like GitHub Copilot and its impact on productivity.
  
**Importance of Embracing AI:**
   - Emphasizes the significance of integrating AI into software development processes.
   - Talks about Snowpal's plans to venture into AI development and stresses the genuine integration of AI for tangible benefits, not just for trendiness.
   - Encourages reevaluation of problem-solving approaches in light of AI capabilities.
  
**Rethinking Documentation and Workflow:**
   - Discusses the necessity of rethinking documentation practices and workflow methodologies to align with modern software development trends.
   - Highlights the importance of efficiently translating requirements into actionable tasks, such as GitHub tickets, with minimal human intervention.
   - Indicates the need for seismic shifts in how requirements are documented and tasks are managed.

**Conclusion:**
   - Concludes by reflecting on the evolving nature of software development and the imperative for continuous adaptation.

### Podcast

{% embed https://youtu.be/x22o2QtOHQc %}

### Transcript

https://products.snowpal.com/api/v1/file/22bf0ffb-94bf-46f8-9ce9-c3c495bc1f9d.pdf
Top Đồng Tháp AZ
Tags: topdongthap, topdongthapaz, tinhdongthap
Published: 2024-04-02 02:27:55

Top Đồng Tháp AZ
Trang web Top Đồng Tháp AZ là một nền tảng trực tuyến được tạo ra từ tầm nhìn và sứ mệnh vượt bậc của nhóm tác giả tham gia cuộc thi viết về quê hương, do ZMar tổ chức. Trang web này không chỉ là một góc kết nối, chia sẻ mà còn là bảo tàng tinh thần, ghi chép cuộc hành trình tìm hiểu, đắm chìm vào vẻ đẹp tinh thần và văn hóa của quê hương Đồng Tháp.
#topdongthap, #topdongthap, #topdongthapaz, #topdongthapaz, #tinhdongthap, #tinhdongthap
WEBSITE: https://topdongthapaz.com
SOCIAL MEDIA 
https://www.reddit.com/user/topdongthapaz/
https://www.pinterest.com/topdongthapaz/
https://www.linkedin.com/in/topdongthapaz/
https://www.youtube.com/@topdongthapaz
https://www.facebook.com/profile.php?id=61557884040355
Singapore Plastic Surgeon
Tags: plasticsurgeon, cosmeticsurgeon, plasticsurgery
Published: 2024-04-02 02:25:36

Dr. Leo Kah Woon is a qualified Plastic Surgeon credited by the Ministry of Health of Singapore. After he gained his M.B.B.S from the National University of Singapore, he boarded on his Basic Surgical Training in General Surgery at Singapore General Hospital. See here [https://www.drleoplasticsurgery.com/](http://www.drleoplasticsurgery.com/)
Simple Bash Scripts
Tags: ramadhanbersamaredhat, kopikleponcampursusuenak
Published: 2024-04-02 02:25:30

## BASH SCRIPTS

Skrip Bash shell adalah alat yang kuat untuk mengotomatisasi tugas-tugas administrasi sistem di lingkungan Linux. Dengan menggabungkan perintah Linux dalam skrip, tugas-tugas yang berulang dan kompleks dapat diselesaikan dengan mudah. Skrip shell dapat mengandung logika pemrograman untuk pengambilan keputusan dan pengulangan, memungkinkan penyelesaian tugas yang lebih kompleks. Kemahiran dalam skrip shell sangat penting untuk meningkatkan efisiensi dan akurasi dalam penyelesaian tugas rutin di lingkungan perusahaan.

**Specifying the Command Interpreter**

Baris pertama suatu naskah diawali dengan notasi ' #!', biasa disebut sh-bang atau she-bang, dari nama kedua karakter tersebut, sharp dan bang. Notasi dua byte khusus ini magic number menunjukkan skrip interpretatif; sintaks yang mengikuti notasi adalah nama file yang sepenuhnya memenuhi syarat untuk command interpreter kebutuhan yang benar untuk memproses baris skrip ini. Untuk memahami cara magic numbers menunjukkan tipe file di Linux, lihat halaman manual file(1) dan ajaib(5) . Untuk file skrip yang menggunakan sintaks skrip Bash, baris pertama skrip shell dimulai sebagai berikut:


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

**Running a Bash Shell Script**

Anda dapat menggunakan perintah berikut untuk menambahkan izin eksekusi pada skrip shell Anda dan mengubah kepemilikan agar hanya pengguna yang dituju yang memiliki izin untuk mengeksekusi skrip tersebut:

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

Untuk menjalankan skrip shell yang telah diberi izin eksekusi, Anda dapat mengetikkan nama file skrip tersebut langsung jika direktori tempat skrip tersebut berada terdaftar dalam variabel PATH shell Anda. Jika tidak, Anda harus menyertakan jalur lengkap ke skrip tersebut. Untuk menemukan jalur lengkap suatu perintah, Anda dapat menggunakan perintah which. Misalnya:

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/oxcvk0xallv5x9e9602b.png)
Perintah tersebut akan menampilkan jalur lengkap ke skrip yang dapat dieksekusi.

**Basic Bash Functions**

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

> Untuk menulis atau meninggalkan catatan dalam file, tambahkan simbol #.

Bash script mendukung:

- While loop
- For loop
- If statement
- And logic
- Or logic
- Else If statement
- Case Statement

Di bawah ini merupakan contoh While loop.

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

Contoh di atas menggunakan statement while dan dan if. Script tersebut mengeksekusi while loop sebanyak 5 kali sebelum keluar setelah memeriksa statemen kondisional if.

Outputnya akan seperti ini:

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8p60afyza2f1oiuo2dd9.png)
Death.org.sg Funeral Services in Singapore, Best Funeral Planning and Vendors
Published: 2024-04-02 02:14:59


In the solemn realm of [funeral services Singapore](https://death.org.sg/), navigating the process with sensitivity and care is of utmost importance. Families dealing with loss often find solace in a well-organized and thoughtful funeral service that pays homage to their loved ones. From selecting an appropriate venue to coordinating religious ceremonies or cultural traditions, funeral planning encompasses various aspects that require meticulous attention to detail. Choosing a funeral planning service in Singapore that understands and respects diverse cultural and religious practices is crucial in ensuring a meaningful and dignified farewell.
At Death.org.sg Funeral Services, we understand the emotional weight that accompanies funeral planning. As a trusted funeral planning service in Singapore, we offer comprehensive support to grieving families, guiding them through the process with compassion and professionalism. Our dedicated team is well-versed in the intricacies of various cultural and religious funeral customs, ensuring that each service is tailored to honor the individuality of the departed. From venue arrangements to coordinating memorial rituals, we strive to provide a comforting and respectful environment during this challenging time.
Elevate the funeral planning experience with Death.org.sg Funeral Services – your compassionate partner in creating meaningful farewells. Contact us today to discuss personalized funeral arrangements that honor the life and legacy of your loved ones.
https://death.org.sg
Embed Codes on Dev.to Using Liquid Syntax with Code Runner
Tags: javascript, beginners, programming, howtodevto
Published: 2024-04-02 02:14:57

Instead of images from carbon or using code highlighting there is one more interactive way to show the code with preview and code runner. So that people can also edit and see the results for satisfaction and clarity.

{% youtube https://www.youtube.com/watch?v=yEWLR9kcFPY %}

```python
printf('Some Python Here! 🔥')
```

See Markdown behind this Post :-https://dev.to/api/articles/sh20raj/embed-codes-on-devto-using-liquid-syntax-with-runner-3hl4 | See on [Codes20](https://codes20.github.io/95944e83e105c5c8f926ea6892705377)

`{% embed https://... %}`

## Embed JavaScript 

### runkit

{% runkit
// hidden setup JavaScript code goes in this preamble area
const hiddenVar = 42
%}
// visible, reader-editable JavaScript code goes here
let i = 23;
console.log(hiddenVar,i)
{% endrunkit %}



---

## Embed Python

### Stackblitz
{% embed https://stackblitz.com/edit/secret-python-svndnu?ctl=1&embed=1&file=main.py&hideExplorer=1&hideNavigation=1&theme=dark&view=editor %}

## Embed HTML

### Glitch

{% embed https://glitch.com/edit/#!/sopdrive %}

### Codepen

{% codepen https://codepen.io/SH20RAJ/pen/dyLZgJj %}

Alternatives - JSFiddle, JSitor...

## Php/Typescript

### Replit

{% embed https://replit.com/@SH20RAJ/svg-pack %}

### Gist
{% gist https://gist.github.com/SH20RAJ/70640802273639038942447c650fcc64 %}
Many of the services are allrounder like stackblitz, CodeSandbox and replit . So you can edit many programming languages


You can embed Python code or use it as a Python runner in the following platforms:

- CodePen
- CodeSandbox
- GitHub Gist, Issue or Repository
- Glitch
- JSFiddle
- JSitor
- Kotlin (as a language, can be used for Python)
- Medium (in articles or stories)
- Next Tech
- Reddit (in code blocks or posts)
- Replit
- StackBlitz
- Stackery
- Stack Exchange or Stack Overflow (for sharing code snippets)
- Twitch (for live coding)
- Twitter (in code blocks or tweets)
- Wikipedia (in code examples or articles, although not a typical use case)

These platforms either support embedding Python code directly or can be used for running Python code in various contexts.


For more you can refer to [Editor Guide](https://dev.to/p/editor_guide)

Follow me on GitHub :- https://github.com/SH20RAJ?tab=repositories

> :bulb: **Tip:** You can also use codepen, jsitor or jsfiddle with inside iframe code to add non - supporting website as iframe. i.e. embedding trinket.io code block `<iframe src="https://trinket.io/embed/python/edd948bf08" width="100%" height="356" frameborder="0" marginwidth="0" marginheight="0" allowfullscreen></iframe>`

{% codepen https://codepen.io/SH20RAJ/pen/qBwVJLy %}
---
FLY.IO
Published: 2024-04-02 02:12:57

Hey there! Your blog post was amazing! 🎉 Loved those insights 😍 Super valuable stuff that got me buzzing! Your blog layout was on point too – made it a breeze to follow! Can't wait to implement these ideas and watch my business soar! Oh, I found another gem of an article on the same topic – thought you might dig it, too! 🚀 https://expertguru.ai/blogs/tech-insights/our-savior-fly-io
BEST DIGITAL MARKETING TRAINING CENTER IN JAIPUR.
Tags: tally, digitalmakreting, seo, graphicdesign
Published: 2024-04-02 02:12:36

**[Digital marketing](https://gpscomputeracademy.com/courses/) is also know
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/krwom0rrx7imwe3x8mvj.png)n as online marketing. It includes the online promotion of any brand or company for connecting to the potential customers. Example of Digital marketing is social media, e-mail, search engine optimization (SEO), Pay per click (PPC). Career option in Digital marketing: - Digital marketing can be a good career option for you. It is one of the highest paid jobs in India.******
"Day 54 of My Learning Journey: Setting Sail into Data Excellence! Today's Focus: Maths for Data Analysis ( Perm & Comb - 9)
Tags: dataengineering, datascience, analyst, data
Published: 2024-04-02 02:12:26

PERMUTATION AND COMBINATION - 9



Alike Objects 

Permutation of Alike Objects :- 

Arrangement :- 

Q1. 4 objects ( alike ) in how many ways can you arrange them ?

AAAA only in 1 way.

Explanation :- 

No. of arrangements if they are different = 4!
But in this case all are alike so, = 4! / 4! = 1

Q2. 3 objects  and other 2 objects( alike ) in how many ways can you arrange them ?

AAABB 

Explanation :-
 
No. of arrangements if they are different = 5!
But in this case all are alike so, = 5! / 3! * 2!







Q3.A,A,B,B,B,C,C,D,D,D,D 
 In how many ways can you arrange them ?

Explanation :- 

No. of arrangements if they are different = 11!
But in this case all are alike so, = 11! / 2! * 3! * 2! * 4!


WHY WE DIVIDE to get the correct answer because they are not the same.



Combination of Alike Objects :- 

Selection :- 

Q1. consider some objects
        A,A,B,B,B,C,C?
	
IN HOW MANY WAYS WE CAN SELECT ONE OBJECT ?

	NO. OF UNIQUE OBJECTS


IN HOW MANY WAYS WE CAN SELECT TWO OBJECTS ?

	Bucket method :- 
	 1 bucket - AA 
2 bucket  - BBB
3 bucket  - CC
	
	WE HAVE TO USE A BUCKET METHOD. 
BOTH DIFFERENT - 3c2
	BOTH ALIKE  - 3c1


3C2 MEANS there are 3 buckets and we need both to be different so, at least we need to select 2 buckets where we can select different objects.





IN HOW MANY WAYS WE CAN SELECT THREE OBJECTS ?

Bucket method :- 
	 1 bucket - AA 
2 bucket  - BBB
3 bucket  - CC
	
	WE HAVE TO USE A BUCKET METHOD. 
ALL DIFFERENT - 3c3
	ONE ALIKE TWO DIFFERENT  - 3c1 * 2c1
	ALL SAME - 1




This is the last CLASS for Permutation and Combination.

From Today Onwards I will be Starting Probability.


Feel free to share this post to enhance awareness and understanding of these fundamental concepts in statistical analysis!


🙏 Thank you all for your time and support! 🙏
A testable Go API using Gin + MongoDB + Testcontainers
Tags: go, mongodb, api, learning
Published: 2024-04-02 01:46:43

At my day-to-day, I work mainly with Node.js. Installing `npm` packages, using webpack to bundle stuff and importing named exports in a lot of `.ts` files. NoSQL databases are not too far away from me too.

But in my free time I like to explore new technologies. The Go realm is one of them. When doing this, I feel like I am in a new town: getting to know new places and meeting new people.

After years working with MongoDB and having few experiences when reading and learning about Go, I thought it was time to create something to the Go community. So here it is: a minimal Go boilerplate that is equipped with Gin + MongoDB and testable with Testcontainers.

---

## Why _another-boilerplate-in-an-open-source-repository_?

Starting a project from scratch in Go can be a bit painful, especially when you came from other programming languages like TypeScript.

Considering this and how I read "learn in public" sentence as a moral rule, I have decided to create a Go repository for me which contains Gin + MongoDB to accelerate the creation of APIs using these tools.

Feel free to use this repository to learn more about Testcontainers, which I consider to be the more powerful thing in this boilerplate. If you want to know more about the template, keep reading. Want to jump directly to the code? [Feel free to do so!](https://github.com/ericbsantana/gogimon)

## What are these Testcontainers and why should I use them?

The chef's kiss of this template is the usage of [Testcontainers](https://golang.testcontainers.org/) to make integration tests in the application's handlers.

This will help me in the future when building a more complex structure using another services like Kafka or Redis. 

The best thing about using Testcontainers is to able to make integration tests and maintain your codebase fully testable if you use it correctly.

## What were your difficulties when developing this project?

The most painful one was that I was not able to make [Air](https://github.com/cosmtrek/air) work well with Docker: for some reason, my docker-compose file was not making the live-reload work correctly.

Still, the project works fine running `go run main.go` or install Air and run with `air` natively.

I have also tried to follow a dependency injection pattern in this boilerplate, which helped a lot when creating the tests for the handlers.

## Conclusion

We could indeed use other tools to make tests. You could mock the repositories or find an library that helps to do them. I honestly do not know if there is a `mongodb-memory-server` like or equivalent to Go, but would be very happy to know if that is the case. 

If you are interested in using Testcontainers in Go and do not want to do all the groundwork, feel free to use my template that is available here: [gogimon](https://github.com/ericbsantana/gogimon).
Managing Basic Storage
Tags: ramadhanbersamaredhat
Published: 2024-04-02 01:45:30

Pemartisian Disk

Pemartisian disk memungkinkan administrator sistem untuk membagi hard drive menjadi beberapa unit penyimpanan logis, yang disebut partisi. Dengan memisahkan disk menjadi partisi, administrator sistem dapat menggunakan partisi yang berbeda untuk melakukan fungsi yang berbeda.

Skema Pemartisian MBR

Sejak tahun 1982, skema pemartisian Master Boot Record (MBR) telah mengatur bagaimana disk dipartisi pada sistem yang menjalankan firmware BIOS. Skema ini mendukung maksimal empat partisi primer. Pada sistem Linux, dengan menggunakan partisi tambahan dan logis, administrator dapat membuat maksimal 15 partisi. Karena data ukuran partisi disimpan sebagai nilai 32-bit, disk yang dipartisi dengan skema MBR memiliki ukuran disk dan partisi maksimum 2 TiB.

Skema Pemartisian GPT

Untuk sistem yang menjalankan firmware Unified Extensible Firmware Interface (UEFI), GPT adalah standar untuk menyusun tabel partisi pada hard disk fisik. GPT adalah bagian dari standar UEFI dan mengatasi banyak keterbatasan yang diberlakukan oleh skema berbasis MBR yang lama.

GPT menyediakan maksimal 128 partisi. Berbeda dengan MBR, yang menggunakan 32 bit untuk menyimpan alamat blok logis dan informasi ukuran, GPT mengalokasikan 64 bit untuk alamat blok logis. Hal ini memungkinkan GPT untuk menampung partisi dan disk hingga delapan zebibyte (ZiB) atau delapan miliar tebibyte.

Selain mengatasi keterbatasan skema pemartisian MBR, GPT juga menawarkan beberapa fitur dan manfaat tambahan. GPT menggunakan identifikasi global unik (GUID) untuk mengidentifikasi setiap disk dan partisi. Berbeda dengan MBR, yang memiliki satu titik kegagalan, GPT menawarkan redundansi informasi tabel partisinya. GPT primer berada di bagian awal disk, sedangkan salinan cadangan, GPT sekunder, berada di bagian akhir disk. GPT menggunakan checksum untuk mendeteksi kesalahan dan kerusakan pada header GPT dan tabel partisi.
Ambience PR Agency for Interior Designers Brands Public Relations Singapore
Published: 2024-04-02 01:44:19


Ambience PR, a specialised [PR agency for interior designers](https://ambiencepr.com) within the Presence Marketing Group, is dedicated to providing PR services tailored for the interior design and living industry.

Recognizing a gap in the market for home and living brands seeking effective product showcasing within the design niche, Presence decided to establish Ambience PR as a distinct business division. This division comprises expert PR professionals from the industry who fluently speak the same language as the brands and designers, enhancing the ability to authentically share their stories.

From marbles to laminates, furnishings, lamps, to sanitary fittings, Ambience's adept team has covered a diverse spectrum.
Having achieved great success, Ambience PR has collaborated with notable designer brands such as Tempur, Kohler, TOTO, Roca, Fritz Hansen, Wilkahn, King Living, and Picket and Rail.

Transform your brand's narrative with Ambience PR, where expertise meets the unique language of the interior design and living industry. Contact us today to elevate your brand storytelling and make a lasting impact in the market.
[https://ambiencepr.com](https://ambiencepr.com)