teleren/devto huggingface dataset:
Intune appends «/qn ALLUSERS=1»
Tags: powershell, intune, msi
Published: 2022-11-11 09:31:23

Are you trying to run a Powershell script as an Intune install command and you have the string `.msi` in it and realized that your command fails, because Intune automatically modifies it? Here is the thing. As soon as Intune finds `.msi` in your install command, it appends `/qn ALLUSERS=1` on its own. Even if they had good intentions to implement this, when we want to run a powershell script, they break our command.

Here is our install command in the Intune Administration GUI.


![Install command in GUI](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hxka8mdf7oktirtaevpb.png)

And here you see what is executed on the client.

![Install command in log file](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/axevh1ibhqahk6dzrkx1.png)

If you have named arguments in your Powershell script, the command will break. Powershell will throw an error because it does not know any parameter «/qn» or «ALLUSERS=1».

Here is an example. If you have the following Install command, you will get an error.
```
powershell -executionpolicy bypass -file .\installer.ps1 -myMSI "https://domain.com/myMsiPackage.msi"
```

The trick is to use **unnamed arguments** in your script. In the following example, we removed `-myMSI`.
```
powershell -executionpolicy bypass -file .\installer.ps1 "https://domain.com/myMsiPackage.msi"
```

Now, at the top of your script, don’t catch the parameters with a `param()` block. Catch them with the `$args` array. The `installer.ps1` would start with the following line.

```
$myMSI = $args[0]
# $myMSI will contain -> https://domain.com/myMsiPackage.msi

# the rest can be ignored
# $args[1] will contain -> /qn
# $args[2] will contain -> ALLUSERS=1
```

Very easy if you know how.
PcapPlusPlus v22.11 Released - C++ library for capturing and analyzing network packets
Tags: networking, cpp, opensource
Published: 2022-11-11 09:19:33

Hi everyone!

I'm so excited to share that [PcapPlusPlus v22.11](https://github.com/seladb/PcapPlusPlus/releases/tag/v22.11) is out! 🔥🔥

Let me start off by a quick introduction to the project.

[PcapPlusPlus](https://github.com/seladb/PcapPlusPlus) is a C++ library for capturing, analyzing, parsing and crafting of network packets. It is designed to be efficient, powerful and easy to use and provides a C++ wrapper for the most popular packet processing engines such as libpcap, WinPcap, Npcap, DPDK and PF_RING.

You can learn more about the project on our [web-site](https://pcapplusplus.github.io/).

Some numbers and stats: at the time of writing (November 2022) the project has over 80 contributors, around 44K downloads and more than 2000 GitHub stars. v22.11 is the 12th release, and typically a new release comes out 1-2 times a year.

Now let me share some of the exciting stuff included in this release:

- PcapPlusPlus finally moved to C++11. It took some time, but it's finally there :)
- As a result, we removed the `pthreads` dependency and replaced it with C++11 `std::thread`
  - Unfortunately this required dropping MinGW32 support because it doesn't support std::thread, but the good news is that MinGW-w64 and Visual Studio support remained unchanged
- We added tons of new protocols which brings the total number of supported protocols to 40 (!!). (here is the full list of protocols):
  - Telnet
  - FTP
  - ICMPv6
  - NDP
  - LLC
  - STP
  - SOME/IP
  - Wake on LAN (WoL)
- Added support for DPDK 21.11 and various fixes to the DPDK setup process and NIC support
- Handle unilateral RST in TCP reassembly
- Retrieve a live device IPv6 address if available
- Add `.zst` file extension support for pcapng files compressed with Zstd
- Improved and modernized our internal tooling
- Tons of bug fixes and minor improvements that could not fit into this list

You can see the full list of changes in the release notes: https://github.com/seladb/PcapPlusPlus/releases/tag/v22.11

We welcome contributors and are interested in having more people joining this project. You are welcome to check out the project on GitHub and see the open issues or suggest features. If you like the project, please consider giving it a GitHub star ⭐⭐.

I'll be happy to answer any questions.
How to draw text on Canvas using drawText API in Jetpack Compose?
Tags: android, jetpackcompose, kotlin, mobile
Published: 2022-11-11 09:16:44

Exploring text on Canvas using drawText API in Jetpack Compose.

Before Compose 1.3.0, there was no `drawText()`. We couldn’t draw text directly on the Jetpack Compose canvas, we had to use android native canvas `canvas.nativeCanvas.drawText` to draw text.

The recent release of Jetpack Compose 1.3.0 introduces many new APIs. And Text on Canvas is one of them.

Please note that this API is still in the experimental state and it is likely to change in the future.

In this blog post, we’ll explore the new `DrawScope.drawText()` API with multiple examples.

For those who are interested in code only, [here you go](https://github.com/cp-radhika-s/TextOnCanvasDemo).

[The original post](https://blog.canopas.com/exploring-text-on-canvas-using-drawtext-api-in-jetpack-compose-402e1285935c) is published on the Canopas blog.
Bash Basics - Navigating the Filesystem.
Tags: bash, beginners
Published: 2022-11-11 09:00:00

Being able to use a server without a UI is a **crucial skill** for every developer. In this article I will tell how to navigate a servers filesystem using **bash**.

## The Commands

```bash
pwd         # print path to current directory
ls <path>   # print visible content of current directory
cd <path>   # change current directory
cat <path>  # print content of a file
```

Paths can be expressed in different ways. Here is an overview of what this means in practise.

```bash
# Ways to express paths
foo/bar      # relative to current directory
./foo/bar    # equivalent to foo/bar

/foo/bar     # from root
~/foo/bar    # from home directory
../          # to parent directory
```

Hence, if you want to move to the parent directory, you type:

```bash
cd ../
```

In order to check the content of the `assets/` folder in your current directory (if one exists) you would type:

```bash
ls assets/
# or
ls ./assets/
```

Some of these commands can show even more information. For that to happen, you can apply `flags` to them. A good example of this is the `ls` command. Here are some examples:

```bash
# show all files and folders with their current permissions, creation date and file size
# remove `a` to hide hidden files (prefixed with `.`)
ls -ao <path>

# also show all subdirectories recursively
# caution - gets big fast!
ls -R

# show all files and folders including all their subdirectories
# with their current permissions, creation date and file size
ls -aoR <path>

# Add line-numbers to the output
cat -n <path>
```

Did I miss something? Let me know!
<small>
Image taken from unsplash by [Gabriel Heinzer](https://unsplash.com/photos/4Mw7nkQDByk)
</small>
AWS Devops Pro compliance validation Ability
Published: 2022-11-11 07:15:31

[AWS Devops Pro](https://dumpsarena.com/amazon-dumps/aws-devops-engineer-professional/) Recommended expertise and enjoy Experience growing Code  in as a minimum one excessive-stage programming language; constructing especially computerized infrastructures; and administering running structures Understanding of present day improvement and operations tactics and methodologies Ability to enforce and manipulate non-stop transport structures and methodologies on AWS Ability to enforce and automate protection controls, governance tactics, and compliance validation Ability to outline and install tracking, [AWS Devops Pro](https://dumpsarena.com/amazon-dumps/aws-devops-engineer-professional/) metrics, and logging structures on AWS In the examination manual, we may want to see the content material expounds greater element into 6 fields that this certification goes to check whether or not you could reply unexpectedly toward agency situations and apprehend what AWS offerings can fulfil the necessities in the ones instances. SDLC Automation Apply standards required to automate a CI/CD pipeline Determine supply manipulate techniques and a way to enforce them Apply standards required to automate and combine trying out 

Get 25% Special Discount ……..>>>>>>>>> https://dumpsarena.com/amazon-dumps/aws-devops-engineer-professional/
Keyoxide Proof
Published: 2022-11-11 08:06:45

This is an OpenPGP proof that connects [my OpenPGP key](https://keyoxide.org/e60307564de792b3eeb120d3c4af061dbf84645f) to [this dev.to account](https://dev.to/danehkar). For details check out https://keyoxide.org/guides/openpgp-proofs

[Verifying my OpenPGP key: openpgp4fpr:e60307564de792b3eeb120d3c4af061dbf84645f]
Today's Fun Joke For Developers - Daily Developer Jokes
Tags: jokes, dailydeveloperjokes
Published: 2022-11-11 08:00:21

---
title: "Today's Fun Joke For Developers - Daily Developer Jokes"
description: "Check out today's daily developer joke! (a project by Fred Adams at xtrp.io)"
series: "Daily Developer Jokes"
published: true
tags: #jokes, #dailydeveloperjokes
---

Hi there! Here's today's Daily Developer Joke. We hope you enjoy it; it's a good one.

![Joke Image](https://private.xtrp.io/projects/DailyDeveloperJokes/public_image_server/images/5e12594523a5e.png)

---

For more jokes, and to submit your own joke to get featured, check out the [Daily Developer Jokes Website](https://dailydeveloperjokes.github.io/). We're also open sourced, so feel free to view [our GitHub Profile](https://github.com/dailydeveloperjokes).

### Leave this post a ❤️ if you liked today's joke, and stay tuned for tomorrow's joke too!

_This joke comes from [Dad-Jokes GitHub Repo by Wes Bos](https://github.com/wesbos/dad-jokes) (thank you!), whose owner has given me permission to use this joke with credit._

<!--
Joke text:
___Q:___ What did the process say after working in an infinite loop all day?

___A:___ I need a break.
 -->
Next 13 - Special files
Tags: nextjs, webdev, beginners
Published: 2022-11-11 07:55:46

A super cool new addition to this new routing/layout style of Next 13 is the fact that we get a couple of special files that make our application more robust.

The concept of these files already existed, but we had to wrap many elements with Suspense to achieve the same manually.

Let's take a look at which ones we get:

- `page.tsx`: We already used this to create our pages.
- `layout.tsx`: Defined to create the layouts per folder.
- `loading.tsx`: Optional loading component can be used to show a loading state.
- `error.tsx`: Optional error state can be used only to show the error in a specific application part.
- `template.tsx`: Optional and very similar to layout, but this one will always remount on navigation, and the state is not shared.
- `head.tsx`: Optional to add a different `<head>` tag for a specific route.

For this article, we'll look into loading and error components.

## Next 13 loading component

Let's say you have a component that can initially take quite some time to load.
We will block the page until the load is done without any loading or handling of the load.

Since the loading only would happen in one of our components, we get the fantastic feature of loading components.
By adding these to our folder, we can show the time it takes to load.

The big benefit being it won't block the rest of the page or our navigation.

To add these files, add a `loading.tsx` file. Some example content could be:

```js
export default function Loading() {
  return <p>Loading account details</p>;
}
```

I placed this in the `app/dashboard/account/loading.tsx` spot. We'll work on testing it out in the following article.

## Next 13 error component

Like the loading component, it could be that only one element on the page gives us an error.
By default, this could crash out the entire application, but with this new error component, we can only show that piece of the puzzle as an error.

You can add this file by creating an `error.tsx` file in your component folder.

> Note: This has to be a client component!

An example error component would look like this.

```js
'use client';

export default function Error({
  error,
  reset,
}: {
  error: Error,
  reset: () => void,
}) {
  return (
    <div>
      <p>Something went wrong!</p>
      <button onClick={() => reset()}>Reset error boundary</button>
    </div>
  );
}
```

Now, we show this snippet whenever an error happens in this component, and the user can retry the component render.

I added these components on GitHub with some sample code we'll dive into later, but you can already check it out in [this branch](https://github.com/rebelchris/next-13/tree/special-files).

### 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)
26. Leetcode Solution in JavaScript
Tags: javascript
Published: 2022-11-11 07:50:49

```javascript
/**
 * @param {number[]} nums
 * @return {number}
 */
var removeDuplicates = function(nums) {
    var start = 0;
    for (var i = 0; i < nums.length; i++) {
        if (nums[start] !== nums[i]) {
            start++;
            nums[start] = nums[i];
        }
    }
    return start + 1;
};
```

#leetcode
#challenge
Here is the link for the problem:
https://leetcode.com/problems/remove-duplicates-from-sorted-array/
5 things you should really know about K8S resources
Tags: kubernetes, tutorial, cloudnative, cloudskills
Published: 2022-11-11 07:49:51

One core part of resource management for Pods and Containers are [Requests and Limits for CPU and Memory](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/#requests-and-limits).

Therefore  without any further ado here are the five things you should really know about Kubernetes resources:

1. Requests and limits are on a per-container basis.
2. **Requests** are what the container is guaranteed to get and **Limits** are what the container is allowed to use, and it is restricted to go above limits.
4. Pods are **scheduled** based on CPU and Memory **requests**.
5. Removing CPU Limits it okay as long as the requests are pretty close to the expected load.
6. CPU is considered a “compressible ” resource, whereas memory is not since K8s cannot throttle memory usage.

For a more detailed presentation you can check [Kubernetes capacity management — resources and metrics](https://medium.com/@dejanualexandru/kubernetes-capacity-management-resources-and-metrics-d449d65955cb).
open position for Rust & GoLang Developer
Published: 2022-11-11 07:38:03

_* GoLang and/or Rust developer (primarily GoLang) who is experienced with Kubernetes, microservices, rest api, gRPC, GraphQL APIs, Even-driven Services, Reactive Programming, writing docker containers file, etc.  Total experience minimum 2 + years. 
* Experience in writing Kernel Functions using eBPF and/or byte code using WebAssembly in  GoLang or Rust  - minimum 1 year experience is enough for this, not mandatory required skill. 
* Experience in writing blogs and documentation is very important & mandatory, especially using Markdown.
* Experience in Kubernetes operator development, Kubernetes custom API development, Kubernetes custom resource definitions development, Kubernetes Admission controllers & webhooks development, etc. is a plus. 
* Secondary - Experience working with Temporal.io workflow orchestrator & event-driven application like NATS, Apache Kafka, Apache Pulsar, etc. tools are a plus. 
* Opensource development and/or contribution experience is a plus. 
* Writing blogs and documentation is very important & mandatory, especially using Markdown.

Any one interested in this job Profile please share me your updated profiles to **npatchigolla@appstekcorp.com**
One More to the List of Things EF Does "For Me"
Published: 2022-11-11 07:30:46

So if you have browsed my profile, you'll see an entire article why I dislike **Entity Framework** for REST development.

Well, a couple of days ago it did it again!  Oh so helpful **EF** with their navigation properties produced an infinite loop when serializing a complex response, making the pod consume the processor and eventually restarting.

Awesome.  Just the kind of help I look for in an ORM. &lt;Insert sarcastic smiley here&gt;
Hacktoberfest_2022
Tags: hacktoberfest, github, opensource
Published: 2022-11-11 07:30:24

Hacktoberfest, DigitalOcean’s annual event that encourages people to contribute to open source throughout October, officially ended a week ago. It's always fascinating to contribute to open source. And Hacktoberfest perfectly sets the stage for it.

It was a joy to take part in this event, which gave me a wealth of knowledge. It was like a roller coaster ride of inclusion and exclusion.

It's just the beginning; there is a long way to go. Most importantly, I learned to be patient in order to read and understand the codes of others.

Here is my GitHub link : https://github.com/AshishSharma1203

I earned some HOLOPIN badges while participating in these activities.
Link :https://www.holopin.io/@ashish_sharma

Thank you for organising such a wonderful opportunity.
DigitalOcean Appwrite Docker, Inc


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/udczvlrlm7pqpmrygtdn.png)
Asking the interviewer a question at the end is a great way to make a good impression during an interview✨
Tags: webdev, programming, career
Published: 2022-11-11 07:29:46

Confused about what to ask?
here you go,

1. Success at the company:

- What traits and characteristics define a successful employee in the workplace?

- Which soft skills do you believe will be most beneficial to the business and position?

- What criteria or objectives will be used to assess my performance?
2. About the company:

- Can you elaborate on your company's values and how they are implemented?

- What are the company's largest current opportunities?
3. Specific to the interviewer:

- What do you like best about your job at this company?

- What has been your best experience with this company?

- What does a normal day at work look like for you?
4. Your role:

- What does a day in this position at your organization look like?

- What do you consider to be the most difficult part of the job?

- How have others in this position succeeded in the past?
DON'T pass on this question as it is a great opportunity to make a good last impression!

You have the opportunity to show enthusiasm, curiosity, and your research about the company.

Before the interview, jot down the question.

All the best
Design Pattern
Tags: beginners
Published: 2022-11-11 07:23:37

# What is a design pattern? 
Design patterns are solutions to commonly occurring problems in software design. Design pattern is not code - rather, design patterns act as a guide or paradigm to help software engineers create products following best practices.

---

# History of patterns
Design patterns are not obscure, sophisticated concepts - quite the opposite. Patterns are typical solutions to common problems in object-oriented design. When a solution gets repeated over and over in various projects, someone eventually puts a name to it and describes the solution in detail. 

famous books
1. [A Pattern Language: Towns, Buildings, Construction (Center for Environmental Structure Series)](https://www.amazon.com/-/dp/0195019199)
2. [Design Patterns: Elements of Reusable Object-Oriented Software](https://www.amazon.com/gp/product/0201633612/)

---

# Why should learn patterns?
Design patterns are a toolkit of tried and tested solutions to common problems in software design. 
Design patterns define a common language that you and your teammates can use to communicate more efficiently.

1. Proven Solution
Software developer does not have to reinvent the wheel when that problem occurs. 

2. Reusable
Design patterns can be modified to solve many kinds of problems - they are not just tied to a single problem.

3. Expressive
Design patterns are an elegant solution.

4. Prevent the need for refactoring code
Since the design pattern is already the optimal solution for the problem, this can avoid refactoring.

5. Lower the size of the codebase
Each pattern helps software developers change how the system works without a full redesign. Further, as the "optimal" solution, the design pattern often requires less code.


---

# Classification of patterns
Design patterns differ by their complexity, level of detail and scale of applicability to the entire system being designed. Design patterns can be broken down into 3 types. 
- **Creational patterns** provide object creation mechanisms that increase flexibility and reuse of existing code
- **Structural patterns** explain how to assemble objects and classes into larger structure, while keeping structures flexible and efficient
- **Behavioral patterns** take care of effective communication and the assignment of responsibilities between objects

## Creational patterns
- Factory Method
- Abstract Factory
- Builder
- [Prototype](https://dev.to/ak18/prototype-clone-2b52)
- [Singleton](https://dev.to/ak18/singleton-4ild)
- [Object Pool](https://dev.to/ak18/object-pool-1fl2)

## Structural patterns
- Adapter
- Bridge
- [Composite](https://dev.to/ak18/composite-object-tree-35gj)
- Decorator
- Facade
- Flyweight
- Proxy

## Behavioral patterns
- Chain of responsibility
- Command
- Iterator
- [Mediator](https://dev.to/ak18/mediatorintermediary-controller-2hd0)
- Memento
- [Observer](https://dev.to/ak18/observerevent-subscriber-listener-2eil)
- [State](https://dev.to/ak18/state-pnf)
- [Strategy](https://dev.to/ak18/strategy-1m65)
- [Template method](https://dev.to/ak18/template-method-4n9b)
- Visitor
JavaScript String methods
Published: 2022-11-11 07:10:51

Method	Description
```js
charAt(index)	//returns the character at the specified index
concat()	//joins two or more strings
replace()	//replaces a string with another string
split()	        //converts the string to an array of strings
substr(start, length)	//returns a part of a string
substring(start,end)	//returns a part of a string
slice(start, end)	//returns a part of a string
toLowerCase()	//returns the passed string in lower case
toUpperCase()	//returns the passed string in upper9 case
trim()	//removes whitespace from the strings
includes()	//searches for a string and returns a boolean value
search()	//searches for a string and returns a position of a match
```