teleren/devto huggingface dataset:
Intro to Git
Tags: github, git, githunt, beginners
Published: 2023-01-15 05:47:15

**What is Git? 🤔**

Git is a popular version control system. It was created by Linus Torvalds in 2005 and has been maintained by Junio Hamano since then.
It is used for:
-Tracking code changes
-Tracking who made changes
-Coding collaboration


**What does Git do? 👨‍💻**
Manage projects with Repositories
Clone a project to work on a local copy
Control and track changes with Staging and Committing
Branch and Merge to allow for work on different parts and versions of a project
Pull the latest version of the project to a local copy
Push local updates to the main project

**Working with Git 🤖**
Initialize Git on a folder, making it a Repository
Git now creates a hidden folder to keep track of changes in that folder
When a file is changed, added, or deleted, it is considered modified
You select the modified files you want to Stage
The Staged files are Committed, which prompts Git to store a permanent snapshot of the files
Git allows you to see the full history of every commit.
You can revert back to any previous commit.
Git does not store a separate copy of every file in every commit, but keeps track of changes made in each commit!
**
Why Git? 💪**
Over 70% of developers use Git!
Developers can work together from anywhere in the world.
Developers can see the full history of the project.
Developers can revert to earlier versions of a project.
What is Product Management?
Tags: productivity, product, management, beginners
Published: 2023-01-15 05:46:27

Are you tired of being stuck in a dead-end job and want to make a career change into tech? Look no further! As a Product Manager, you'll have the opportunity to bridge the gap between technology and business and drive the development of new products. But what does that actually mean?

1. As a Product Manager, you'll be responsible for creating and executing a product vision that aligns with the company's overall strategy.


2. You'll lead cross-functional teams to bring new products to market and continuously improve existing ones.

3. You'll have to have a good understanding of both technical and business aspects to make data-driven decisions.
Motivated but no consistency?
Tags: motivation, beginners, productivity, codenewbie
Published: 2023-01-15 05:45:53

“I’ve got tons of motivation, but no consistency” - This is true for many aspirants :(

Why?

The main reason is that motivation should only be a helper in your journey, not the main driving factor.

It would take just one DSA problem to get stuck on and that would just take my motivation away, even raising doubts in my mind about whether I should give up - but I didn’t. Why?


Because of my habit, I was consistent throughout the prep and it helped me in moments like these, I would just keep trying and understanding until a solution came up.

Similarly, you’ll too have to start working on making consistent practice more of a habit, rather than requiring motivation every time.
𝗙𝗥𝗘𝗘 𝗚𝗼𝗼𝗴𝗹𝗲 𝗖𝗼𝘂𝗿𝘀𝗲𝘀 𝘆𝗼𝘂 𝘄𝗶𝗹𝗹 𝗻𝗼𝘁 𝗿𝗲𝗴𝗿𝗲𝘁 𝘁𝗮𝗸𝗶𝗻𝗴 𝗶𝗻 𝟮𝟬𝟮𝟯
Tags: googlecloud, courses, beginners, programming
Published: 2023-01-15 05:43:31

**[1] Google Analytics for Beginners**

🔗Free Online Course: Google Analytics for Beginners from Google | Class Central

**[2] Advanced Google Analytics**

🔗Free Online Course: Advanced Google Analytics from Google | Class Central

**[3] Google Analytics for Power Users**

🔗Free Online Course: Google Analytics for Power Users from Google | Class Central

**[4] Fundamentals of digital marketing**

🔗Free Online Course: Fundamentals of digital marketing from Grow with Google | Class Central

**[5] Get started with Google Maps Platform**

🔗Free Online Course: Get started with Google Maps Platform - web from Google | Class Central

**[6] Google Cloud Computing Foundations:**

🔗Free Online Course: Google Cloud Computing Foundations: Cloud Computing Fundamentals from Google Cloud | Class Central

**[7] Google Cloud Computing Foundations:**

🔗Free Online Course: Google Cloud Computing Foundations: Infrastructure in Google Cloud from Google Cloud | Class Central

**[8] Google Cloud Computing Foundations: Data, ML, and AI in Google Cloud**

🔗Free Online Course: Google Cloud Computing Foundations: Data, ML, and AI in Google Cloud from Google Cloud | Class Central

**[9] Google Cloud Computing Foundations: Networking and Security in Google Cloud**

🔗Free Online Course: Google Cloud Computing Foundations: Networking and Security in Google Cloud from Google Cloud | Class Central

**[10] Machine Learning Crash Course**

🔗Machine Learning Crash Course

**[11] Basics of Machine Learning**

🔗Machine Learning Basics - Courses - Google Digital Skills Unlocked

**[12] Data Science with Python**

Data Science with Python
This Data Science with Python program provides learners with a complete understanding of data analytics tools & techniques. Getting started with Python can help you gain knowledge on data analysis, visualization, NumPy, SciPy, web scraping, and natural language processing. This program is an ideal kickstarter for anyone looking to become a data scientist today.

https://lnkd.in/dkr4KGHD

**[13] Python Basics for Data Analysis**

🔗Learn Python basics for data analysis
**
[14] Data Science Foundations**

🔗Data Science Foundations

Happy Learning.💥
LeetCode #20 Valid Parentheses with JavaScript
Tags: javascript, algorithms, leetcode
Published: 2023-01-15 05:19:47

Solution to LeetCode's [20. Valid Parentheses] (https://leetcode.com/problems/valid-parentheses) with JavaScript.

## Solution
```js
/**
 * @param {string} s
 * @return {boolean}
 */
const isValid = (s) => {
  const map = {
    "(": ")",
    "[": "]",
    "{": "}",
  };
  const stack = [];
  for (let i = 0; i < s.length; i++) {
    if (stack.length > 0 && map[stack[stack.length - 1]] === s[i]) {
      stack.pop();
    } else {
      stack.push(s[i]);
    }
  }
  return stack.length === 0;
};
```

- Time complexity: O(n)
- Space complexity: O(n)

1. save the target parentheses in an object with keys and values
2. add the string to the stack array in a for loop
3. if the closing parenthesis is a pair with the last value in the stack array, remove it from the stack array
4. return true if the stack array is finally empty, false if it remains
Palindrome Partitioning
Tags: javascript, leetcode
Published: 2023-01-15 05:18:45

[Palindrome Partitioning](https://leetcode.com/problems/palindrome-partitioning/)

```js
var partition = function (s) {
  // buffer for partition in DFS
  let partition = [];
  // final output of palindrome substrings
  let result = [];

  const isPalindrome = (str) => str === str.split("").reverse().join("");

  const dfs = (s, partition) => {
    // Base case:
    // Empty string must be palindrome
    if (0 == s.length) {
      result.push([...partition]);
      return;
    }

    // General cases:
    for (let i = 0; i < s.length; i++) {
      let prefix = s.substring(0, i + 1);
      let postfix = s.substring(i + 1);

      // Current prefix is palindrome, keep trying to make more partition in postfix by DFS
      if (isPalindrome(prefix)) {
        dfs(postfix, [...partition, prefix]);
      }
    }
    return;
  };

  dfs(s, partition);

  return result;
};
console.log(partition("aab"));


```
Путешествие по Египту.
Tags: beginners, css, react, devops
Published: 2023-01-15 05:07:48


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/b9budmdzoq68vrdqdr80.jpg)/uyvnb6kmhg5gek0xipp6.jpg)
Hack This Fall 3.0
Tags: hackthisfall
Published: 2023-01-15 03:27:31

"Hack This Fall 3.0: The Premier Hackathon Event of the Season

As the leaves begin to change and the air turns crisp, it's the perfect time to gear up for the ultimate hackathon experience at Hack This Fall 3.0. This premier event brings together some of the brightest minds in the industry to push the boundaries of what's possible in the world of hacking.

But what sets Hack This Fall 3.0 apart from other hackathon communities? Here are just a few of the things that make this event truly unique:

- Focus on innovation and collaboration.
One of the key things that sets Hack This Fall 3.0 apart is its focus on fostering innovation and collaboration. The event brings together a diverse group of individuals with different skills and expertise, and encourages them to work together to create truly groundbreaking solutions. This collaborative approach allows participants to learn from one another and push the limits of what's possible.

- Access to top-notch resources and mentorship.
Another unique aspect of Hack This Fall 3.0 is the access to top-notch resources and mentorship. The event provides participants with access to the latest technologies and tools, as well as the guidance and advice of industry experts. This allows participants to take their skills to the next level and create truly cutting-edge solutions.

- Prizes and networking opportunities.
Finally, Hack This Fall 3.0 offers some of the best prizes and networking opportunities in the hackathon community. The event attracts top companies and organizations looking for the next big thing, providing participants with the chance to showcase their skills and make valuable connections.

So if you're looking for a hackathon experience like no other, look no further than Hack This Fall 3.0. With its focus on innovation, collaboration, and access to top-notch resources, this event is sure to take your hacking skills to the next level. Don't miss out on the opportunity to be a part of this premier event!"
Enabling PlantUML in Visual Studio Code
Tags: tutorial, vscode, uml, productivity
Published: 2023-01-15 03:42:45

[PlantUML](https://plantuml.com/) is a component that allows you to quickly write the following diagrams in plain and simple intuitive language - a.k.a. Diagram-As-Code.  

- Sequence diagram
- Usecase diagram
- Class diagram
- Object diagram
- Component diagram
- Deployment diagram

There are many similar tools out there. `PlantUML` is free to use and was created using Java and GraphViz.  A simple way of using it is to download the [plantuml.jar](http://sourceforge.net/projects/plantuml/files/plantuml.jar/download) and run it to open PlantUML's [graphical user interface](https://plantuml.com/gui). There is no need to unpack or install anything.

Most developers use Visual Studio Code, why not install its plugin:

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

Browse the plugin and click install.  After installing the plugin, there is a need to install GraphViz binary. You can follow the link to install [it](https://graphviz.org/download/).  For mac users, easy to run `brew install graphviz`.

When all done, create a test file `test.puml`  and add the following code
```
@startuml Basic Sample
!include https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Container.puml

Person(admin, "Administrator")
System_Boundary(c1, "Sample System") {
    Container(web_app, "Web Application", "C#, ASP.NET Core 2.1 MVC", "Allows users to compare multiple Twitter timelines")
}
System(twitter, "Twitter")

Rel(admin, web_app, "Uses", "HTTPS")
Rel(web_app, twitter, "Gets tweets from", "HTTPS")
@enduml
```
Press `Option + D` in Mac or `Alt-D` for other OS's, should give the following output:

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vzsv7d3q1ly6303eux7n.png)
Running Jest with a Vue2 application
Tags: jest, vue, vue2
Published: 2023-01-15 03:38:31

---
title: Running Jest with a Vue2 application
published: true
description: If you need to install Jest and Vue Test Utils on a legacy Vue 2 application this might help
tags: jest,vue,vue2
# cover_image: https://direct_url_to_image.jpg
# Use a ratio of 100:42 for best results.
# published_at: 2023-01-15 03:20 +0000
---

The Vue CLI and test utils have a 'happy path' to setup testing libraries, but they are naturally geared to the latest version of Vue and other dependencies.

If you need to add tests to an existing Vue 2 application you might find the process a little tricky.

You'll need to install the version of [Vue test utils](https://github.com/vuejs/vue-test-utils/) and [vue-jest](https://github.com/vuejs/vue-jest#installation) that correspond to your version of Vue.

For example if you're running Jest 29, you'll need to install `vue2-test` like so:
```
npm install --save-dev @vue/test-utils@1 @vue/vue2-jest@29
```

Because the tests run in an environment without a native DOM we'll also need to configure them to use the jsdom implementation.

Install the package like so:
```
npm install --save-dev jest-environment-jsdom
```

Then configure Jest to use the virtual JS DOM. Jest can be configured either via a dedicated file, or through your `package.json` like so:
```
{
 // other config...

 "jest": {
        "testEnvironment": "jsdom",
        "moduleFileExtensions": [
            "js",
            "json",
            "vue"
        ],
        "setupFiles": [
            "./jest-setup.js"
        ],
        "transform": {
            "^[^.]+.vue$": "@vue/vue2-jest",
            ".*\\.(js)$": "babel-jest"
        }
    }
}
```

In my case I required some extra config that's loaded in `jest-setup.js`. This is because my app had global dependencies for LoDash and a utilities file. To make these functions available in the test environment they are loaded like this.

`jest-setup.js`
```
import lodash from 'lodash';
import utils from './resources/js/utils.js';

global._ = lodash;
global.utils = utils;
```
Custom File Uploader
Published: 2023-01-16 19:44:01

---
title: Custom File Uploader
published: true
date: 2023-01-15 03:06:58 UTC
tags: 
canonical_url: 
---

Hello there it's 2023 and are you bored of the default tedious file input that _HTML_ offers?, well I want to share how you can create a custom file input using `HTML` with little `TS` 😅 oh sorry!! had you there, I meant `js` .

Firstly generate a plain HTML project and paste the code below

```
<input type="file" name="" id="file-input" hidden />

    <div
      class=""
      style="
        width: 200px;
        height: 200px;
        border: 1px dashed #aaa;
        margin: 0 auto;
        display: grid;
        place-items: center;
        cursor: pointer;
      "
    >
      <p style="color: #00f">Click here to upload</p>
    </div>

```

The HTML code above contains two tags, the `input` tag is hidden because we don't want that but we'll use its functionality. The code will roughly be displayed as shown below(Don't mind my CSS 😅)

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1673750787048/88e125b9-ec53-4e46-845c-37720087b76e.png)

Now for the fun part let's see some `js`

```
     const fileInput = document.getElementById("file-input");
     const div = document.querySelector("div");

    div.addEventListener("click", () => {
      fileInput.click();
    });

```

The code above retrieves the `input` and `div` elements using their id's and assigns an event listener to the `div` element that when clicked it triggers the click event on the file input that allows your users to select any file for uploading, from here you can choose to do anything with the image.
Counting Down the Days: Why We're Ditching the Corporate Life as Software Engineers
Tags: career, productivity, beginners
Published: 2023-01-15 02:36:36

[facebook.com/Trinwhocode](https://facebook.com/Trinwhocode)

As software engineers, we've spent countless hours coding, debugging, and troubleshooting. We've put in the hard work and long hours to climb the corporate ladder, but now, we're ready to say goodbye to the corporate life and hello to something new.

You see, we've come to realize that the 9-to-5 grind, endless meetings, and constant pressure to meet deadlines just isn't for us. We want something more, something that aligns with our values and passions.

We want the freedom to create and innovate on our own terms. We want to work on projects that inspire us and make a real impact in the world. We want to have a work-life balance that allows us to spend time with our loved ones and pursue our hobbies.

We're not alone in this thinking. In fact, a recent study found that over 60% of software engineers are open to leaving their current job for something that aligns better with their values and passions.

So, we're counting down the days until our resignations are official. We're excited to see what the future holds and can't wait to explore new opportunities in the tech industry.

We're not saying goodbye to software engineering altogether, but rather, we're saying goodbye to the traditional corporate structure. We're ready to blaze our own trail and create something truly meaningful.

So, to all the other software engineers out there, don't be afraid to dream big and explore new possibilities. The world is your oyster, and the opportunities are endless. Cheers to the next chapter in our careers!

[linkedin.com/in/trinmar](https://www.linkedin.com/in/trinmar)
Optimize Website using Gatsby.js and AWS
Tags: web, optimize, gatsby, aws
Published: 2023-01-15 02:35:00

---
title: Optimize Website using Gatsby.js and AWS
published: true
description: A great option is to convert some or the whole of your web application into a static site using generators like gatsbyjs or hugo
tags: 
- web
- optimize
- gatsbyjs
- aws
cover_image: https://codesavy.com/static/8e7f726c10c550f0978059711f5eb2cd/07e2a/GATSBY-AWS-ARCHITECTURE.png
# Use a ratio of 100:42 for best results.
published_at: 2023-01-15 02:35 +0000
---

Are you looking for some tech-savvy option to reduce infrastructure cost or boost the performance of your high traffic website?

A great option is to convert some or the whole of your web application into a static site using generators like gatsbyjs or hugo

I've compiled into a blog post a quick way to spin up a first-class AWS infrastructure that can empower a Gatsby.js application to be blazing fast across the globe while saving you a lot of infrastructure cost!

https://codesavy.com/blog/how-to-deploy-gatsby-js-into-aws/
Optimize Website using Gatsby.js and AWS
Tags: aws, gatsby, cloudfront, terraform
Published: 2023-01-15 02:32:19

---
title: Optimize Website using Gatsby.js and AWS
published: true
description: A great option is to convert some or the whole of your web application into a static site using generators like gatsbyjs or hugo.
tags: 
- aws
- gatsbyjs
- cloudfront
- terraform
# cover_image: https://codesavy.com/static/8e7f726c10c550f0978059711f5eb2cd/07e2a/GATSBY-AWS-ARCHITECTURE.png
# Use a ratio of 100:42 for best results.
# published_at: 2023-01-15 02:27 +0000
---

Are you looking for some tech-savvy option to reduce infrastructure cost or boost the performance of your high traffic website?

A great option is to convert some or the whole of your web application into a static site using generators like gatsbyjs or hugo

I've compiled into a blog post a quick way to spin up a first-class AWS infrastructure that can empower a Gatsby.js application to be blazing fast across the globe while saving you a lot of infrastructure cost!

https://codesavy.com/blog/how-to-deploy-gatsby-js-into-aws/
Tips on Collaborating More Effectively with UX and Product Designers
Tags: design, career, beginners, ux
Published: 2023-01-15 02:21:02

Specialising in UX and [Website Design Auckland](https://constantino.co.nz/), I, myself, have worked with numerous software engineers over the course of ten years and I know that collaborating effectively with them is the key to getting a project delivered on time and in full.

However, there will always be instances wherein a team’s collaboration has to be improved. For example, I have seen and heard stories from fellow UX and product designers who are quite unsure of what they are doing and are scared to communicate directly with software engineers. This could lead to miscommunication and eventually, delays and inaccuracies in the project.

Here are my two cents on how to improve collaboration within the team:

**Be accountable and self-aware**
Being mindful of your actions can improve the harmony within the team and increase productivity. Being accountable and owning up to mistakes also establishes trust which often leads to great working relationships among the team members.

**Practice kindness and compassion**
Everyone’s best effort looks different each day, that’s why it is important to be kind and understanding. If you are able to, you may offer help to a team member who is struggling with their work or recognise someone’s effort or achievement. 
 
**Engage in meaningful conversations**
Meaningful conversations can spark good ideas and build trust. If you can, initiate a conversation with your teammates to get to know them better. You can ask about a project they are working on and if they are having challenges that you can help them with.

**Offer help and be open to new ideas**
With several people working on projects, all having different backgrounds, ideas can sometimes clash and challenges might arise. Designers may sometimes find it difficult to get through the technical side of things, with which the software engineers can help expound further. Conversely, designers can help generate ideas to get around technical constraints, saving everyone’s time and effort.
 
**Communicate**
Communication is essential within a team; without it, delays can happen, and misunderstandings will be inevitable. If, for example, you are aware that technical terms aren’t your teammate’s forte, always try to explain using simple terms to communicate your ideas. Avoid using internal jargons and codes and bear in mind to always speak respectfully.

**Conclusion**
Having a harmonious workplace that fosters a safe environment for everyone to grow and improve is a win for everyone in the team. Not only does it get projects and goals completed timely, it can also lessen the mental and emotional stress and makes workloads seem lighter.
Photogram 3
Published: 2023-01-15 02:15:28

- In routes: if there is a conflict, the most specific route should be before the other (order matters)
- Quick link: [Faker](https://github.com/faker-ruby/faker)
- When creating sample_data, do a few users that you know

Also remember:
- For random robot pictures: `"https://robohash.org/#{rand(9999)"`