teleren/devto huggingface dataset:
Setting up a DHCP server
Tags: linux, bash, dhcp
Published: 2023-02-10 02:58:53

## Introduction

- DHCP or (Dynamic Host Configuration Protocol) is a networking protocol that is used to provide dynamic IP addresses to clients on a network. 
- In Linux servers, the DHCP service allows for automatic and centralized management of IP addresses.
- It is most used in Private networks (best for LAN use cases). It provides IP addresses to the clients connected the network.
- It uses UDP 👉 UDP:67 used by the server and UDP:68 for the client

## The process of IP leasing
There are 4 steps:
1. DHCP Discover (client to server)
2. DHCP Offer (server to client)
3. DHCP Request (client to server)
4. DHCP ACK (server to client)


![DHCP IP leasing](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9seskrvqp8odjomt5ynf.png)

---

## Setting up DHCP

First, we need to install the DHCP package,
```bash
yum -y install dhcp-*
```

After installation is complete, we can open the configuration file,
```bash
vi /etc/dhcp/dhcp.conf
```
We will be able to see the following contents,

![conf file](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zbkxg5gopv1stn1tvcx3.png)

Adding the following to the file,
```bash
# The subnet that will be used
subnet 192.168.1.0 netmask 255.255.255.0 {
        range 192.168.1.50 192.168.1.60; # IP addresses range
        option domain-name-servers 8.8.8.8; # DNS server address
        option routers 192.168.1.2; # This is the default gateway
        max-lease-time 7200; # The lease time in seconds
}

# Declaring the name for the reservation of IP as 'Client'
host Client {
        hardware ethernet 00:0C:29:90:B0:97; # MAC of the host
        fixed-address 192.168.1.55; # Providing this IP to the host
}
```

Starting and enabling the DHCP daemon,
```bash
systemctl start dhcpd
systemctl enable dhcpd
```

Adding DHCP to the firewall,
```bash
firewall-cmd --permanent --add-service=dhcp
success
firewall-cmd --reload
```
Finally, on the client end, we have to set the IPv4 settings to automatic,


![Client pc IPv4](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/p52o710lgctza5zq4ir4.png)

We can confirm this from the Windows PC,



![Confirmation](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vnm1q5d1k7edot7hby4k.png)
 




> The above simple DHCP configuration in the Linux system was able to provide an IP address for the Windows client PC

### 👉 Troubleshooting if it still shows the previous IP address

Using `ipconfig /release` on the Windows CMD,


![release](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tscrbbrtn6fepvblvm2k.png)

Then renewing it using `ipconfig /renew`


![Renew](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zjtcaqogals7ezl6ee2i.png)
How to avoid getting a password prompt when downloading XLS/CSV reports from Cockpit
Tags: iot, csv, iotplatform, basicauthentication
Published: 2023-02-21 15:53:14

---
title: How to avoid getting a password prompt when downloading XLS/CSV reports from Cockpit
published: true
date: 2023-02-10 02:33:51 UTC
tags: iot, csv, iotplatform, basicauthentication
canonical_url: https://tech.forums.softwareag.com/t/how-to-avoid-getting-a-password-prompt-when-downloading-xls-csv-reports-from-cockpit/272643
---

## Problem
If you have been using Cumulocity IoT for a longer time and utilize the report functionality in Cockpit to create XLS/CSV you have probably noticed that after you click the download link and it opens in the browser, you will get a password prompt.

This is because your download link probably looks like this:
```
/inventory/binaries/12345
```
This is a direct call to the API, which will see that there is no authentication and therefore returns this prompt to please authenticate yourself.
> ***Note**: These configurations can only be done in management or enterprise tenants. Standard tenants will automatically inherit this configuration from their parent tenant and cannot set it themselves.*

## Solution
You can completely avoid this by changing the link to the cockpit application to look like this:
```
/apps/cockpit/index.html#/?download=12345
```
This will not call the API but open the Cockpit application and then trigger a plugin there for the download. This means if you are already logged into Cumulocity IoT in your browser, there is no need to enter your credentials again, and you can go straight for the download.
If you even decide to disallow Basic Authentication from web browsers for your tenant, you will have to use the second method, as the first one will use Basic Authentication and you will get an error.

In order to change this you can go in your management or enterprise tenant to the Administration application. Go to Settings > Enterprise Tenant > Configuration and look for the entry of "Data Export". Here you can configure the email that you will receive for downloading exports.
A simple version could look like this:
```
File with exported data can be downloaded from  {tenant-domain}/apps/cockpit/index.html#/?download={binaryId}
```

Enjoy downloading your exports hassle-free, especially without a password prompt that cannot be filled out by password managers :wink:

[Read full topic](https://tech.forums.softwareag.com/t/how-to-avoid-getting-a-password-prompt-when-downloading-xls-csv-reports-from-cockpit/272643)
“Good” code has unit tests and “bad”code does not
Tags: codenewbie, beginners, programming, developer
Published: 2023-02-10 02:31:00


As everyone knows, “good” code has unit tests and “bad” code does not.

But then again —

- Unit tests are a waste of time once you have end-to-end tests that makes sure the correctness of the product.

- Unit tests are useless when building an exploratory prototype.
Security Smoke Tests = Improved Peace of Mind
Tags: security, productivity, testing, tooling
Published: 2023-02-10 01:57:49

While coding, it's never been easier to locate and squash security flaws and have greater peace of mind.  

The emergence of simple, reliable, and far more efficient tools and services is unlocking the ability of developers and coders to be more security-minded, allowing them to test the Security of their work whenever they want.

A few well worthy of consideration include:  

[True Inspect](https:/true-inspect.com) by True Positives, LLC.

Brand new managed AppSec hybrid service that is FREE to use and offers reliable dynamic application security testing (DAST) on demand. An optional low-cost upgrade offers Users a more detailed analysis. With it you get the same tools and services as the big dogs, at a price, you can afford.

[OWASP Penetration Testing Kit] (https://www.true-positives.com/post/the-next-evolution-of-browser-based-penetration-testing-kits-owasp-ptk") by True Positives, LLC.

A free, open-source browser plug-in for security and development that allows security testing to occur more thoroughly and effortlessly by having a bevy of apt and powerful utilities wrapped in and negating the need to configure a third-party tool or worry about connectivity and proxy issues.
Static rendering
Tags: javascript, beginners, tutorial
Published: 2023-02-10 01:16:55

In this post we are going to see static rendering and how it works.


**Basic/Plain Static Rendering**
Static Rendering is simple yet powerful pattern we can use in order build fast websites with almost instant page loads due to the lack of fetched data.

When we talk about Static rendering, the Html for the entire page will get generated at build time and it will not change till the next build. 

Static Rendering is most suitable for pages that do not change often and display the same data no matter who requests them.


**Static Rendering with Client-Side "fetch"**
This way of rendering is used when we need just a page with the same things as a Basic static rendering but with adding fetched data that should refresh on every page load.

This type of rendering first will show the skeleton UI without any data. The client fetches the data from the API ro
ute, receives the response, and shows the fetched data.


Thank you so much for reading, If you want more information about it you can read this [post](https://www.patterns.dev/posts/rendering-introduction/).
I hope someone found it helpful.

Lautaro.
AWS Cloud Quest: Parallel Data Processing Study Note
Tags: aws, cloud
Published: 2023-02-10 00:42:20

This is the DIY challenge of the Parallel Data Processing in AWS Cloud Quest.


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



### DIY Steps:
1. Create a new Lambda `promotion_service`
2. Create a new Subscription under `rideshare_topic` with Endpoint from `promotion_service` Lambda

Subscription filter policy
```
{
  "distance": [
    {
      "numeric": [
        ">",
        10
      ]
    }
  ]
}
```
Effective Reading of Technical Documentation: Tips and Tricks
Tags: webdev, beginners, programming, python
Published: 2023-02-10 00:42:05

Reading documentation can be a daunting task, especially if it is lengthy and technical. But with the right approach, you can make the process much easier and even enjoyable. Here are some tips to help you read documentation effectively.

**Start with an Overview**: Before diving into the details, take a look at the overview or summary of the document. This will give you a general idea of what the document is about and help you prioritize what sections to focus on.

**Break it down into smaller sections**: If the document is lengthy, break it down into smaller sections and tackle one section at a time. This will make it less overwhelming and easier to understand.

**Use headings and subheadings**: Documentation often has headings and subheadings to organize information. Use these to quickly find the information you need and get an idea of the structure of the document.

**Take Notes**: Taking notes while reading will help you retain information better and refer back to it later. Highlight or underline key information, jot down questions, and summarize important points.

**Ask questions**: If there is something you don't understand, don't be afraid to ask questions. Reach out to the author, ask on forums, or clarify with colleagues.

**Practice and experimentation**: The best way to understand something is to try it yourself. Practice what you have learned and experiment with different scenarios.

**Get feedback**: Seek feedback from peers or more experienced individuals to ensure that you have a good understanding of the information.

In conclusion, effective reading of documentation requires patience, focus, and a systematic approach. By breaking down the document into smaller sections, using headings, taking notes, asking questions, practicing and experimenting, and seeking feedback, you can make the process less overwhelming and gain a deeper understanding of the information.
Why is CSS hard?
Tags: code, development, codecraft, design
Published: 2023-02-10 07:14:13

---
title: Why is CSS hard?
published: true
date: 2023-02-10 00:07:28 UTC
tags: code,development,codecraft,design
canonical_url: https://craignicol.wordpress.com/2023/02/10/why-is-css-hard/
cover_image: https://craignicol.files.wordpress.com/2020/03/wp-1583529281454.jpg?w=1200
---

CSS is a real language, and you need deep technical knowledge to understand it. But plenty of software developers hate it and look down on it. It’s a good, if incomplete, tool for what it does. But I think it scares some of the gatekeepers who were drawn to software before the web.

_It can’t be unit tested. It’s a language that only exists in a domain that stretches multiple sizes, multiple devices and multiple renderers. There’s more than 1 way to do things. And some of the biggest challenges with CSS are human. It’s the paintbrush for the bike shed._

[https://twitter.com/craignicol/status/1074330589107507200?s=19](https://twitter.com/craignicol/status/1074330589107507200?s=19)

Funny how many hard problems in computer science, including cache invalidation, are about users.
Show Installed Global Node Deps
Tags: node, pnpm, npm, yarn
Published: 2023-02-10 00:00:00

---
title: Show Installed Global Node Deps
published: true
description: How to show installed global npm / yarn / pnpm dependencies
tags: node, pnpm, npm, yarn
cover_image: https://images.unsplash.com/photo-1526470608268-f674ce90ebd4
# Use a ratio of 100:42 for best results.
published_at: 2023-02-10 18.00
canonical_url: https://sznm.dev/notes/show-installed-global-node-deps
---

To check node dependencies which are installed globally.

## pnpm

```bash
pnpm list -g --depth 0
```

references:

- https://pnpm.io/pnpm-cli
- https://pnpm.io/cli/list#--global--g

## npm

```bash
npm list -g --depth=0
```

references: https://docs.npmjs.com/cli/v9/commands/npm-ls#global

## Yarn

```bash
yarn global list
```

references: https://classic.yarnpkg.com/en/docs/cli/global
Content & Tooling Team Status Update
Tags: puppet, content, community
Published: 2023-02-10 21:03:35

---
title: Content & Tooling Team Status Update
published: true
date: 2023-02-10 00:00:00 UTC
tags: puppet, content, community
canonical_url: https://puppetlabs.github.io/content-and-tooling-team/blog/updates/2023-02-10-status-update/
---

## Config Management Camp 2023 Ghent

Our team has been pretty quiet this week with [Craig](https://github.com/chelnak), [Gavin](https://github.com/GSPatton) and [David](https://github.com/david22swan) all in Ghent alongside a few of yourselves! If you were there I hope you got a chance to say hello and found some of the chat useful. It is always lovely to meet with people we work with every day but rarely see face to face.

## Mend Scanner

You may have noticed a new step running on our CI called ‘mend’. This is a job to run vulnerbility testing that we are currently working on. If any of your PRs are currently failing this step, it won’t affect the teams ability to merge your code and it is completely unrelated to your changes.

## Community Contributions

We’d like to thank the following people in the Puppet Community for their contributions over this past week:

- [`puppetlabs-apache#2380`](https://github.com/puppetlabs/puppetlabs-apache/pull/2380): “Adding mod\_version module to be activated by default”, thanks to [Q-Storm](https://github.com/Q-Storm) and the following people who helped get it over the line ([jnk0](https://github.com/jnk0))
- [`puppetlabs-apache#2368`](https://github.com/puppetlabs/puppetlabs-apache/pull/2368): “Suppress bad Directory comment when DocumentRoot is not set”, thanks to [gcoxmoz](https://github.com/gcoxmoz)

## New Module / Gem Releases

The following modules were released this week:

- [`puppetlabs-ntp`](https://github.com/puppetlabs/puppetlabs-ntp) (`9.2.1`)

- [`puppetlabs-apache`](https://github.com/puppetlabs/puppetlabs-apache) (`9.1.1`)
Chrome Extensions and Match Patterns
Tags: chrome, extension
Published: 2023-02-09 23:37:44

Google Chrome is one of the most popular web browsers in the world, and Chrome extensions are small software programs that allow users to add new features and capabilities to the browser. Chrome extensions are created by developers and can be used to modify the appearance of websites, automate common tasks, and much more.

One of the key features of Chrome extensions is the ability to limit their functionality to specific websites using match patterns. Match patterns are a way to specify which URLs a browser extension should run on, and they use a wildcard syntax to match against the full URL or just a portion of it. For example, a match pattern could be set to match any URL that starts with "https://www.example.com/" or to match any URL that ends with ".pdf".

Match patterns are defined in the manifest file of a Chrome extension and are used to control access to various Chrome extension APIs. For example, a developer might use a match pattern to limit their extension to only run on Google Drive, or to run on all subdomains of a particular website.

To match all subdomains and domains of "google.com", the following match pattern can be used in the manifest file of a Chrome extension:

`"*://*.google.com/*"`

This match pattern uses the wildcard syntax to match any protocol (represented by "://"), followed by zero or more subdomains (represented by "."), followed by the domain "google.com", and finally, any path on the site (represented by "/*"). This match pattern will match URLs such as:

- https://www.google.com/
- https://maps.google.com/
- https://docs.google.com/
- https://drive.google.com/

and so on, for any subdomain of "google.com". However, it will not match the root domain "https://google.com". To match the root domain as well, an additional match pattern can be added:

```
"*://*.google.com/*",
"*://google.com/*"
```

This will match both subdomains of "google.com" as well as the root domain itself.

In conclusion, match patterns are an important aspect of Chrome extensions and play a crucial role in controlling the scope of an extension's functionality. By using match patterns, developers can create extensions that only run on specific pages, providing a more tailored and focused experience for users.
The Problem with MTTR: Learning from Incident Reports
Tags: management, devops, podcast, datascience
Published: 2023-02-09 23:34:42

Tracking Mean Time To Restore (MTTR) is standard industry practice for incident response and analysis, but should it be? 

Courtney Nash, an Internet Incident Librarian, argues that MTTR is not a reliable metric - and we think she's got a point.

We caught up with Courtney at the DevOps Enterprise Summit in Las Vegas, where she was making her case against MTTR in favor of alternative metrics (SLOs and cost of coordination data), practices (Near Miss analysis), and mindsets (humans are the solution, not the problem) to help organization better learn from their incidents. 

{% spotify spotify:episode:64fnieyUxqjUbKsiNWpsYm %}

## Episode Highlights:
* (1:54) The end of MTTR?
* (4:50) Library of incidents
* (13:20) What is an incident?
* (19:41) Cost of coordination
* (22:13) Near misses
* (24:21) Mental models
* (28:16) Role of language in shaping public discourse
* (29:33) Learnings from The Void

***While you’re here, check out this video from our [YouTube channel](https://www.youtube.com/c/DevInterrupted?sub_confirmation=1), and be sure to like and [subscribe](https://www.youtube.com/c/DevInterrupted?sub_confirmation=1) when you do!*** 

{% youtube jF1qt6cixpQ %}

### [On Feb. 15th, learn how the smartest engineers increased productivity by up to 30% without working longer hours or burning out their teams](https://linearb.io/event/202302-scaling-dev-efficiency/?utm_source=Substack%2FMedium%2FDev.to&utm_medium=referral&utm_campaign=202302%20-%20Event%20-%20GTM%20-%20Referral%20-%20Distro%20-%20Podcast%20Blog)

Every engineering team could use some easy wins right now, including yours. We’re talking quick ways to improve productivity without wasting more hours at work, spending a lot of money or burning out already-stretched teams.

That’s why LinearB teamed up with dozens of engineering orgs to crowdsource the real ways smart companies have improved their productivity - quickly and most importantly, easily.

On February 15th, LinearB will be presenting this playbook at [our free, virtual Scaling Developer Efficiency workshop.](https://linearb.io/event/202302-scaling-dev-efficiency/?utm_source=Substack%2FMedium%2FDev.to&utm_medium=referral&utm_campaign=202302%20-%20Event%20-%20GTM%20-%20Referral%20-%20Distro%20-%20Podcast%20Blog)

Designed to help you gain up to 30% increased productivity, this free online workshop will empower your team with strategies and solutions that let them focus on what they do best: Code.

### [Reserve Your Virtual Seat](https://linearb.io/event/202302-scaling-dev-efficiency/?utm_source=Substack%2FMedium%2FDev.to&utm_medium=referral&utm_campaign=202302%20-%20Event%20-%20GTM%20-%20Referral%20-%20Distro%20-%20Podcast%20Blog)

![Reserve a seat today](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cpvy5uftb01p2nwia2zl.png)
The Final Stretch
Published: 2023-02-09 23:21:15

As of today, I have just submitted my second to last project! After this, there's only a capstone project I have to do, which will be a culmination of everything I've learned. I couldn't be more excited (and more nervous)! 

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


This time, the project was on advanced machine learning techniques. We learned about things like Natural Language Processing (NLP), Neural Networks, Recommendation Systems, etc. It was ALOT to take in, but I hung in there. Similar to the last project, we got to pick our topic, so I picked something that piqued my interest: Image Classification using Neural Networks.


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



My job was to take chest x-rays (like the one below) of patients with and without Pneumonia and to then classify the x-rays using Deep Neural Networks and Convolutional Neural Networks. I then compared the two types of Neural Networks to see which one could better classify images. I won't spoil anything for you, but if you want to check out my work, you can check it out [here!](https://github.com/aharri123/Image-Classification)

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


Gotta mention mental health of course! I've been trying to keep up with my mental health. It's stayed consistent, probably thanks to a combination of proper medication and therapy. However, I also started going to the gym!  I try to go 5 days a week, and I can say it definitely has an effect on mood and energy. But a friendly reminder: I didn't just wake up one day and magically appear in the gym. I had to gather up the willpower and motivation to go, and it definitely isn't always easy to go (especially at 6 in the morning). But I fight through it, and I think that can extend to everyone's life. To all my people struggling with mental health issues and life problems, I believe you are strong enough to make it through! You WILL make it, and things WILL get better. Just hang in there a little longer. 

(As a bonus, here's live footage of me at the gym):



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