teleren/devto huggingface dataset:
🌱 How I realized my website was affecting climate change 🌡️
Tags: webdev, performance, development, architecture
Published: 2023-10-19 16:04:13

In the fast-paced world of web development, we often focus on aspects such as attractive design, cutting-edge functionality and intuitive user interfaces. **_But how often do we stop to think about the environmental impact of our digital creations?_** I confess that, for a long time, this aspect escaped my attention. That all changed when I decided to explore the environmental impact of my own website. And what I discovered left me shocked.

## 🔥 The call to attention

The idea of examining the environmental impact of my website came about casually. I was involved in a discussion about climate change and it occurred to me that if even large data centers consume huge amounts of energy, how much energy was my modest website consuming? So I decided to do something we rarely do: measure the environmental impact of my web pages.

## 🌡️ The shocking discovery

To begin with, I used a web performance evaluation tool to analyze my website; it was https://www.websitecarbon.com. What I discovered left me speechless: my site was slow, heavy and required a huge amount of energy to load since it was a very large blog on wordpress (50K visits per month).

## 🌐 My website's carbon footprint
As I examined the data, I discovered that my website had a considerable carbon footprint. Every time someone visited my site, it emitted more CO2 than I ever thought it would. Unoptimized images, unused scripts and CSS, and a number of plugins were the problem in all of this. My website was polluting far more than I had ever imagined: **every year a 99000 km trip of a car, absurd right?**


![Me when i realized my website impact](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/t63xwpmts3c0gixjyixk.jpg)

All this for the mere convenience of having a ready-made wordpress website. I knew all along that it was not the best performing choice, but for convenience and the large amount of traffic, I decided to use it anyway.

I realized that if my website was so damaging, who knows how many other websites were having an even greater impact on the environment?

## 🌱 Rebirth: Toward a sustainable web

My discovery prompted me to embark on a journey toward digital sustainability. I began optimizing my websites more efficiently by reducing page loads, compressing images, and using performance-conscious technologies. I prefer to spend more time on performance rather than using old technologies that only hurt the environment.

In addition, I have decided that I will start sharing my findings with the community and encourage other developers to evaluate and improve the performance of their websites so that we can improve the environmental impact of our applications.


## 💬 Always communicate 😊

I'm always open to dialogue and knowledge sharing on these topics. Together, we can make the web a better, faster, greener place for everyone. One website at a time.

If you have questions or would like to discuss websites environmental impact and performance, please feel free to contact me! 🚀

Thank you
Day 72: Advice
Tags: webdev, frontend, 100daysofcode, html
Published: 2023-10-19 16:03:09

# Challenge

We have an exciting challenge for you! Your task is to create an HTML and CSS code snippet that shows random advice on clicking the dice icon


![Advise Mentor App](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/co5ux7rrt1ofe3w2bie3.jpg)

### 📰 Details

For the necessary assets, design specifications and api info, please refer to the GitHub repository: [GitHub - Advise Mentor App](https://github.com/dhrn/advice-generator-app)

The solution will be revealed before tomorrow, so stay tuned.

**Note**: This challenge is sourced from Frontend Mentor.
Tip: Never Forget a console.log In Your Patch Again
Tags: tools, git, productivity, softwaredevelopment
Published: 2023-10-19 15:37:55

**TLDR;** stage your changes `git add . -p` to slow down your personal code review process.

Yes, we've all been there. You've spent the last 5 hours looking for a bug in your codebase and finally came up with a fix. You implemented the patch and removed all your log statements or thought you did. You called for a review only to get rejected because you left some unnecessary logs in your patch.

## Have you tried running  `git add` with the `-p` flag?

With `git add <path/to/the/changed/files> -p`, git brings back your changes a chunk at a time or, in git lingo, one hunk at a time.

**Geek bit:** See [here](https://www.gnu.org/software/diffutils/manual/html_node/Hunks.html) for more info about what a hunk is. 

As git gradually reveals the changes you made, it presents the following options:
y - stage this hunk
n - do not stage this hunk
q - quit; do not stage this hunk or any of the remaining ones
a - stage this hunk and all later hunks in the file
d - do not stage this hunk or any of the later hunks in the file
e - manually edit the current hunk
? - print help


**Side Note:**
_For the `e` option, git presents Vim as your default editor. Again, you meet Vim 😈 . To change git's default editor from Vim to vscode, run  `git config --global core.editor = "code"` assuming you have already added vscode to your path variable. I'll advise against this, though; take this opportunity to learn basic Vim motions._

Once git has presented you with all the hunks, you'd be left with only the ones you accepted. The rejected hunks would be left unstaged. Staging your file in git like this allows you to slow down and do a personal code review, allowing you to catch those annoying leftover comments, logs, and debug statements.

## Gotchas

The `-p` flag only works for files already known by git. If you've never staged a file before, git will never present you with hunks from new files because there are no hunks. A hunk is nothing but a diff between the previous version of a file and the newest version, revealed one chunk at a time. There is nothing to diff for a new file, so I like to stage new files with the `-N` flag, i.e., `git add . -N`. The "N" flag does not stage the new file but instructs git that you intend to do so later. Now git knows about the file and will present the entire file to you when you're staging your changes with the `-p` flag.

## Conclusion

I couldn't think of a way to conclude this article, so I inserted a dry joke here.👇🏽

If git is a tool, and this article presents tips about git,  does that make it a tooltip❓🤔

Okay, I'll give you the time to cringe now. See you on the next one.
Teaching Principles Of Assignment Writing
Tags: webdev
Published: 2023-10-19 15:25:20

Time Management:
Stress the significance of time management and planning, including setting deadlines for research, drafting, and revising.

Individuality and Originality:
Encourage students to express their unique voices and perspectives in their assignments. Originality should be valued.

Feedback and Improvement:
Provide constructive feedback on drafts and final assignments, focusing on areas of improvement.
Encourage students to reflect on their feedback and apply it to future assignments.

Ethical Considerations:
Discuss the ethical dimensions of assignment writing, including plagiarism, proper use of sources, and academic integrity to [Do My Online Exam](https://onlineassignmentgeeks.com/online-exam-help/).

Use of Technology:
Explore how technology tools, such as grammar checkers, citation generators, and writing apps, can support the writing process.

Professionalism:
Teach students to follow assignment submission guidelines, such as formatting, file types, and submission methods.

Resources and Support:
Inform students about available writing resources, such as writing centers, writing handbooks, and online guides.
Remember that effective teaching of assignment writing is an ongoing process. It's essential to be patient, provide guidance, and create a supportive environment where students can learn and improve their writing skills over time. Additionally, modeling good writing practices in your own teaching materials and feedback can be highly beneficial for students.
Simple Movie Rec by Genre
Tags: python, beginners, programming, opensource
Published: 2023-10-19 15:23:10

Thanks for taking the time to read this. This is my first self-directed attempt at recommendation software. I am on the Codecademy CS track, and the assignment was to create any form of recommendation software I could come up with, and to include a form of autocomplete that would take minimal user input to suggest options they may have been considering.

I know this could use a little sprucing up, and I think when I have time I may come back and add the larger MovieLens dataset and incorporate the MovieLens ratings dataset to help further refine the user search. Currently this program is using the small MovieLens dataset for academic purposes.

Thanks again for your time!

https://github.com/Oku-Jo/Movie-Recommendations-by-Genre
🤔What to expect from a Backend Development Platform
Tags: go, backenddevelopment, programming, productivity
Published: 2023-10-19 15:13:11

**Encore simplifies your backend development workflow to make development easier and faster.**

## 🌴 No manual infra management 

You no longer need to manage infrastructure complexity. With Encore's [Infrastructure SDK](https://encore.dev/docs/primitives) you can define core components like services, databases, cron-jobs, and pub-sub directly within your codebase.

The upside is that you don't need a separate infrastructure configuration like Terraform, and **all your code is in one language**.

You also avoid being tied to a single cloud provider, because Encore's Infrastructure SDK **makes your app cloud-agnostic**.

## 🙋‍♂️ Running your local environment is extremely simple

Use `encore run` and to set up local versions of your application's infrastructure.

You also get a [local dev dashboard](https://encore.dev/docs/observability/dev-dash) with tools like an API explorer, distributed tracing, and automatic API documentation.


## 🔮 Easy collaboration with Preview Environments

When you make a pull request, Encore sets up a dedicated [preview environment](https://encore.dev/docs/deploy/preview-environments). It's hosted on Encore's free development cloud, where these environments are optimized for quick provisioning, and spin up in less than a minute.

## 🚀 Push to deploy

When you push to production, Encore builds and tests your code, and parses it to determine what infrastructure your application needs. Encore then [provisions the infrastructure directly in your cloud](https://encore.dev/docs/deploy/infra) on GCP or AWS.

## 📈 Flexibility to help you grow

You also have the flexibility to decide deployment strategies because when using the Infrastructure SDK you aren't defining specific cloud-services in code. This means you can run your app on different cloud services in each environment, without making code changes.

## 🛠 Try it yourself 

There's much more to Encore! If you want to get a feel for it, consider [creating a free account](https://encore.dev) and [build an app with a template](https://encore.dev/templates). 

## 🙏 We appreciate your feedback

Join the backend developers hangout on [Slack](https://encore.dev/slack) and share you thoughts! 💙
As a Contributor #2
Tags: hack23contributor, hacktoberfest23, webdev, beginners
Published: 2023-10-19 15:09:39

Hacktoberfest is a great opportunity for contributors to learn new skills, make a positive impact on the world, and have some fun!

Here are some tips for upcoming contributors:

Start early. This will give you more time to learn about the project and to make meaningful contributions.
Be patient. It can take some time for your contributions to be reviewed and merged. Be patient with the maintainers and be willing to make changes based on their feedback.
Don't be afraid to ask for help. The open source community is very welcoming and helpful. If you're stuck on something, don't be afraid to ask for help from the maintainers or from other contributors.
Here are some of my accepted recent contributions to this year's #hacktoberfest23 event as a #hack23contributor:

*e3aevents pull request #12: https://github.com/elwinaugustin/e3aevents/pull/12
*e3aevents pull request #11: https://github.com/elwinaugustin/e3aevents/pull/11
*e3aevents pull request #10: https://github.com/elwinaugustin/e3aevents/pull/10
*creative-engineering pull request #8: https://github.com/elwinaugustin/creative-engineering/pull/8
*creative-engineering pull request #7: https://github.com/elwinaugustin/creative-engineering/pull/7
*creative-engineering pull request #6: https://github.com/elwinaugustin/creative-engineering/pull/6
*creative-engineering pull request #4: https://github.com/elwinaugustin/creative-engineering/pull/4
*creative-engineering pull request #5: https://github.com/elwinaugustin/creative-engineering/pull/5
*creative-engineering pull request #3: https://github.com/elwinaugustin/creative-engineering/pull/3
*creative-engineering pull request #2: https://github.com/elwinaugustin/creative-engineering/pull/2

I encourage all contributors to participate in Hacktoberfest! It's a great way to learn new things, make a difference, and have fun.
Cheapest Company Registration in UAE
Published: 2023-10-19 14:35:59

Get the [Cheapest Company Registration in UAE](https://quiickwork.com/cheapest-company-registration-in-uae/) with Quiick Work! Quiick Work, a Dubai-based company, offers affordable and hassle-free business setup services in the UAE. Start your business journey today with Quiick Work.
Custom fonts in Fresh + Twind
Tags: deno, fresh, twind, googlefonts
Published: 2023-10-19 14:20:12

To add fonts to your [Fresh](https://fresh.deno.dev/) project, you don't need any extra dependencies:

**1**- Go to [Google Fonts](https://fonts.google.com/) and choose your preferred fonts.

**2**- Select the desired font styles and copy the link:

   ![Google Fonts Link](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ccz3wyf6bet1qvnahmyx.png)

**3**- Paste that link into your Fresh project's main index, under the `<head>` tag:

```tsx
   // routes/index.tsx
   <Head>
     ...
     <link rel='shortcut icon' href='/favicon.png' type='image/png' />
     <link rel='preconnect' href='https://fonts.googleapis.com' crossOrigin="true"/>
     <link rel='preconnect' href='https://fonts.gstatic.com' />
     <link
       href='https://fonts.googleapis.com/css2?family=Inter:wght@100;300;400;600;800&display=swap'
       rel='stylesheet'
     />
   </Head>
```

**4**- Configure Twind to use the imported fonts:
```ts
// utils/twind.ts

import { IS_BROWSER } from "$fresh/runtime.ts";
import { Configuration, setup } from "twind";
export * from "twind";
export const config: Configuration = {
  darkMode: "class",
  mode: "silent",
  theme: {
    fontFamily: {
      sans: ["Inter", "sans-serif"],
    },
  },
};
if (IS_BROWSER) setup(config);
```

That's it! If you have any question, feel free to ask me.
Muito além do que 4 PRs
Tags: hack23contributor, hacktoberfest23, hacktoberfest
Published: 2023-10-19 14:15:20

Poder ter o privilégio de contribuir em projetos de código aberto é algo inenarrável. Ter projetos, mesmo que pessoais e de aprendizado, é também uma algo que não se pode traduzir em palavras. É algo que quero, em poucas palavras, tentar exprimir aqui

Para mim uma das melhoras coisas que compreendo ter sido realizada durante a Hacktoberfest foi o contato com os/as desenvolvedore/as, pois mais que contribuir e enviar PRs para os repositórios participantes é o contato com a galera, a troca de ideias e conhecimentos. Por isso, não tenho dúvidas em dizer que a experiência proporcionada vai muito além do que 4 PRs e os prêmios que alcaçamos por tais contribuições, pois está no âmbito da construção contínua de uma rede de relacioinamentos e amizades sem iguais.

Uma experiência que nos auxilia no crescimento das habilidades técnicas e, também, nas chamadas soft skills, pois, como já mecionei acima, vai além de termos novos conhecimentos na linguagem de programação que utilizamos, vai além da compreensão da arquitetura de software que temos. Vai além, pois a rede de relacionaments que eu tinha antes de ter me envolvido na Hacktoberfest transoformou-se de uma forma que eu não imaginava que poderia. Crescimento profissional? Sim, mas principalmente crescimento pessoal, entendendo que contribuir com algo que possa fazer com que outras pessoas tenham suas vidas melhoradas ao utilizar um ou outro projeto de código aberto não tem palavras que descreva!

O link dos 4 PRs que enviei:
1. [https://github.com/Riverfount/todo-project/pull/62](https://github.com/Riverfount/todo-project/pull/62)
1. [https://github.com/Riverfount/vmcotacoes/pull/181](https://github.com/Riverfount/vmcotacoes/pull/181)
1. [https://github.com/Riverfount/vmcotacoes/pull/184](https://github.com/Riverfount/vmcotacoes/pull/184)
1. [https://github.com/Riverfount/vmcotacoes/pull/186](https://github.com/Riverfount/vmcotacoes/pull/186)
Migrate Redis to AWS ElastiCache
Tags: redis, aws, devops
Published: 2023-10-19 14:08:04

## How to Migrate Redis from One Server to Another

Starting from Redis version 5.0.0, Redis supports the `REPLICAOF` command, which assists in migrating data by making the destination Redis server a replica of the source Redis server. You can perform this migration with just a few simple steps:

**Step 1**: Make the destination Redis server a replica of the source Redis server by running the following command:
```shell
REPLICAOF host port
```

**Step 2**: Transform the destination Redis server into a master server by executing the following command:
```shell
REPLICAOF NO ONE
```

That's it!

## AWS ElastiCache does not support REPLICAOF
When migrating Redis, we encountered a struggle as `AWS Elasticache` restricts access to certain commands, including `"MIGRATE"` and `"REPLICAOF"`.

## Solution
I discovered a repository written in Go that helped us address this issue by running a one-time application.
It appeared promising, but it hadn't been updated for several years. I identified some problems:
- It used LPOP, which resulted in the removal of list elements from the "From Redis Instance."
- It ran in a single thread, causing significant delays in migrating large records.
- It did not support certain key types, including Set and SortedSet.

I forked the repository and made the necessary fixes & improvements. 

## Usage
**Step 1**: Create config file
`config.yaml`
```yaml
old_redis:
  host: localhost # IP redis server
  port: 6379 # Port redis server
  password: "" # Password of redis server, leave empty if there is no password

new_redis:
  host: localhost
  port: 6380
  password: ""

migration_databases: [0,1,2,3,4,5,6,7,8] # Databases list which needs to be migrated
concurrent_workers: 5
clear_before_migration: true
```

**Step 2**: Run using Docker

```shell
docker run \
--rm \
-v /path/to/config.yaml:/data/config.yaml \
 huanttok/redis-migrator migrate \
 --config.file=/data/config.yaml \
--log.level=debug
```

(_To call `localhost` while using Docker, use `host.docker.internal` instead._

## Source code
{% github: https://github.com/huantt/redis-migrator %}
Hacktoberfest2023 newbie - Pledge
Tags: hacktoberfest23, newbie, beginners, opensource
Published: 2023-10-19 14:03:40

<!-- ✨This template is only meant to get your ideas going, so please feel free to write your own title, structure, and words! ✨ -->


Hi everyone!👋
I am Tanushree, a tech enthusiast based in Poland. :woman_technologist:



### Background
I am new to opensource, and am participating in Hacktoberfest for the first time! :woman_pilot:


### Pledge
Since this is my first year, I will be focusing on **quality** over **quantity**.
My aim is to get 2 valid PRs :muscle:
Auditing TLSV1.3 is enabled for your services
Tags: internetsecurity, cybersecurity, tls, internet
Published: 2023-10-19 13:57:34

Discover the power of TLSv1.3, the latest in internet security! This article dives into its features, improved performance, and how to audit services with a RELIANOID ADC Load Balancer. Keep your online communications safe with TLSv1.3. #TLSv1.3 #InternetSecurity #Cybersecurity 🌐🔒

https://www.relianoid.com/resources/knowledge-base/troubleshooting/auditing-tlsv1-3-is-enabled-for-your-services/

#TransportLayerSecurity #Encryption #DataProtection #ForwardSecrecy #SSLProtocol #SecurityUpdates #CyberThreats #OnlineSecurity #WebBrowsing #LoadBalancer #SSLDebugging #OpenSSL #SecurityAuditing #ServiceSecurity #SSLConfiguration #NetworkSecurity #TLSConnections
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bqvlsxxlzx01lzk6tui9.jpg)
Free C# Certificate By Microsoft
Tags: csharp, tutorial, programming, career
Published: 2023-10-19 13:49:44

I started the C# course because I was interested in learning a new programming language that is versatile and can be used to develop a wide variety of applications. I had heard that C# is a powerful and easy-to-learn language, so I decided to give it a try.

Learning a new programming language can be a challenging but rewarding experience. As someone who was eager to expand my coding skills, I decided to dive into the world of C#, and I had the opportunity to do so with a free course offered by Microsoft. I have a little experience with C# a very long time ago in college.

Here are the links where you can start the free course:
1. **[Microsoft Learn Page For Learning C#](https://learn.microsoft.com/en-gb/collections/yz26f8y64n7k07?WT.mc_id=dotnet-35129-website)** - This is where you can start learning about C#.

2. **[Foundational C# with Microsoft](https://www.freecodecamp.org/learn/foundational-c-sharp-with-microsoft/)** - This is where you take the quizzes and exams. But you have to connect freeCodeCamp with your Microsoft account.

The course started with an introduction to the basics of C# programming, such as variables, data types, operators, and control flow statements. I found the material to be well-organized and easy to understand. The learning platform have clear explanations and examples, and there were many opportunities to practice writing code.

I dislike the absence of video tutorials in this entirely text-based course, which demands hours of reading to complete. If you're a bookworm and already familiar with C#, you can simply click through to finish the course.

But if you do not know C# I advise you to read properly and do the activities as well. Because to be able to get a Free Certificate you have to take quizzes and exams to be able to earn the certificate.

If you know C#, you can directly start the quiz without going through the materials. If you like to learn a new language like C# you should start learning now.

Upon receiving your complimentary certificate, you have the opportunity to include it in your profiles, such as LinkedIn. Although the certificate may not carry significant intrinsic weight, it plays a pivotal role in enhancing your professional portfolio and profile. Furthermore, it streamlines the process of securing employment opportunities.

This is the certificate I got: https://freecodecamp.org/certification/brojenuel/foundational-c-sharp-with-microsoft

![BroJenuel Jenuel Ganawed C# certificate](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/a5s6jg7xnbloe5i8b9fu.png)

Hi! If you're interested in programming cheat sheets check this out: https://store.brojenuel.com/l/programming-coding-cheat-sheets

If you're interested in a Facebook like clone check this one: https://store.brojenuel.com/l/face-book-clone-look-alike-using-vuejs