teleren/devto huggingface dataset:
HowTo: Find egress traffic destination in Istio service mesh
Tags: kubernetes, istio, servicemesh, envoy
Published: 2022-11-18 05:53:28

---
title: HowTo: Find egress traffic destination in Istio service mesh
published: true
description: 
tags: kubernetes, istio, servicemesh, envoy
# cover_image: https://direct_url_to_image.jpg
# Use a ratio of 100:42 for best results.
# published_at: 2022-11-18 05:50 +0000
---

Before we enable the `REGISTRY_ONLY` options for Istio, we want to capture all the existing outbound traffic and add it as a ServiceEntry.

There are two metrics we can monitor:

- `istio_requests_total{destination_service_name="PassthroughCluster"}`
- `istio_tcp_connections_closed_total{destination_service_name="PassthroughCluster"}`

We can query these two metrics in prometheus to see if there’s any outbound traffic that was not registered yet.

The first one `istio_requests_total` is easy. It captures all the http requests. And because it’s a http request, the domain will be recorded in the `destination_service` field.

The second one `istio_tcp_connections_closed_total` is more complicated. It may be an HTTPS or TCP request. And for these requests the destination domain was not recorded. The only thing we can know is which workload generated these requests.

## Envoy Debug Log
To find out where the request is going, we must first turn on the debug log of the sidecar proxy. There are two ways we can do that.

The first one is to add an annotation to the workload: `sidecar.istio.io/logLevel: debug`

If you don’t want to restart the pod, you can also use istioctl to enable debug log during runtime:

```bash
istioctl pc log <pod_name>.<namespace> --level debug
```

After the debug log was enabled, we then needed to trigger the application to make it send those requests. And then we can try to find `PassthroughCluster` in the logs.
```bash
k logs -n <namespace> <pod_name> -c istio-proxy | grep "Creating connection to cluster PassthroughCluster" -B2 -A2
```

After you enabled the `REGISTRY_ONLY` mode of the Istio service mesh, there will be no `PassthroughCluster`, instead, you should be monitoring `BlackholeCluster`.

## Envoy Access Log
Another tool we can use is the access log of envoy proxy. We can enable the access log for specified namespace and workload. Here’s an example of enabling envoy access log for monitoring namespace.

```yaml
apiVersion: telemetry.istio.io/v1alpha1
kind: Telemetry
metadata:
  name: envoy-access-log
  namespace: monitoring
spec:
  accessLogging:
    - providers:
      - name: envoy
```

After that, we can tail the log and pipe to [engarde](https://github.com/nitishm/engarde) to view the logs.

```bash
k logs -n <namespace> <pod_name> -c istio-proxy -f | engarde --use-istio | jq 'select(.upstream_cluster=="BlackHoleCluster")'
```
School Management Software
Tags: software, schoolmanagementsoftware
Published: 2022-11-18 05:43:23


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/f33b426lxyd4xxh5sdld.jpg)
[**School management software**](https://technologycounter.com/school-management-software/) is an influential tool that can simplify the administration of the education sector. It is an all-inclusive tool that bridges the gap between teachers, students, and their respective parents. The best school management software that understands your school goals will help provide top-notch education to your students. School software also reduces the work burden of your staff and ensures that the parents can check their student's progress at any time.
Git + Jira Analytics in 10 minutes on your laptop
Tags: productivity, git, analytics, opensource
Published: 2022-11-18 05:41:06

Product and Engineering Managers, rejoice! You can now get Git and Jira **analytics** on your laptop in 10 minutes! It is free, open-source, and all the data stays with you! 

Explore and Leverage all your engineering operations data (epics, issues, pull requests, builds, releases) to make informed decisions.

Docker Desktop and git required. Open your favorite terminal and launch:
```
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/faros-ai/faros-community-edition/main/install.sh)" _ --source devto_analytics
```

* Open source [code](https://github.com/faros-ai/faros-community-edition)
* [Documentation](https://community.faros.ai/docs/faros-essentials)
* Faros Community [Slack](https://community.faros.ai/docs/slack)

![Install Flow](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/p2vul133w1ub1b3kl75u.gif)

Say goodbye to stale spreadsheets and rigid metrics!

![Spreadsheet meme](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1vwtx8wq8jciosezrdrz.jpeg)
![Metrics meme](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/co1p4slinx4mq60ehsng.jpeg)
How To Create Custom Helper Function In Laravel 9
Tags: laravel, laravel9, helperfunction, php
Published: 2022-11-18 05:30:00

In this article, we will see how to create a custom helper function in laravel 9. As we all know laravel provides many in-built helper functions in their framework, but many times we need to require our own customized function to use in our project that time we need to create a custom helper function in laravel 9. 

So, here I will give you a custom helper function example in laravel 9.

So, let's see the custom helper function in laravel 9 and laravel 9 custom helper functions.

Laravel includes a variety of global helper PHP functions like Arrays, paths, strings, URLs, etc. So, you can use these functions as per your requirements.

Step 1: Create helpers.php File
In this step, we will create the app/helpers.php file in our laravel project and add the below code.

app/helpers.php

```
<?php
  
function Date_Format($date,$format){
    return \Carbon\Carbon::createFromFormat('Y-m-d', $date)->format($format);    
}

?>
```

---

**_[Read Also: How To Connect Multiple Database In Laravel 9](https://techsolutionstuff.com/post/how-to-connect-multiple-database-in-laravel-9)_**

---

Step 2: Add Helper File Path In composer.json File

Add the below code in the composer.json file.

```
"autoload": {
        "psr-4": {
            "App\\": "app/",
            "Database\\Factories\\": "database/factories/",
            "Database\\Seeders\\": "database/seeders/"
        },
         "files": [
            "app/helpers.php"
        ]
    },
```

Step 3: Run Command

Now, run the below command in your terminal

composer dump-autoload
 So, we are done with the custom helper function in laravel 9, as of now we can use this function anywhere across applications.

Here I am using this function in the blade file.

```
<html>
 <head>
     <meta charset="utf-8">
     <meta http-equiv="X-UA-Compatible" content="IE=edge">
     <title>How To Create Custom Helper Function In Laravel 9 - Techsolutionstuff</title>
     <link rel="stylesheet" href="">
 </head>
 <body>
    <h3>How To Create Custom Helper Function In Laravel 9 - Techsolutionstuff</h3>
     <h3>New Date Format: {{ Date_Format('2022-02-26','m/d/Y')  }}</h3>
 </body>
</html>
``` 

---

**_[Read Also: How To Image Upload With Preview In Laravel 9](https://techsolutionstuff.com/post/how-to-image-upload-with-preview-in-laravel-9)_**
 
---

Output : 

```
New Date Format: 02/26/2022
``` 

You might also like:

- **_[Read Also: Laravel 9 Send Mail Using Queue Example](https://websolutionstuff.com/post/laravel-9-crud-operation-example)_**

- **_[Read Also: Laravel 9 AJAX CRUD Operation Example](https://techsolutionstuff.com/post/laravel-9-ajax-crud-operation-example)_**

- **_[Read Also: How To Get Hourly Data In MySQL Query](https://techsolutionstuff.com/post/how-to-get-hourly-data-in-mysql-query)_**

- **_[Read Also: How To Get Array Length In VueJS](https://techsolutionstuff.com/post/how-to-get-array-length-in-vuejs)_**
Top 30 Black Friday SaaS Deals in 2022
Tags: saas, blackfriday, helpdesksoftware
Published: 2022-11-18 04:51:11

If you want to know about the best deal on SasS products, then look through this blog for a list of this year’s SaaS deals!

https://www.bolddesk.com/blogs/black-friday-cyber-monday-software-deals 

Don’t miss these #BlackFriday2022 discounts in #BoldDesk.
I spent my time a week for my project make theme WordPress for my client
Published: 2022-11-18 04:41:13


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

This theme i use PHP + tailwindcss now it host already guy you can check URL: https://springedu.co/
TikTok Business API Tutorial - Part 1 (Account Setup)
Tags: tiktok, api, tutorial
Published: 2022-11-18 03:49:35

1. Register for TikTok's Business Developer Account
  - https://ads.tiktok.com/marketing_api/homepage

2. Go to **My Apps**
  ![My Apps](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/q799jfqdsg173922w60z.jpeg)

3. Create **New App**
  ![Create App](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1233xw5mfwcj1scnk2zx.png)

4. Fill in all the information and submit (It takes a few days to get verified)
  ![Creating tiktok api app step](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2zjewzt4hp2848qdyiar.png)
  Once the **Verification Status** is *Approved*, we are are to use the api
  ![Verification status - approved status](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hwj4o4730fw3cwr6okdn.png)
Working with the Spotify Api as a student in JavaScript
Tags: javascript, beginners, api
Published: 2022-11-18 01:54:35

As a person who is semi-new to coding, tapping in to the Spotify Api might seem pretty intimating. Trust me, it was, but once you break it down it's actually not too hard and absolutely cool to work with. If you do any project with music I highly recommend using it. My first challenge was actually getting data from the Api. This was definitely a blocker since I haven't worked with an Api with that needs any kind of token or authorization. This was solved with 2 days of research and few trips to stack overflow. To get onto Spotify's Api you really just have to get your Fetch headers right like so: 

```
headers: {
            'Accept': 'application/json',
            'Content-Type': 'application/json',
            'Authorization':  `Bearer ` + token
        }     
```

Although using a token isn't super efficient, I haven't quite figured out a way around it, since the token is only good for 60 minutes. I'll definitely have an update for you when I do figure that part out.
 Depending on what kind of data you're trying to get from the Api will determine what your fetch link will be. The base of the link will start looking something like this:

https://api.spotify.com/v1/

I personally was playing around with looking for artist data so my link went a little like this:

`https://api.spotify.com/v1/artists`

If you run your fetch like this it will give you an error. So after artists, you will have to specify which artists you are looking for with their unique id, which you can find in the Spotify web browser in the link when you look up an artist like so : 


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

After that, I recommend console logging your results to make sure you have the results you're looking for (console log everything !!!!). I did a group project in my cohort which honestly I am very impressed with. Make sure you go check it out!!!!

https://github.com/javirodmart/phase1ProjectJTK 

If you do decide to check it make sure you put in a new token!
Unit testing in Go 2.0
Tags: opensource, go, testing
Published: 2022-11-18 03:18:37

Hello! Glad you've come. This week, I've been working on some Go unit testing, but this time not for SSGo, but rather for a project called [chunk](https://github.com/cuducos/chunk). Let me tell you more, maybe you'll gain something valuable for yourself!

## Project overview

Chunk is a download manager that downloads packages from a given URL divided in chunks one by one. It is written in Go and it is a starter project.

## Unit testing target and tools I used

Before chunk can download something, it needs to know it's size, and I have been working on unit testing `getDownloadSize()` function. It fetches a given URL and checks for its ContentLength or Content-Range header for understanding the size of the download. In the repo, there was an [issue](https://github.com/cuducos/chunk/issues/18) regarding that, so I made sure to let the maintainers know that I would like to work on the issue.

Since the project had tests in vanilla Go, I didn't use any additional packages like `testify` to keep the style consistent. It is important not to make a mess out in code, so new contributors understand the coding style of the project.

## Communication is key

Sometimes, you'll not get the full understanding of an issue, and get some feedback on your work. This does not necessarily mean you did wrong, and even if you did, it's obviously not the end of the world. It is important to hear what project maintainers have to say about your changes in order to make a useful contribution.

When I did my initial commit, I did get some feedback on what should be changed. It also involved some non-testing code changes, and I fell like my eventual changes would bring some better usability because I made actual code just a bit better.

In the end, my [pull request](https://github.com/cuducos/chunk/pull/19) has been approved and merged, and another successful contribution has been made. It's just incredible to contribute to other projects, having to also learn something new in the process.
The Top 5 Websites to Skyrocket Your Programming Skill Level
Tags: programming, hackathon, computerscience, coding
Published: 2022-11-18 04:22:11

---
title: The Top 5 Websites to Skyrocket Your Programming Skill Level
published: true
date: 2022-11-18 02:45:04 UTC
tags: programming,hackathons,computerscience,coding
canonical_url: https://medium.com/the-gray-area/the-top-5-websites-to-skyrocket-your-programming-skill-level-d23256f474c2
---

[![](https://cdn-images-1.medium.com/max/2600/0*izL-LOXGgeNPws71)](https://medium.com/the-gray-area/the-top-5-websites-to-skyrocket-your-programming-skill-level-d23256f474c2?source=rss-79a7fbf51e21------2)

TL;DR- The best websites I’ve found to maximize your programming skillset, keeping you engaged and consistent to optimize growth.

[Continue reading on The Gray Area »](https://medium.com/the-gray-area/the-top-5-websites-to-skyrocket-your-programming-skill-level-d23256f474c2?source=rss-79a7fbf51e21------2)
Static vs dynamic linking
Tags: programming, linux, computerscience, compilers
Published: 2022-11-18 00:05:54

### What is static linking?

Static linking links libraries at compile time, copying them to the final binary.

### What is dynamic linking?

Dynamic linking loads and links libraries at runtime, loading them to memory.

Only the name of the shared libraries is saved at compile time.

These names are saved in a PLT (Procedure Linkage Table)

### Static vs dynamic linking

**Static**

- Bigger binaries

**Dynamic**

- Depend on external libraries to be installed and be compatible
- Shared libraries are shared across processes
- Shared library code can be updated/patched without new compilation
- Updates to shared library code can add breaking changes and prevent the program from running

### How to create a statically linked binary?

```
$ ld [options] objfile
```

`ld` combines several object and archive files, relocates their data and ties up symbol references. Usually, the last step in compiling a program is to run `ld`.

```
$ gcc hello.c -static -o hello
```

### How to create a dynamically linked binary?

```
$ gcc hello.c -o hello
```

### How to know if a binary is statically or dynamically linked?

**Check the type of linking**

```
$ file /usr/bin/gcc

/usr/bin/gcc: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, BuildID[sha1]=017fc52acbca077c9bc6a4e8f04dd90eb5385243, for GNU/Linux 4.4.0, stripped
```

**Check dynamically linked libraries**

```
$ ldd /bin/gcc

linux-vdso.so.1 (0x00007fff6377e000)
libc.so.6 => /usr/lib/libc.so.6 (0x00007fcd238f2000)
/lib64/ld-linux-x86-64.so.2 => /usr/lib64/ld-linux-x86-64.so.2 (0x00007fcd23b02000)
```

Cover image icons by icons8.com
Slice of cake
Tags: go, slice, array
Published: 2022-11-18 00:02:00

---
title: Slice of cake
published: true
description: Small commentary on Go array and slice types
tags: Go, slice, array
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6obesavfjwipp73b5hg6.jpg
# Use a ratio of 100:42 for best results.
published_at: 2022-11-17 18:02 -0600
---

Is there a difference between slices and arrays? Well, if there is any, it is a difference of relations. `slice` depends on `array`, when you declare a slice in Go you get an underlying array associated with your slice, if you have several slices of the same type they may even share storage with the underlying array.

## How do you create a slice?

You can use the same facilities for declaring arrays in Go, with the optional argument for "capacity" provided:

```go
make([]int, 50, 100)
```

This is the same as creating an array and slicing it:

```go
new([100]int)[0:50]
```

### read more

- https://go.dev/ref/spec#Slice_types
Why Startups Suck at Security
Tags: startup, security, podcast, management
Published: 2022-11-17 23:14:38

When your startup is struggling to find its product-market fit, security is the last thing on your mind - and according to security expert Matt Spitz, that’s perfectly fine!

Matt is Vanta's Head of Engineering and he joins this week's episode of Dev Interrupted to  explain everything you ever wanted to know about startups and security.

Matt debunks the real security risks we face (think S3 buckets, not nation states), how to create a company culture that embraces security and when your startup needs to start caring about all this stuff.

{% spotify spotify:episode:2RIdNZuoUwZsCApkCa7KLC %}

## Episode Highlights Include:
* (2:06) Matt's career journey
* (7:00) Why startups suck at security
* (13:11) Sources of security risks (employees, vendors, S3 buckets)
* (20:54) Nation states aren't the danger
* (25:25) Creating a culture of security
* (28:41) "Blameless culture of reflection"
* (33:20) How to think about investing in security

***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 FKDwCgTSjWM %}

### Setup /:\ gitStream on your GitHub Repo today! [Learn more here](https://linearb.io/dev/gitstream/?utm_source=dev.to&utm_medium=referral&utm_campaign=gitStream%20-%20Referral%20-%20Distro%20-%20Podcast%20Blog)
![Sign up for gitStream today!](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dqhxfd36ofp8jfsyoqxk.png)
What's new with Amazon Appstore for Developers in 2022 [Slides]
Tags: droidcon, amazonappstore, android, amazon
Published: 2022-11-17 22:59:29

I had the opportunity to present a lightning talk at [Droidcon London 2022](https://london.droidcon.com/) on what's new with Amazon Appstore for Developers. I'm sharing the deck slides here for the dev.to community - please let me know if you have additional questions in the comments below. 

#### Talk overview
> Amazon Appstore reaches millions of customers worldwide on Fire TV, Fire tablets, mobile platforms, and Windows 11 devices. Join us to discover the latest developer tools for growing your user base, increasing ROI, and building immersive customer experiences.

{% speakerdeck 3a5b905b05ab427d8839e0311a40f06a %}

### Stay updated
Get the most up to date Amazon Appstore developer news, product releases, tutorials, and more:

* 📣 Follow [@AmazonAppDev](https://twitter.com/AmazonAppDev) and [our team](https://twitter.com/i/lists/1580293569897984000) on [Twitter](https://twitter.com/AmazonAppDev)
* 📺 Subscribe to our [Youtube channel](https://www.youtube.com/amazonappstoredevelopers)
* 📧 Sign up for the [Developer Newsletter](https://m.amazonappservices.com/devto-newsletter-subscribe)
Become a novice
Tags: mastery, books
Published: 2022-11-17 22:35:36

From Mastery by Robert Greene

Become a novice in your field, view everything with fresh eyes, get into the mindset of the masters.
Start checking dev.to & Linkedin more frequently. Maybe even get back on twitter?

p.s. Do you remember why you quit twitter? I wasn't because you did not care anymore. Something happened in 2019 and you don't really see it yet. Get back on it
Day 3: Defining who I am
Tags: devjournal, identity, frustration
Published: 2022-11-17 22:27:32

It has been two years since I made a post in this series. Two years! Some times I get sad at how lost I am in this programming journey. It feels like this is an area in my life that I can not get down but yet can not even entertain the idea of quitting.

My life is completely different than it was when I began coding about 10 years ago. I have experience life in a way that I never imagined I would. I've achieved things I thought were impossible for someone like me. Yet for what at certain points was the love of my life, programming, I have not been able to make much progress. But it is the one thing I am naturally inclined towards. Such irony.

Anyways, this the new me. I must continue as I know how the story ends and I'm just going along for the surprises.

Who is Albert the creative?
iOS developer
Designer
Videographer
PyLadies Dublin Oct Meetup @ Honeywell
Tags: pyladies
Published: 2022-11-17 22:09:15

![thank you gif](https://media.giphy.com/media/BYoRqTmcgzHcL9TCy1/giphy.gif)
❤️ A quick (and very belated) thank you to everyone who came to last month’s meetup and to [Ricardo Bánffy](https://www.linkedin.com/in/ricardobanffy/) and [Honeywell](https://careers.honeywell.com/us/en/Ireland) for organising and hosting our meetup. Thanks to Mick as well to help setup and tidy up after me, as always, while I chat to folks. 🙃

![awesome - animal crossing](https://media.giphy.com/media/ubo7O0FhmZxS073kL8/giphy.gif)
👏 to our speakers by [Molly Quinn](https://mollysquinn.github.io/), [Maria Doyle](https://www.bioconductor.org/) and [Antonio Bevilacqua](http://www.thisisanton.io/).

![info - matrix](https://media.giphy.com/media/zXmbOaTpbY6mA/giphy.gif)
Here are the talks slides and notebooks: https://github.com/pyladiesdublin/oct-talks-2022
(Note: I’ll try and get Antonio’s talk and link to this githhub repo as his talk on [Polars](https://www.pola.rs/) really generated a lot of interest.)

---

![Looking for Speakers 2023](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/y94li6j6wskh0mvf9xkp.png)

🎤 We are looking for speakers for next year, we hope to run 1 in-person event per quarter and rest as remote sessions. If you are interested in speaking, running a workshop, submit your details to https://share-eu1.hsforms.com/1HHEGqvm2Q_-B3vqjq53EfQf1bg5

---

📖 And one final thing before I sign off, [Andressa Valadares](https://www.linkedin.com/in/avaladares/) and I are thinking of doing Python Study groups (remotely initially) this/next month. We will keep you informed, and events will be posted on PyLadies Dublin Meetup.

🤔 Anything else, you can email us at dublin@pyladies.com