teleren/devto huggingface dataset:
Introduction of Azure Git
Tags: github, git, azure, aws
Published: 2023-06-16 15:27:18

Azure Git is a version control system provided as part of Microsoft's cloud platform, Azure. It offers a centralized and secure location to store and manage your source code repositories, enabling effective collaboration among development teams. Azure Git is integrated with Azure DevOps, a comprehensive set of development tools and services, providing a seamless end-to-end solution for software development and deployment.

With Azure Git, you can create and manage Git repositories to track changes, coordinate code contributions, and maintain a history of your project's development. It follows the same principles and functionalities as Git, which is a widely used distributed version control system.

Key features and benefits of Azure Git include:

1. Centralized Repository Hosting: Azure Git provides a central location to host your Git repositories, eliminating the need for self-hosted solutions. This ensures that your code is securely stored and easily accessible to authorized team members.

2. Collaboration and Code Reviews: Azure Git enables efficient collaboration by allowing multiple developers to work on the same project simultaneously. It supports features like pull requests, branch policies, and code reviews, facilitating a smooth and organized development workflow.

3. Integration with Azure DevOps Services: Azure Git seamlessly integrates with other Azure DevOps services, such as Azure Boards (for project management), Azure Pipelines (for continuous integration and deployment), and Azure Test Plans (for testing). This integration streamlines the development process and provides a cohesive environment for managing the complete software lifecycle.

4. Built-in Security and Compliance: Azure Git ensures the security of your source code through access controls, permissions, and secure connections. It complies with industry standards and regulations, offering features like role-based access control (RBAC) and compliance certifications (e.g., ISO, SOC, HIPAA) to meet various compliance requirements.

5. Scalability and Performance: Leveraging Azure's cloud infrastructure, Azure Git provides scalability and high availability, allowing your repositories to handle large codebases and accommodate growing development teams. It takes advantage of Azure's global network of data centers, ensuring fast and reliable access to repositories from anywhere in the world.

6. Extensibility and Integration: Azure Git integrates with popular development tools, including Visual Studio, Visual Studio Code, and Git clients, enabling developers to work with their preferred environments seamlessly. It also supports integrations with third-party services, such as CI/CD platforms and code review tools, to further enhance your development workflow.

Azure Git is a powerful and feature-rich version control system that complements the Azure ecosystem. It provides a secure and collaborative environment for managing source code repositories, integrating with Azure DevOps services, and enabling efficient software development and deployment processes.
A brief look at the CSS max() function
Published: 2023-06-16 15:22:48

CSS' [min()](https://www.1thingaweek.com/week/200/css-min-function), [minmax()](https://www.1thingaweek.com/week/202/css-minmax-function) and max() functions are still taking me some time to get my head around. Mostly because I'm not using them yet but I'm trying to look at them as often as possible in the hope that they click. Their names are counterintuitive to me, but they're usefulness outlays that... I think.

    width: max(50vw, 800px);

In this example, the item will be at least 800px wide, but will grow to be 50vw wide. Just like with the min() function, the two properties work together to define how wide an element would be. At some point, 800px an 50vw are the same. With min() we would see the image grow until it hits that point, with max() it is a static size until then. After, it's start growing to fill us much space as possible. CSS treats 1vw as 16px (800 / 50) in this example which means that 100vw would be 1600px.

{% codepen https://codepen.io/cchana/pen/GRvRXXB %}

Click through to the demo on Codepen and resize your browser. You'll see the image is always at least 800px wide and never less than half the size (50vw).

#### *Small update on using min() and max() in CSS

Since this was originally published on my blog, I have started to use the functions. I think I [understand](https://www.1thingaweek.com/week/210/understand-css-min-max-functions) how the work now, although I have to look up which does which each time because the names are confusing to me!
Kept You Waiting Huh?
Tags: webdev, programming, discuss
Published: 2023-06-16 15:22:39

Hey it's been a while. I thought I would update everyone on a few new things.

I NOW OWN METALGEARSOLID.JP. Because of this I will be consistently working on both domains and updating them. In the meantime silenthills.jp will remain as a blog that way everyone is updated.

In the meantime of that heres a link to the repo where you can download this blog format and also keep up with its progress.


## UPDATE
silenthills.jp will no longer be the blog.
Silenthills.jp Blog
Published: 2023-06-16 15:20:51

As you can see, Silenthills.jp will no longer be the main place for my blog. Im working on developing new uses for the domain. As of now Dev.to will be my new blog space. This is due to its simplicity of ease and because it means I can do what I need to do for silenthills. In the meantime all previous blog posts will be transferred over to here.
Dear Discord User....
Published: 2023-06-16 15:18:05

Hey you silly goose, If you happen to come across this or you were directed here it means that I have changed how my online interactions with people go, to be a bit more specific, on Discord. Recently I’ve become a lot more active in the various communities I am apart of and thats no easy feat. From working on projects, to work, and other facets of life, my time is quite precious. So I thought that the least I could do is take the time to write out in a concise way why you were directed here.



Thank you for reaching out to me, and I mean that. I genuinely appreciate your interest and willingness to connect with me, especially since I tend to be hard to read. However, I would like to clarify that my direct messages are intended for personal or close friends only.

As someone who values their time and relationships, I receive many messages from people who are interested in cybersecurity, seeking advice, sharing personal achievements, or discussing/debating various topics. While I value all of these interactions, I prefer to keep my direct messages reserved for my personal and/or close connections.

I hope you can understand my position. I believe in maintaining clear boundaries between my personal and professional life, and this includes how I use my direct messages.

If you have a matter you would like to discuss, I have turned message requests for all Discord servers on. Shoot me a request and I'll would be more than happy to engage in a conversation with you as soon as I can.
Learn, Decide, Grow
Tags: startup, softwareengineering, programming
Published: 2023-06-16 15:07:44

Working in a rapidly growing startup like Woovi requires you to adapt quickly to the market and customer demands. This environment often demands rapid decision-making. Being able to make decisions quickly, learn from them, and course-correct is crucial for us.

To make things easier, we document every single type of decision we take, showing both the tradeoffs of different approaches, and what we have learned from them. This way we take away some of the cognitive load, by making a map of our past mistakes.

For example one of the documented decisions we have is `When to create a new Component`. With a pretty small document we managed to save a lot of time from future decisions.

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

But while this helps in a lot of cases, everyday at Woovi we're presented with new challenges. These unexpected situations might seem daunting as they often necessitate quick decisions in the face of uncertainty.

To be able to move quickly in these scenarios, you need to understand and accept that not every decision you make will be the best one at first. Getting things right, especially on the first try, is extremely hard, if not impossible.

It's better that you fail as fast as possible and learn from it, rather than avoiding decisions due to fear of failing. Rather than seeing it as a failure, see it as an opportunity to learn, see what went wrong, and why, share with your team your discoveries. This mindset of 'failing forward' not only accelerates personal growth but also drives the evolution of our team and the entire organization.

---

If you want to work in a startup in its early stages, This  is your chance. [Apply today!](https://woovi.com/jobs/)

---

[Woovi](https://woovi.com/) is a Startup that enables shoppers to pay as they please. To make this possible, Woovi provides instant payment solutions for merchants to accept orders.

If you want to work with us, we are [hiring](https://woovi.com/jobs/)!

---

Photo by <a href="https://unsplash.com/@pinewatt?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText">pine  watt</a> on <a href="https://unsplash.com/photos/dUbKcgu0zjw?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText">Unsplash</a>
Fetching dynamic columns using StoredProcedure in EntityFramework
Published: 2023-06-16 15:00:09

Sometimes, you have to return dynamic columns with names e.g. column-1, column-2, …, column-n from the stored procedure. Since the column is varying in terms of name and number, it is difficult to map to our Model class.

## What would be the solution?
One of the solutions is returning IDictionary<string, object>. The code is given below.

```
public async Task<IEnumerable<IDictionary<string, object>>> GetDynamicDataFromSPAsync(string storedProcedureName, string connectionString, object[]? parameter = null)
    {
        List<Dictionary<string, object>> items = new List<Dictionary<string, object>>();
        
        if (connectionString is null)
        {
            return items;
        }
        using (var connection = new SqlConnection(connectionString))
        {
            await connection.OpenAsync();
            using (var command = new SqlCommand(storedProcedureName, connection))
            {
                if (parameter is not null)
                {
                    command.Parameters.AddRange(parameter);
                }
                command.CommandType = CommandType.StoredProcedure;
                using (var reader = await command.ExecuteReaderAsync())
                {
                    if (reader.HasRows)
                    {
                        while (await reader.ReadAsync())
                        {
                            Dictionary<string, object> obj = new Dictionary<string, object>();

                            for (int i = 0; i < reader.FieldCount; i++)
                            {
                                string columnName = reader.GetName(i);
                                object columnValue = reader.GetValue(i);
                                obj[columnName] = columnValue;
                            }
                            items.Add(obj);
                        }
                    }
                }
            }
        }
        return items;

    }
```
you can write the **object[] parameter** as shown below.

```
var parameter= new object[]
            {
             new SqlParameter("@PersonId", SqlDbType.Int) { Value = 1},                  
             new SqlParameter("@CountryCode", SqlDbType.VarChar) { Value = "AU"}
            };
```

Thank you.
DEV Office Tour v3
Tags: codenewbie, beginners, watercooler, career
Published: 2023-06-16 15:00:00

Hey DEV Community! Welcome back to our biweekly Office Tour thread, where we celebrate the spaces that inspire you!

Your desk is more than just a surface — it reflects your personality, creativity, and dedication. So, let's share a glimpse of your workspace with the DEV community!

Tell us about the essential tools that join you on your coding adventures. Is your keyboard your trusted companion, marked by countless lines of code? Do you have pens, notebooks, and sticky notes at the ready? Highlight the pieces that power your productivity, like your dual-monitor setup or laptop stand.

We also want to see the personal touches that make your workspace unique! Is there a travel memento, a cherished action figure, or a photo that brings warmth to your day? Share the little details that remind you of what truly matters and create a sense of belonging.

Join the conversation in the comments — engage, provide feedback, and appreciate the variety of desks within our DEV Community. Let us know how your workspace influences your productivity, focus, and well-being. Let's celebrate the spaces that shape our creativity and drive us forward on our coding journeys!

Happy desk touring!
Response Compression in a .Net Core API
Tags: api, dotnet, cleancode
Published: 2023-06-16 14:54:36

By enabling response compression, you can reduce the size of the responses sent by your API, improving network efficiency and overall performance.

Install the package Microsoft.AspNetCore.ResponseCompression

Configure it as shown in the code snippet.

```
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.ResponseCompression;
using Microsoft.Extensions.DependencyInjection;
using System.IO.Compression;

public class Startup
{
    public void ConfigureServices(IServiceCollection services)
    {
        services.AddResponseCompression(options =>
        {
            options.EnableForHttps = true; // Enable compression for HTTPS requests
            options.Providers.Add<BrotliCompressionProvider>(); // Use Brotli compression
            options.Providers.Add<GzipCompressionProvider>(); // Use Gzip compression
        });

        services.Configure<BrotliCompressionProviderOptions>(options =>
        {
            options.Level = CompressionLevel.Fastest; // Set the compression level for Brotli
        });

        services.Configure<GzipCompressionProviderOptions>(options =>
        {
            options.Level = CompressionLevel.Optimal; // Set the compression level for Gzip
        });

        // Other service configurations...
    }

    public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
    {
        // Other app configurations...

        app.UseResponseCompression();

        // Other app middleware...
    }
}
```

Thank you.
Please follow me for more articles.
Setting up Minio as a database for Medusajs
Tags: webdev, javascript, beginners, medusa
Published: 2023-06-16 14:49:39

In this blogpost you'll learn howto setup Minio as database for Medusa.

### Introduction

MinIO is a High Performance Object Storage released under GNU Affero General Public License v3.0. It is API compatible with the Amazon S3 cloud storage service. It can handle unstructured data such as photos, videos, log files, backups, and container images with a current maximum supported object size of 5TB.

As beeing compatible with Amazon S3 Minio is a hot choice as data-storage.

### Setup Medusa

First we gonna setup Medusajs. You can follow this [Quickstart Guide](https://docs.medusajs.com/development/backend/install) to do so.

### Setup Minio

Minio provides many install options you can refer the [Documentation Page](https://min.io/docs/minio/kubernetes/upstream/).

In this case we decide to install Minio and Medusa on macOS.

We're going to use [Homebrew](https://brew.sh/):

```
brew install minio/stable/minio
``` 

Starting the Minio Server:

```
export MINIO_CONFIG_ENV_FILE=/etc/default/minio
minio server --console-address :9090
```

### Changing Minios port

Minios and Medusajs backend both us the same port 9000 to avoid a collision we're going to change Minios port to 9001.

```
minio server ~/minio --console-address :9090 --address :9001
```

### Create a Minio bucket

We're going to create a bucket storing the Medusajs backend files. 

1. Log into the Minio Console
2. Click on the create bucket button
3. Enter the name of the bucket in the Bucket Namefield
4. Click on the create bucket button
5. on the buckets page click on the cog icon on the the top to configure the bucket.
6. Click on the edit icon next to Access Policy.
7. Change the selected value to public and click Set.

### Generate Access Keys

1. Click on Access Keys from the Minio Console
2. Click on the "Create access key" button
3. Tihs is will open up a form with generated keys click on Create button.

4. A pop-up will show Access-Key and Secret-Key copy both as we will use them later.

### Plugin installation 

In the folder of your Medusa backend run the following command:

```
npm install medusa-file-minio
```

Then add the following environment variables in .env :
```
MINIO_ENDPOINT=<ENDPOINT>
MINIO_BUCKET=<BUCKET>
MINIO_ACCESS_KEY=<ACCESS_KEY>
MINIO_SECRET_KEY=<SECRET_KEY>
```

Finally configure medusa-config.js to include the plugin with required options:

```js
const plugins = [
  // ...
  {
    resolve: `medusa-file-minio`,
    options: {
        endpoint: process.env.MINIO_ENDPOINT,
        bucket: process.env.MINIO_BUCKET,
        access_key_id: process.env.MINIO_ACCESS_KEY,
        secret_access_key: process.env.MINIO_SECRET_KEY,
    },
  },
]
```

Thats it I hope you enjoyed this blogpost about using Minio as database for a Medusajs backend.

Feel free to follow me on [Twitter](https://twitter.com/NorbertFuhs)
JavaScript Deprecated list
Published: 2023-06-16 14:35:13

As we know how javascript is evolving day by day new library  are coming every year but mostly 3 library/framework are dominating the dev community. React ,Vue , Angular Javascript most popular libraries/framework. Deprecation typically occurs for various reasons, such as improving language consistency, enhancing performance, or addressing security concerns. When a feature is deprecated, it means that it is still available for use, but developers are encouraged to migrate to the recommended alternatives to ensure compatibility with future versions of the language.




1-Deprecated String functions: The **String.prototype.anchor()**, **String.prototype.big()**, **String.prototype.blink()**, **String.prototype.small()**, **String.prototype.strike()**, and **String.prototype.sup()** methods are deprecated


2-Deprecated Function properties:The Function.prototype.arguments and Function.prototype.caller properties are deprecated


3-Deprecated Function constructor:Using **eval()** with untrusted code can lead to code injection vulnerabilities.


4-Deprecated **escape()** and **unescape()** functions: recommended to use **encodeURI()**, **encodeURIComponent()**, **decodeURI()**, and **decodeURIComponent() **functions instead.

eval() Function:

```
//Previous
eval('console.log("Hello, World!")');


//New way

console.log("Hello, World!");

```
Function Constructor:

```
//Previous
var multiply = new Function('a', 'b', 'return a * b;');


//Modern way
var multiply = (a, b) => a * b;

```
Ethernaut - Lvl 8: Vault
Tags: ethereum, security, tutorial, smartcontract
Published: 2023-06-16 14:15:14

## The Challenge:
Unlock the following `Vault` contract by changing `locked` to `false`.

```solidity
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

contract Vault {
  bool public locked;
  bytes32 private password;

  constructor(bytes32 _password) {
    locked = true;
    password = _password;
  }

  function unlock(bytes32 _password) public {
    if (password == _password) {
      locked = false;
    }
  }
}
```
## Inspecting the contract 👓

At creation time the `constructor` set the value of `locked` as true and `password`.

This contract only have a `unlock` function that takes a `bytes32` `_password` as its only input parameter. If the provided password is equal to `password` then the contract is unlocked.

## The hack 👩‍🏭👨‍🏭

`password` is a `private` state variable so if we try: 
```solidity
await contract.password()
```
This call will throw with:

```solidity
VM233:1 Uncaught TypeError: contract.password is not a function
    at <anonymous>:1:16
```

This error is thrown because of the visibility of the variable.

Setting a state variable as `private` only prevents other smart contracts from accessing the data, but we need to remember that data stored in a public blockchain is not secret.

Using libraries like `web3.js` we can still read from the slots of contracts. 

This is current storage layout of the contract:

```
slot          variable
-----------------------
0             locked
1             password
```
Each variable occupies a slot, to read from the slots using `web3.js` we can use the `getStorageAt(contractAddr, slot)` method. This method take two parameters:
- The address of the target contract.
- The position of the slot to read.

`password` is stored in slot `1`, to read from that slot with `web3.js` run the following command:
```solidity
password = await web3.eth.getStorageAt(contract.address, 1)
```
It should return:
```solidity
// this is the password!
0x412076657279207374726f6e67207365637265742070617373776f7264203a29
``` 
Now we only need to execute `unlock`:
```solidity
await contract.unlock(password)
```

After the transaction is mined check the value of `locked`:
```solidity
await contract.locked() // should return false
```

Submit the instance to complete the level.

## Conclusion  👩‍🎓👨‍🎓

Setting state variables as `private` doesn't make the variable secret or inaccessible, all data stored in a public blockchain is accessible and readable by anyone, for this reason we should never stored sensitive data in public blockchains.

## Further reading 👀

- [web3.js docs: getStorageAt](https://web3js.readthedocs.io/en/v3.0.0-rc.5/web3-eth.html#getstorageat)
- [Solidity docs: Layout of State Variables in Storage](https://docs.soliditylang.org/en/latest/internals/layout_in_storage.html#layout-of-state-variables-in-storage)
- [SWC-136: Unencrypted Private Data On-Chain](https://swcregistry.io/docs/SWC-136)
Cryto Transfers to Private Wallets: Now Facing Identification Checks
Tags: webdev, javascript, beginners, tutorial
Published: 2023-06-16 14:06:46


In the ever-evolving world of cryptocurrency, the transfer of funds to private wallets has become an increasingly popular practice. However, recent developments have introduced new challenges in the form of identification checks for these transfers. This article explores the impact of these identification checks on crypto transfers to private wallets, highlighting the need for enhanced security measures and the implications for cryptocurrency enthusiasts.

**Cryto Transfers to Private Wallets to Now Face Identification Checks: A Paradigm Shift
**
Cryptocurrency transfers to private wallets have traditionally been synonymous with anonymity and decentralization. The appeal of private wallets lies in their ability to provide users with complete control over their digital assets without the need for intermediaries. However, the rise in illicit activities, including money laundering and terrorist financing, has prompted regulatory bodies to introduce stricter identification checks for such transfers.