teleren/devto huggingface dataset:
Installing Snort on Kali Linux
Tags: kali, security
Published: 2022-10-03 07:41:53

#### Snort is no longer available in Kali repositories

Here are the steps to install snort on Kali

- Backup kali's sources.list
```
mv /etc/apt/sources.list /etc/apt/sources.list.bak
```
- Remove updates

```
find /var/lib/apt/lists -type f -exec rm {} \;
```
- Change sources.list content

```
sudo nano /etc/apt/sources.list
```

Paste content given below
```
deb http://archive.ubuntu.com/ubuntu/ focal main restricted universe multiverse<br>
deb-src http://archive.ubuntu.com/ubuntu/ focal main restricted universe multiverse<br>

deb http://archive.ubuntu.com/ubuntu/ focal-updates main restricted universe multiverse<br>
deb-src http://archive.ubuntu.com/ubuntu/ focal-updates main restricted universe multiverse<br>

deb http://archive.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse<br>
deb-src http://archive.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse<br>

deb http://archive.ubuntu.com/ubuntu/ focal-backports main restricted universe multiverse<br>
deb-src http://archive.ubuntu.com/ubuntu/ focal-backports main restricted universe multiverse<br>

deb http://archive.canonical.com/ubuntu focal partner<br>
deb-src http://archive.canonical.com/ubuntu focal partner<br>
```

If you are using kali as a virtual machine then paste this instead
As core Ubuntu repositories do not have the ARM repositories in them
```
deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports focal main restricted universe multiverse<br>
deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports focal-updates main restricted universe multiverse<br>
deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports focal-security main restricted universe multiverse<br>

deb [arch=i386,amd64] http://us.archive.ubuntu.com/ubuntu/ focal main restricted universe multiverse<br>
deb [arch=i386,amd64] http://us.archive.ubuntu.com/ubuntu/ focal-updates main restricted universe multiverse<br>
deb [arch=i386,amd64] http://security.ubuntu.com/ubuntu focal-security main restricted universe multiverse<br>
```

- Add the specified public keys
```
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 3B4FE6ACC0B21F32
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 871920D1991BC93C
```
- Update

```
sudo apt update
```
- Now install snort

```
sudo apt install snort
```
Freecodecamp Backend Development & APIs (Timestamp Task My Answer)
Tags: programming, javascript, webdev
Published: 2022-10-03 07:39:30

`app.get("/api/:date?", function (req, res) {
  let date = req.params.date;
  
  let unixTimeStamp, utc;


  if(new Date(date) == 'Invalid Date')
  {
     if( (new Date(parseInt(date))).getTime() == parseInt(date))
      {
        unixTimeStamp = parseInt(date);
        utc = new Date(parseInt(date)).toGMTString()
        return res.json({unix:unixTimeStamp,utc:utc});
      }
  }

  if(date === undefined){
    unixTimeStamp = new Date().getTime()
    utc = new Date().toGMTString()
  }else{
    unixTimeStamp = new Date(date).valueOf()
    utc = new Date(date).toGMTString()
  }

  if(isNaN(unixTimeStamp) && utc === 'Invalid Date')
  {
    return res.json({ error : "Invalid Date"});
  }

   return res.json({unix:unixTimeStamp,utc:utc});
});`
Focus within & 4 other webdev tips you may want to know 🚀
Tags: webdev, javascript, css, html
Published: 2022-10-03 07:39:07

Just a quick word before we start. I'm currently trying to grow a community over on twitter where I share technical tidbits I learned working in this industry for about 6 years now.

I would be super happy and grateful if you could [follow me there](https://twitter.com/TheAngularGuy)! It will help me to make more content and articles every week 🙏 

Also, English is not my first language, so please let me know if you find any misspellings or awkward phrasing.

Enough talk, let's jump right in!

--- 


## 1. The battery API

Did you know that browsers have a Battery API  that provide information about the system’s battery charge level 🔋

![battery API](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tbut86ikumt9d5k1o248.png)

You can listen to the level change event like this:

![battery API level](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pqofuh5udwby006zp79p.png)




&nbsp;
## 2. Focus within

The  `:focus-within`  CSS pseudo-class matches an element if it or any of its descendants are focused:

![Focus within](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fa4dubqwmrev1rnjkf7g.png)




&nbsp;
## 3. List markers

You can use the `::marker` pseudo-element to target the marker box of a list item

![List markers](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/w6m79vq4oc9k6mb36g9n.png)


&nbsp;
## 4. Offset a text underline

Did you know that you can use the `text-underline-offset` property to specify the distance of an underlined text decoration (applied using the `text-decoration` property) from its original position?


![text underline offset](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/91tdj9394mpicyc3iwrf.png)

&nbsp;
## 5. Animation / transition ending event

If you have a CSS animation or transition and you want to react to its ending, Here's how to do it:


![Animation or transition ending event](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8wppz8uvadgls2tii5vw.png)

This can be useful if you want to perform an animation before removing and element from the DOM for example (in case you are not using a framework that already does that for you).






&nbsp;
&nbsp;

That's all for now. I hope you found this useful! 
Leave a comment to let me know which tip (if any) you found useful ⤵


Until next time, have a nice week!



&nbsp;
### What to read next?

{% embed https://dev.to/mustapha/where-is-css-20nk %}
20-line of code HTTP server
Tags: programming, webdev, opensource, github
Published: 2022-10-03 07:38:06

Not Javascript, not Python, not Go, not PHP, no encapsulation.

Today I'm going to introduce a new coroutine language named [Melang](https://github.com/Water-Melon/Melang).

<p align="center"><img width="108" src="https://github.com/Water-Melon/Melang/blob/master/docs/logo.png?raw=true" alt="Melang logo"></p>

Melang is a coroutine concurrent scripting language. It is an interpreted, not compiled language.

In Melang, every script task is a **coroutine**. And multiple script tasks can be processed in the same thread or multithread at the same time.

This is very similar to Go's coroutines, but the coroutines in Melang do not need to actively give up CPU execution rights or call specific functions to indirectly give up CPU execution rights. Instead, the task execution is automatically switched after the interpreter performs certain operations. This also eliminates the need for developers to consider switching timing.

In Melang, all script code logic is synchronized. But it's actually done asynchronously by the interpreter. This help many developers who are not familiar with asynchronous programming to get started.

Here is a simple HTTP server example:

```
/* filename: server.m */
net = import('net');
mq = import('mq');

listenfd = net.tcp_listen('127.0.0.1', '80');
for (i = 0; i < 4; ++i)
    eval('worker.mln', i);
while (true) {
    fd = net.tcp_accept(listenfd);
    mq.send('test', fd);
}
```

```
/* filename: worker.m */
sys = import('sys');
net = import('net');
mq = import('mq');

while (1) {
    fd = mq.recv('test');
    ret = net.tcp_recv(fd);
    if (ret) {
        net.tcp_send(fd, "HTTP/1.1 200 OK\r\nContent-Length: 1\r\n\r\na\r\n\r\n");
    } fi
    net.tcp_close(fd);
}
```
The main coroutine (server.m) creates 4 worker coroutines (worker.m), and then enters an infinite loop waiting for the establishment of the client TCP.

The worker coroutine (worker.m) is in an infinite loop, receiving the established TCP socket from the main coroutine, then receiving the request from the TCP, then sending the HTTP response, and finally closing the socket.

Next, we can start the script from the command line with the following command:

```shell
$ melang server.m
```

Once started, it can be accessed using tools like `curl` or `ab`.
Add SSH Key to Github
Tags: github
Published: 2022-10-03 07:36:23

## My Problem
```
┌─ 🍔 [/mnt/c/spotspace]
└─╼ git clone git@github.com:spotikum/image-property.git
Cloning into 'image-property'...
The authenticity of host 'github.com (20.205.243.166)' can't be established.
ECDSA key fingerprint is SHA256:p2QAMXNIC1TJYWeIOttrVc98/R1BUFWu3/LiyKgUfQM.
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added 'github.com,20.205.243.166' (ECDSA) to the list of known hosts.
git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
```

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


## My Solution

Generate new ssh key
```
ssh-keygen -t ed25519 -C "your_email@example.com"
```

Add SSH key to GitHub
[instruction](https://docs.github.com/en/authentication/connecting-to-github-with-ssh/adding-a-new-ssh-key-to-your-github-account)

Get your public key on this directory

```
/home/"your_username"/.ssh/id_rsa.pub
```

---

## reference

- [docs.github.com](https://docs.github.com/en/authentication/connecting-to-github-with-ssh/adding-a-new-ssh-key-to-your-github-account)

- [docs.github.com](https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent)
Reduct Storage Client SDK for JavaScript 1.0.0 was released
Tags: news, database, javascript, reductstorage
Published: 2022-10-03 07:23:58

Hey, everyone! It is a little update for people who follow the Reduct Storage project.

We released the next major version of [Reduct Storage](https://github.com/reduct-storage/reduct-storage/releases/tag/v1.0.0) and broke compatibility with the current client SDKs :smile:. No worries, we'll fix everything soon.

Currently, you can already use the storage engine with its JavaScript SDK:

```
npm i reduct-js@1.0.0
```

Check all the changes [here](https://github.com/reduct-storage/reduct-js/releases/tag/v1.0.0)
test
Tags: resiwicaksono
Published: 2022-10-03 07:05:41

Hello There 

1. Iam Resi Wicaksono
2. Am From Bogor Indonesia
3. Consistent Lea**_

1. 
_**rning full stack web developer


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/b87lehh15o4tixevjpzf.png)
Photoshop logo in Python
Tags: python, chiki1601, photoshop
Published: 2022-10-03 07:02:12

Hello friends...

I created Photoshop logo using Python...

which is shown below:

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

I am glad that I am implementing Python turtle graphics by making various logos🥳🥳🥳🥳🥳
Reduct Storage v1.0.0 has been released
Tags: news, database, cpp, reductstorage
Published: 2022-10-03 06:42:24

Hey everyone!

As I said [before](https://dev.to/reduct-storage/reduct-storage-v090-has-been-released-4n10), we started working on the next major release of our time series database. Yesterday, we released the [v1.0.0](https://github.com/reduct-storage/reduct-storage/releases/tag/v1.0.0) version.

In this version, we removed all the deprecated endpoints, refactored HTTP API layer and covered it with unit tests.

You can check out the newest version with [our demo server](https://play.reduct-storage.dev/ui/dashboard) (use token `reduct`), or you can download it as an executable file on the release page.

Thanks!
AZ-900 Exam Dumps - Can we pass AZ-900 Exam Dumps with Dumps in 2022?
Published: 2022-10-03 06:37:25

But we have a proper solution for you to pass the AZ-900 Exam Dumps quickly. Just use our updated exam material and pass the exam on first attempt. Monthly 500+ students pass AZ-900 Exam Dumps by using our exam material all our the world.

Can we pass AZ-900 Exam Dumps with Dumps in 2022? 
Yes! you can pass your exam in first attempt by using our updated exam questions, provides 230 updated exam questions for AZ-900 Exam Dumps with verified Answers, Our IT expert continuously updates the content of exam with the latest knowledge of Azure Fundamental exam topics. you can ask for a Free AZ-900 Exam Dumps PDF demo at Live chat. They will provide you free of cost.

Visit Here >>> https://guide2passing.com/microsoft-az-900-exam-dumps/
open source business solutions - OSBS
Tags: javascript, tutorial, productivity, devops
Published: 2022-10-03 06:37:16

At our company, **[open source business solutions](https://osbs.co.in/)** - we pride ourselves on being able to offer our clients custom open-source development,  ,integrations, DevOps, rapid prototyping, customizations, and user interface &amp; experience (UI/UX) design that are all top-of-the-line and of the highest quality. We understand that when our clients come to us, they are entrusting us with an important task - helping to bring their vision to life. That's why we only work with the best of the best in each field in order to deliver a product that our clients will be happy with and that we can be proud of too.
On a webshop break
Tags: watercooler
Published: 2022-10-03 06:08:45

We've been building quite a lot of things around the medusa webshop.
However, I'm writing these articles day-by-day, and luckily the medusa team has been super helpful with sorting some things out as I hit them.

But I finally hit a point where I must invest more time before writing them.
So, for now, the webshop articles will be on a short halt. I plan to create some more research-intensive things in the background and get back to you with some articles on them.

## What to expect

Some things that we still need to look into are:

- Generic webshop setup (which I won't bore you with)
- Custom payment provider (mollie)
- Custom shipment provider (via Post NL)
- Custom attributes to products
- Sync with PayPal Zettle
- Import via CSV
- Retrieve data from external API about products

This is quite the list, and all of them need quite a lot of research from my end before we can do them.

If you love this webshop series, subscribe to my newsletter and keep up to date with all the articles I push out.

## What's upcoming next?

You might be wondering, what can we expect in the meantime then?

I have some CSS and JavaScript things that have been added to my backlog, which I'd love to dive into.
I also plan to write an entire series on creating a portfolio from scratch, which might be a fun experience for people following.

And like always, if there are specific topics you'd like to know more about: Send me an email or Twitter DM.

I'm always happy to adjust articles to what people want to learn.

### Thank you for reading, and let's connect!

Thank you for reading my blog. Feel free to subscribe to my email newsletter and connect on [Facebook](https://www.facebook.com/DailyDevTipsBlog) or [Twitter](https://twitter.com/DailyDevTips1)
Managing Networking
Published: 2022-10-03 03:30:24

**•TCP/IP Network Model**
The TCP/IP network model is a simplified, four-layered set of abstractions that describes how different protocols interoperate in order for computers to send traffic from one machine to another over the Internet. 
**•IPv4 Networking** 
IPv4 is the primary network protocol used on the Internet today. 
**•IPv4 addresses**
An IPv4 address is a 32-bit number, normally expressed in decimal as four 8-bit octets ranging in value from 0 to 255, separated by dots. 
**•IPv6 Networking** 
IPv6 is intended as an eventual replacement for the IPv4 network protocol, many ISPs already use IPv6 for internal communication and device management networks in order to preserve scarce IPv4 addresses for customer purposes. 
**•IPv6 Addresses** 
An IPv6 address is a 128-bit number, normally expressed as eight colon-separated groups of four hexadecimal nibbles (half-bytes). 
**•Checking Connectivity Between Hosts
The ping command is used to test connectivity. The command continues to run until Ctrl+c is pressed unless options are given to limit the number of packets sent. 
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dfi82456lxntgb8p1rj3.jpg)
The ping6 command is the IPv6 version of ping in Red Hat Enterprise Linux. It communicates over IPv6 and takes IPv6 addresses, but otherwise works like ping.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0pk6fatun4cq3u3gzrgt.jpg) 
•Viewing Networking Informasi**
The nmcli dev status command displays the status of all network devices : _nmcli dev status_
The nmcli con show command displays a list of all connections. 
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ha9z10ljlgg7obilvsj8.jpg)
The nmcli con show -- active to list only the active connections.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/n4bmrbj99cnyoipgn9oo.jpg)
Microsoft Certification Exam Dumps - Practice Test Questions
Published: 2022-10-03 06:01:41

Schools want to make certain  **<a href="https://getalllatestdumps.com/">Get All Latest Dumps</a> **that they're imparting college students the first-rate that they're capable of and assessments are a extraordinary approach to apply to screen the development and effectiveness of that specific elegance. School directors can see in which development can be wanted in the college, university or college primarily based totally on the scholars’ grades. Studies have proven that a “happier elegance has better grades” so a sample of comparable common consequences may also imply the inducement that a specific elegance may also have or now no longer. After analyzing approximately all of the advantages and benefits gained, it simply is going to reveal that the strain, pulling my hair out turned into all really well worth it Exam Dumps the lengthy run. I actually have observed my strengths and weaknesses, making use of them to in which I am now. I am beginning to understand that the age antique announcing “college is the first-rate days of your lifestyles” may want to honestly be  <a href="https://getalllatestdumps.com/">Exam Dumps</a> authentic…Guide to School Examinations for Parents and Students Whether you're taking into consideration pursuing better research or making plans to your destiny career, it's far  probably that you'll be competing in a international market. 

Click Here More Info >>>>> https://getalllatestdumps.com/
Upgrade your Institute into a Robotics Skill Center
Tags: ai, engineering, indianstudents
Published: 2022-10-03 05:31:55

AICRA has established a **[Robotics skill centre](https://www.aicra.org/robotics-skill-centre)** programme with an associate degree goal of encouraging young minds' curiosity, power, and imagination. It also aids in the development of skills such as style attitude, procedure thinking, adjustive learning, physical computing, and so on. Under this, young children will have the opportunity to experiment with tools and instrumentation to learn about STEM concepts, which will include academic and learning 'do-it-yourself' kits and instrumentation on science, physics, robotics, open supply microcontroller boards, sensors, and 3D printers and computers.

For more info: https://www.aicra.org/robotics-skill-centre 

 

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gishp8xkn0tz9uapsecn.jpg)
1578. Leetcode solution in CPP
Tags: cpp
Published: 2022-10-03 05:18:16

```cpp
class Solution {
public:
    int minCost(string s, vector<int>& cost) {
        int N = s.size(), ans = 0;
        for (int i = 0; i + 1 < N; ++i) {
            if (s[i] != s[i + 1]) continue;
            if (cost[i] > cost[i + 1]) swap(cost[i], cost[i + 1]);
            ans += cost[i];
        }
        return ans;
    }
};
```
#leetcode
#challenge
here is the link for the problem: 
https://leetcode.com/problems/minimum-time-to-make-rope-colorful/
macbook.init(): a dev machine set-up guide
Tags: devjournal, tooling
Published: 2022-10-03 05:11:48


I started a new job, and I am excited. I get a new MacBook delivered and after keeping the delicate wrapping paper intact during the intricate unboxing, it dawns upon me that it is not _my_ MacBook. It is a brand-new system devoid of all the custom tools that make my (work) life easier. On top of it, I do not even remember what those tools were, to begin with. Was it `oh-my-zsh`, or was I using `fish`? What did I do last time to get the top bar show Bluetooth? I end up setting small things like these, slowly every day, until it becomes all familiar, and I forget about them.

Not this time, I said to myself. As I start working at Okta, I decided to log the steps to set up my system, mostly for future me, but also for anyone else stumbling on the same StackOverflow articles over and over again.

## Update OS
Yeah, just update the OS now that you have patience. It is probably outdated and the next step _may_ require it.

## Install Xcode
Do not wait on some CLI tool to fail on you later and install Xcode now. Might get lucky running `xcode-select --install`.

## Install Firefox/Brave
Use Safari to install Firefox and Brave and log into them. Also set up extensions like -
  - Password managers
  - Ad blockers
  - Web3 wallets

## Set up terminal environment

### Install iTerm2
Download the latest build [here](https://iterm2.com/downloads/stable/latest)

### Install homebrew
Refer https://brew.sh/#install, or
```sh
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
```
### Install oh my zsh
Refer https://ohmyz.sh/#install, or
```sh
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
```
### Disable history sharing across zsh sessions
echo "unsetopt share_history\nsetopt no_share_history" >> ~/.zshrc

## Setup keys 🔑
SSH and GPG keys need to be generated/imported and updated __everywhere__, especially GitHub.

### SSH
`ssh-keygen -t ecdsa -b 521`

### PGP
`gpg --import <private-key-file>`

### Install nvm
Refer https://github.com/nvm-sh/nvm#installing-and-updating
```sh
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
```
### Install tmuxinator
```sh
brew insatll tmuxinator
```

### Customize vim
Restore dotfiles and customize vim and other things.


## Next steps
At some point, I should figure out that something is wrong with the trackpad and check that box that says __Tap to click__ in settings. This is a living document and I will keep adding things to it, as I find. Now I should get back to that new system I just configured and get some work done!