teleren/devto huggingface dataset:
Employee Monitoring System or Spying System ft. kickidler
Tags: kickidler, spyingemployees, spyingsyst, employeeexperience
Published: 2023-09-04 15:08:51

A few days back, I checked out an employee monitoring system called kickidler(https://www.kickidler.com). I was very shocked to see that these software's bypass the security vulnerability in windows and spy with utmost conviction by recording screen video and create history of every app you used and every key you pressed with detail report 24/7

You cannot see their program installed in installed software's list and it is not detectable by your windows defender. It is like an evolved virus.

How to detect?

1. I have found a solution, If you go to Task Manager > Services then look for `ngs`, if you find this service running then it means you have kickidler on your system and just stop this process.
2. Download kickidler grabber software from here https://www.kickidler.com/windows.html and when you click on it it will show you a remove option, remove this app and you will be set.
If you enjoyed the article and have questions, make sure to:
🔔 Connect with me on mudassirali.com
How To Set a Custom Node URL in MetaMask - Tokenview
Tags: metamask, rpc, node
Published: 2023-09-04 14:40:51

<h3>What is MetaMask?</h3><p>MetaMask is one of the essential tools for web3 development. MetaMask is a cryptocurrency wallet browser extension that connects to the Ethereum blockchain and supports other EVM (Ethereum Virtual Machine) based chains. It is one of the best wallets to interact with Decentralized Applications (dApps) and Decentralized Exchanges (DEXs). MetaMask is not limited to storing native blockchain currencies, such as ETH or BSC. It can also store ERC-20 or BEP-20 tokens. It is compatible with major browsers such as Chrome, Firefox, Brave, and Microsoft Edge. </p><h3>Creating an Endpoint on Tokenview Node As a Service</h3><p>You can create a free account on Tokenview Blockchain APIs platform within a few clicks. Just select a plan, get the APIKEY, choose a chain, select a network, and create your endpoint. After you've created your endpoint, copy your HTTP Provider URL:</p>
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zkaoxrslbuvzzord0lus.png)<h3>Setting up MetaMask with Tokenview Node Service URL</h3><p>If you haven't done so already, please <a href='https://metamask.io/download/' alt='download metamask' title='download metamask'>download the MetaMask</a> browser extension. Create an account and ensure that you keep your seed phrase secure.</p><h4>Step 1: Open MetaMask, add network and select 'Add network manually'</h4><p>MetaMask will open in a new tab in fullscreen mode. From here, find and the 'Add network manually' button at the bottom of the network list. </p>
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/z80057a7d3ncv5ekf1bw.png)<h4>Step 2: Add the Tokenview endpoint URL</h4><p>Paste your Tokenview endpoint URL in the second field that says 'New RPC URL'. Enter the “Chain ID”, which is also known as the network id (1 in this case as we are using an Ethereum Mainnet endpoint), and click on save.</p>
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5x0zv127drtibk1c7i3a.png)<p>Listed below are the Chain / Network IDs for various EVM based networks:</p><ul><li>Ethereum Mainnet: 1</li><li>Ethereum Testnet Rinkeby: 4</li><li>Ethereum Testnet Kovan: 42</li><li>Ethereum Testnet Ropsten: 3</li><li>Ethereum Testnet Görli: 5</li><li>Gnosis Chain: 100</li><li>BNB Smart Chain Mainnet: 56</li><li>Polygon/Matic Mainnet: 137</li><li>Optimistic Ethereum: 10</li><h3>Step 3: Successed</h3><p>Now you’ll be able to see your Tokenview node under the available networks in your MetaMask wallet. </p>
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/w2ytolt32mfyrdu4xbje.png)<h3>Conclusion</h3><p>Now we’ve successfully added Tokenview as the custom RPC URL in the MetaMask wallet. It is always a good idea to have a custom network added to your MetaMask for faster transactions or even as a backup. </p>
Laravel WithSum() on hasManyThrough->where relationship
Published: 2023-09-04 14:36:31

In Laravel, we can use the withSum method with combination hasManyThrough relationship with the where clause to calculate the sum of related records from  while applying conditions to the related records. Here's how you can do it:

Assuming you have the same example of **Client**, **Order**, **OrderDetail** models where you want to calculate the sum of qnt in OrderDetail  populations for a specific client but with additional conditions :

```
// Order.php model
class Order extends Model
{
     protected $fillable = [
        'user_id',
        'status',
     ];
}

// OrderDetail .php model
class OrderDetail extends Model
{
     protected $fillable = [
        'order_id',
        'product_id',
        'quantity',
        'amount'
     ];
}


```

Now, define the hasManyThrough relationship in the Client model:

```

// Client.php model
class Client extends Model
{
      public function ordersDetails(){
        return $this->hasManyThrough(OrderDetail::class,Order::class,'user_id','order_id','id','id')
       ->where('orders.status',Order::COMPLETED);
    }
}
```

To calculate the sum of quantity for a specific clients, you can use the withSum method in your query:

```
  $clients = Client::withSum(['ordersDetails'],'quantity')->get();
   // you can see column order_details_sum_quantity 

```
Boost Your Productivity with Xclippy - Clipboard Manager for macOS!
Tags: macos, xclippy, clipboard
Published: 2023-09-04 14:23:26

Are you tired of juggling multiple copy-paste actions on your Mac? Say hello to seamless organization and efficiency with our advanced Clipboard Manager!

🚀 **Experience the Power of Xclippy**
No more lost text snippets or forgotten URLs. Our Clipboard Manager for macOS empowers you to copy and store multiple items, making them readily accessible whenever you need them. Whether you're a student, a professional, or a creative enthusiast, our tool streamlines your workflow.

✨ **Why Choose Xclippy?**
- **Effortless Storage**: Store numerous text snippets, links, and images with a simple copy-paste.
- **Intelligent Organization**: Group related items, label them, and find what you need in an instant.
- **Search in a Flash**: Our intelligent search feature helps you locate your stored content quickly.
- **Privacy Matters**: Rest easy knowing your sensitive data remains on your device.
- **Seamless Integration**: Works harmoniously with your favorite apps, boosting your overall productivity.
- **Use Hotkeys**: Use shortcuts for even quicker access.
- **User-Friendly Interface**: Intuitive design for a smooth and enjoyable experience.

🔥 **Get Started Today and Simplify Your Workflow**
Embrace the convenience of having your frequently used content at your fingertips. Whether you're a researcher, developer, writer, or multitasker, Xclippy enhances your Mac experience.

👉 **Try Xclippy Now**: [Xclippy](https://xclippy.com/)
What are your Goals for the week of September 4th?
Tags: discuss, motivation
Published: 2023-09-04 14:12:00

## What are your goals for this week?


- What are you building? 
- What will be a good result by week's end?
- Are you attending any events this week? 
  * Any suggestions of events to attend?
- Did you meet your goals last week?

It's Labor Day in the US. Schools are closed and many people are off for the day. It's the unofficial end of summer and start of Fall. My kid ended up with a four day weekend but got sick so we'll see how today goes.


Checked my calendar looks like plenty of events this month.  Accessibility Guidelines seminar this week, [CodeWorld](https://www.crowdcast.io/@fitc), and RedwoodJS later this month.

### Last Week's Goals


- [:white_check_mark:] Continue Job Search. Applications, and chatting with people in a company I'm interested in.
- [:white_check_mark:] Blog. Joined an LinkedIn accountability challenge. Doing a daily post there. If content spurs ideals, It may be a source for content here.  
- [:white_check_mark:] Code Challenges. 
- Project work
  * [:white_check_mark:] Content update.
- Events
  * [:x:]Attend [Virtual Coffee(VC)](https://dev.to/virtualcoffee) Thursday.

  * [:white_check_mark:] Other VC events if I can. * Attended our Preptember kickoff event. It was about preparing to maintain a project during Hacktoberfest.

- [:white_check_mark:] Run a weekly Slack thread similar to this post. Gonna motivate the community.
- Build some LEGO sets. 
- [:white_check_mark:] Rewatch Star Wars Rebels. Finished the series.
- [:white_check_mark:] Process pics from weekend trip. 
- [:white_check_mark:] Add them to a website


### This Week's Goals

- Continue Job Search.
- Blog.
- Code Challenges. 
- Project work
- Events
  * Attend [Virtual Coffee(VC)](https://dev.to/virtualcoffee) Thursday.
  * Other VC events if I can.
  * WCAG 2.2 - An Overview of the New Accessibility Guidelines on Thursday.

- Run a weekly Slack thread similar to this post. Gonna motivate the community.
- I joined a 30 Day Accountability group on LinkedIn. It's 30 days of prompts to create content and support other group members. I'll post there daily. 

### Your Goals for the week


You've read my goals so I'll throw the questions back to you.


- What are you building? 
- What will be a good result by week's end?
- Are you attending any events this week? 
  * Any suggestions of events to attend?
- Did you meet your goals last week?



```html
-$JarvisScript git push
```
Vérifier les droits d'un utilisateur dans Kubernetes
Tags: kubernetes, devops, sre, tutorial
Published: 2023-09-04 14:03:00

Quand on travaille avec un cluster Kubernetes, il se peut qu'on ne se rappelle plus quels sont les droits RBAC que l'on a donné à un utilisateur ou un service account. 

Du coup, si on a besoin de savoir si un utilisateur possède des droits sur une action spécifique, au lieu d'aller fouiller dans les RBAC à trouver les droits, on peut utiliser `kubectl auth can-i`.

## Détail de la commande
### Utilisateur courant

```bash
kubectl auth can-i [action] [ressource]
```

Présenté sous ce format, la commande va vous permettre de savoir si l'utilisateur avec lequel vous êtes actuellement connecté sur le cluster **possède le droit d'effectuer l'action définie sur la ressource définie.**

*Exemple pour vérifier si l'utilisateur courant peut créer un pod :* 
```bash
kubectl auth can-i create pod
```

Le résultat que vous obtiendrez sera un simple `yes` si vous avez le droit. `no` si vous ne l'avez pas.

### Vérifier dans un cluster particulier
La commande définie ci-dessus permet de vérifier les ressources qui ont un scope cluster, ou celles qui ont un scope namespace et qui sont dans le namespace default.

Pour pouvoir vérifier les droits dans un namespace particulier, ajouter l'option `--namespace [nom du namespace]`.

### Vérifier pour un autre utilisateur
Si jamais vous voulez vérifier les droits d'un autre utilisateur, vous pouvez ajouter à la fin l'option `--as` suivi du nom de l'utilisateur qui vous intéresse.

*Exemple où l'on veut vérifier si toto peut lister les déploiements:*
```bash
kubectl auth can-i list deployment --as toto
```

### Vérifier pour un service account
Pour se faire passer pour un service account, il faut aussi utiliser l'option `--as`, sauf qu'il faut donner une valeur suivant le modèle suivant : `system:serviceaccount:[namespace]:[nom service account]`.

*Exemple où l'on veut vérifier si le service account titi dans le namespace test peut supprimer une configmap :*
```bash
kubectl auth can-i delete configmap --as system:serviceaccount:test:titi
```

---

### Références
- [Documentation Kubernetes - Commande auth can-i](https://kubernetes.io/docs/reference/access-authn-authz/authorization/#checking-api-access)
- [Man - Kubectl auth can-i](https://www.mankier.com/1/kubectl-auth-can-i)

---

Et voilà, c'est aussi simple que ça et toujours très pratique pour faire quelques validations rapides.

---

J'espère que ça vous aidera et si jamais vous avez des questions, quelles qu'elles soient *(Il n'y a jamais de questions bêtes!)* ou des points qui ne sont pas clairs pour vous, n'hésitez pas à laisser un message dans les commentaires ou à me joindre directement sur [LinkedIn](https://www.linkedin.com/in/maxime-guilbert-14b6a5128/) *(même pour parler d'autres sujets!)*.
Check user RBAC rights
Tags: kubernetes, devops, sre, tutorial
Published: 2023-09-04 14:02:00

When we work with a Kubernetes cluster, it happends that we don't remember if a user or service account has a specific right. 

So, to help us to not search in all the RBAC definition file, we can use the `kubectl auth can-i` command.

## Command details
### Current user

```bash
kubectl auth can-i [action] [resource]
```

With this template, you can check if **the current user is able to the action noted in the command on the resource type noted in the command.**

*Example to check if the current user can create a pod :* 
```bash
kubectl auth can-i create pod
```

The result will be `yes` if you have the permissions, or `no` if you haven't.

### Define namespace
The current command will ask for the permissions for cluster-scoped resources or for namespaced-scoped resources in the default namespace.

If you want to ask the rights in a particular namespace, you just have to add the option `--namespace [name of the namespace]`.

### Impersonnate another user
If you want to check the permissions for another user, you can impersonnate it by adding the option `--as` at the end of the command, followed by the name of the user.

*Example to check if toto can list deployments:*
```bash
kubectl auth can-i list deployment --as toto
```

### Impersonnate a service account
To impersonnate a service account, use the same `--as` option but with the following template : `system:serviceaccount:[namespace]:[nom service account]`.

*Example to check if the service account titi in the test namespace can delete configmap :*
```bash
kubectl auth can-i delete configmap --as system:serviceaccount:test:titi
```

---

### References
- [Documentation Kubernetes - Commande auth can-i](https://kubernetes.io/docs/reference/access-authn-authz/authorization/#checking-api-access)
- [Man - Kubectl auth can-i](https://www.mankier.com/1/kubectl-auth-can-i)

---

And that's it! Really easy to use and can same some time!

---

I hope it will help you and if you have any questions *(there are not dumb questions)* or some points are not clear for you, don't hesitate to add your question in the comments or to contact me directly on  [LinkedIn](https://www.linkedin.com/in/maxime-guilbert-14b6a5128/).
🚀 Exciting News! 🚀
Tags: webdev, javascript, nextjs, portfolio
Published: 2023-09-04 13:52:04


I'm excited to share my latest project with you all, my online portfolio powered by NextJS from Vercel and React!
The portfolio is fully bilingual, featuring both a dark and light theme to suit your preferences and scores a perfect 💯 on Google PageSpeed!

Check it out now: https://portfolio-kallarari.vercel.app/

I'd appreciate your visit and any feedback you might have, so please feel free to connect and let's discuss about this. Thank you for your support!
📢 Call for Paper Launch: PyLadiesCon - Share Your Insights with Us!
Tags: pyladies, cfp, conference
Published: 2023-09-04 13:47:08

PyLadies Dublin are so excited about the inaugural PyLadies global conference called PyLadiesCon taking place online from Dec 1st to Dec 3rd, 2023.

## 🎉 What is PyLadiesCon?

PyLadiesCon is an extraordinary event designed to promote diversity, learning, and empowerment within the Python community. It celebrates women in Python, aiming to create a welcoming and inclusive environment for all attendees.

🏡 https://conference.pyladies.com

## 🌟 Share Your Knowledge: Call for Papers

We invite speakers from all backgrounds and experiences to share their insights, expertise, and stories with our vibrant community. Whether you’re a seasoned Python developer, an industry expert, or a first-time speaker, we encourage you to submit your proposals!

As we are a global community, we welcome talks in the following languages: English, Español, Português, Français, and 中文.

## 🔗 Submit Your Proposal:

The topics can range from technical talks to best practices, case studies, and more. Every story and perspective is valuable, and your contribution will enrich the conference experience for everyone.

{% cta https://pretalx.com/pyladiescon-2023/cfp %} Click here to submit your proposal. {% endcta %}


## 🗓️ Important Dates:

* **Call for Papers Launch:** August 4th
* **Proposal Submission Deadline:** September 10th
* **Speaker Notifications:** October 10th

## 🚀 Be Part of the Journey

Join us in shaping this remarkable event that empowers and inspires women in the Python community and beyond. Your voice matters, and your presence will contribute to the success of PyLadiesCon.

If you have any questions or need further information about the Call for Papers, please don’t hesitate to contact us at:

pyladiescon@pyladies.com

Thank you for your unwavering support and dedication to the PyLadies community. Together, let’s make PyLadiesCon an extraordinary celebration of women in Python!

---

_Original announcement: https://pyladies.com/blog/Announcement-CFP-Launch/cfp-launch-announcement/_
Kotlin Code Smell 36 - Object Coupling
Tags: kotlin, codesmells, cleancode, programming
Published: 2023-09-04 13:43:29

---
title: Kotlin Code Smell 36 - Object Coupling
published: true
date: 2023-09-04 13:41:17 UTC
tags: kotlin,codesmells,cleancode,programming
canonical_url: https://yonatankarp.com/kotlin-code-smell-36-object-coupling
---

> **TL;DR:** Respect object boundaries: avoid coupling to data and prioritize interfaces and behavior.

- When you view your objects merely as data holders, you risk violating their encapsulation.

## Problem

- Information Hiding Violation

- Encapsulation Violation

- Coupling

## Solution

- Always couple to interfaces and behavior, not data.

## Sample Code

### Wrong

```kotlin
data class Point(var x: Double, var y: Double)

class DistanceCalculator {
    fun distanceBetween(origin: Point, destination: Point): Double {
        return sqrt(
            (destination.x - origin.x).pow(2) +
                    (destination.y - origin.y).pow(2)
        )
    }
}

```

### Right

```kotlin
data class Point(
    private val radius: Double,
    private val theta: Double
) {
    val x: Double get() = radius * cos(theta)
    val y: Double get() = radius * sin(theta)
}

class DistanceCalculator {
    fun distanceBetween(origin: Point, destination: Point): Double {
        return sqrt(
            (destination.x - origin.x).pow(2) +
                    (destination.y - origin.y).pow(2)
        )
    }
}

```

## Conclusion

If your classes are polluted with setters, getters and public methods you will certainly have ways to couple to their accidental implementation.

* * *

I hope you enjoyed this journey and learned something new. If you want to stay updated with my latest thoughts and ideas, feel free to register for my [**newsletter**](https://yonatankarp.com/newsletter). You can also find me on [**LinkedIn**](https://www.linkedin.com/in/yonatankarp/) or [**Twitter**](https://twitter.com/yonatan_karp). Let's stay connected and keep the conversation going!

* * *

## Credits

- [Code Smell 55 - Object Orgy](https://maximilianocontieri.com/code-smell-55-object-orgy) by [Maximiliano Contieri](https://hashnode.com/@mcsee)
Redirect to 404 - NextJs 13 App Directory
Tags: nextjs
Published: 2023-09-04 13:39:25

The next/navigation package introduced in Next.js 13 App Directory makes it easy to handle 404 pages and redirect users when a page is not found.

One way to do this is with the notFound() function. Here's an example:

```
import { notFound } from 'next/navigation';

export default async function Component({ params }) {
  const { slug } = params;

  const res = await fetch(`https://api.example.com/item/${slug}`);

  if (res.status === 404) {
    notFound();
  }

  const item = await res.json();
  
  // rest of component
}
```

This fetches data for an item based on a slug. If the API returns a 404 status, we call notFound().

This will redirect the user to the custom 404 page defined in pages/404.js. It also shows the 404 page UI instantly without waiting for the fetch call, providing a smooth experience.

The key things to note:

`notFound()` prevents the rest of the component from rendering if called
It shows the 404 page immediately, no loading state
Custom 404 page is defined in src/app/not-found.tsx as usual
Some other examples of when you may want to use notFound():

- User visits a deleted page
- Invalid slug parameter
- Authentication failure

The `notFound()` function makes handling 404s clean and idiomatic in Next.js. Give it a try in your Next 13 app!

Let me know if you would like me to expand on any part of this post. I'm happy to include more details on how to customize the 404 page, integrate with an CMS, or any other use cases!
How to test Machine Learning code in Python? April 2023
Tags: video, pyladies
Published: 2023-09-04 13:38:38

## Meetup Details


- Original video: https://www.youtube.com/watch?v=WOrd7l2k-04
- {% embed https://github.com/pyladiesdublin/apr-talks-2023 %}

Joanna Lenzcuk talks about testing machine learning code in Python.

* When: Tuesday, April 18, 2023
* Where: LinkedIn One Wilton Park, Dublin, Ireland


How to test Machine Learning code in Python?
======================================
(30 minutes) The aim of this presentation is to illustrate the process of unit testing machine learning code using Python. Although unit testing is a familiar practice among software engineers, it is equally important for data scientists to employ it. The first segment of the talk will be a brief overview of the theory and objectives of unit testing. In the second part, I will provide practical examples of using pytest to test functions which relate to machine learning problems. I will demonstrate how to create a basic test for these types of functions, as well as a parameterized test, a mock, and a fixture.

About Joanna Lenczuk
--------------------------------------
I am a data scientist based in Dublin, Ireland. I have over three years of experience in machine learning projects. I acquired my analytical and coding skills in areas such as e-commerce, insurance and utilities. Currently, I work as a data scientist at CKDelta - a fast-growing data innovation start-up. In my current role, I am responsible for developing ML models and implementing MLOps practices.

https://www.linkedin.com/in/joanna-lenczuk

---

#PyLadies Dublin meetups are held on 3rd Tuesday each month.
Email: dublin@pyladies.com

Other places you can find us:-

- https://dublin.pyladies.com
- https://twitter.com/PyLadiesDub
- https://instagram.com/PyLadiesDub
- https://www.facebook.com/PyladiesDublin
- https://www.linkedin.com/company/pyladies-dublin

---

## 🔍 FAQ
#### Q. I'm not female, is it ok for me to attend?
A. Yes, PyLadies Dublin events are open to everyone at all levels.

#### Q. What do you do at PyLadies Dublin Meetups?
A. We have short (or long talks), demos, folks working on their own projects, ask questions on Python-related topics, work on projects together or generally chit-chat & meet like-minded people.

#### Q. Do you have a Code of Conduct?
A. Yes, you can find it at dublin.pyladies.com

#### Q. I am interested in giving a talk, where do I submit my interest and talk details?
A. You can submit your talk details to the following form:
https://sessionize.com/pyladies-dublin-meetup

#### Q: Where can I find the original live-stream?
A: Original uncut livestream: https://www.youtube.com/watch?v=advAYXfJvJI

#### Q: What did you use in post-production?
A: Davinci Resolve by Black Magic Design, it's free! https://www.blackmagicdesign.com/products/davinciresolve

Thumbnails are made via Canva (pro) including the intro and outro.