teleren/devto huggingface dataset:
Setup Kubectl on Cloud Dev Environment in 60 Seconds
Tags: kubernetes, cloud, gitpod, kubectl
Published: 2022-10-15 08:40:55

This blog will describe how to automate the [**`kubectl`**](https://kubernetes.io/docs/reference/kubectl/) setup for Cloud Dev Environments such as [Gitpod](https://www.gitpod.io/).


## Why is it necessary to automate?

Gitpod offers an ephemeral environment. If you want to use `kubectl` on each/all workspaces, it must be configured. As a result, you won't have to manually install and configure `kubectl` every time you start working on it.

## What is Ephemeral Environment?

> An ephemeral environment is a short-lived, encapsulated deployment of an application. Ephemeral environments provide robust, on-demand platforms for running tests, previewing features, and collaborating asynchronously across teams. (Ref. [here](https://ephemeralenvironments.io/))


TL;DR; these are "Dynamic environments", "Temporary environments", "on-demand environments" or "short-lived environments". 

## Pre-Baked Dev Environment

Gitpod gives users the ability to construct pre-baked (ready to use) environments by offering [`.gitpod.yml`](https://www.gitpod.io/docs/introduction/learn-gitpod/gitpod-yaml) that automate the configuration of the development environment. In order to avoid having to set up everything from scratch, users save time and experience less friction in their lives.

## Automate kubectl setup

You only need two files to complete this task: your [`.gitpod.yml`](https://www.gitpod.io/docs/introduction/learn-gitpod/gitpod-yaml) file and a [script](https://github.com/gitpod-io/demo-kubectl-with-gitpod/blob/main/setup_kubectl_with_gitpod.sh) that executes the setup and installation of kubectl along with [all other necessary tools](https://github.com/gitpod-io/demo-kubectl-with-gitpod#installed-tools--services).

- First, You need to copy-paste [this script](https://github.com/gitpod-io/demo-kubectl-with-gitpod/blob/main/setup_kubectl_with_gitpod.sh) in any directory of that particular project.

- Now, You need to execute this script from your `.gitpod.yml` (present in the root of your project).

```yml

tasks:
  - name: Setup kubectl
    command: bash $GITPOD_REPO_ROOT/setup_kubectl_with_gitpod.sh
```

> You can configure the path based on where the setup kubectl script is located because my script was located in the root directory in this case.

- Now, you can start [creating the kubeconfig file](https://kubernetes.io/docs/tasks/tools/install-kubectl-linux/#verify-kubectl-configuration) according to your project requirements. 🎉

## Try Now 

In less than 40 seconds, start using `kubectl` by clicking the button below.:

<a href="https://gitpod.io/#https://github.com/gitpod-io/demo-kubectl-with-gitpod"><img src="https://gitpod.io/button/open-in-gitpod.svg"/></a>


## Code

> _Talk is cheap, show me the code_

{%embed https://github.com/gitpod-io/demo-kubectl-with-gitpod %}

---

## Related Repositories

{%embed https://github.com/gitpod-io/demo-aws-with-gitpod %}
{%embed https://github.com/gitpod-io/demo-dotfiles-with-gitpod %}
{%embed https://github.com/gitpod-io/demo-tailscale-with-gitpod %}
video player
Published: 2022-10-15 08:18:13

hello 

i need help with streaming in HTML5 video , there is an error while i stream a video form google drive . can somebody help me.

detailed Error : https://sigmasearch.in/open/1If_vacWYIv32QTpG0qkgOcIFiiO8om5g?q=bhagwan&fileType=video


there is an audio in file but ,  while streaming audio is not playing
Introduction to Algorithms
Tags: algorithms, beginners
Published: 2022-10-15 08:12:49

**Algorithms - The heart of computer science .** 

The idea of algorithm fascinates me , It seems like machine between _input_ and _output_ .

 I am currently learning Full stack development through [The Odin Project](https://www.theodinproject.com/) ( An open source community of developers ) and in the free time I have decided to learn algorithms . I am not very good in solving algorithmic  problems so  decided to start reading the book [Introduction to Algorithms](https://sd.blackball.lv/library/Introduction_to_Algorithms_Third_Edition_(2009).pdf) . 

It may takes many years to complete it but I will write summary of every few paragraph/pages and link some exercises that I find helpful to understand the concepts better.

I will try to write the summary as brief as I can  and in such way so I/(we ?) can refer these articles in future.

From now every next article related to CLRS will have a tag of **CLRS**.

Thanks .
Guide: Extremely Shitty SSH server
Published: 2022-10-15 08:12:47

[](https://play.google.com/store/apps/details?id=net.xnano.android.sshserver&hl=en&gl=US)

First off thanks for making an app that is mute! The ssh-server is setup to use RSA- for AUTHENTICATION but off course the coders did not bother to add that somewhere, or add an example setup for fellow Linux user, well here it is:

`sudo nano ~/.shh/config`

then 

```
Host mobile     
     HostName 192.168.1.102 --> Any 
     Port 6907
     IgnoreUnknown UseKeychain
     UseKeychain yes
     HostKeyAlgorithms +ssh-rsa,ssh-dss


```
then go-->
`ssh mobile`

off course the ssh shell is useless but..... if you 
use the network file browsers:

`ctrl+l`

then 
type:

`ssh://192.168.1.102`
dont forget to bookmark it
Youtube studio sidebar clone HTML, CSS and Javascript
Tags: javascript, webdev, css, html
Published: 2022-10-15 08:08:58

Hello friends 👋, in this tutorial, I will show how to make a Youtube studio sidebar menu clone with HTML, CSS, and some JavaScript Code to open and close the menu.

To follow this tutorial, you need two things installed on your laptop.

- A web browser: Google Chrome, Firefox, or any other web browser.
- A text editor: the most famous developer text editor is VScode, but you can use any text editor.

If you prefer reading, here is my post explaining how to make this sidebar menu clone.
http://www.u-code.online/youtube-studio-sidebar-clone-html-css-and-javascript/

Or watching video tutorial:
https://youtu.be/iC0XHAN7dMA

[C﻿ode source](https://www.buymeacoffee.com/ucode/e/95281)
A Fun Programming Joke To Start Your Day
Tags: jokes, dailydeveloperjokes
Published: 2022-10-15 08:00:14

---
title: "A Fun Programming Joke To Start Your Day"
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/5e1259b9b89f4.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 do you call optimistic front-end developers?

___A:___ Stack half-full developers.
 -->
A small talk about the to-do list
Tags: todolis, productivity, personalgrowth, motivation
Published: 2022-10-15 05:36:37

Hey guys, you know we are living in a very competitive world now. We are aware of our personal growth and productivity. We are so engaged with lots of tasks in a day. It is important to accomplish our daily activities before the end of the day. So productivity matters. 

Maintaining a to-do list is a great and more practical tool. I can see my personal growth progress before making a to-do list and after. It's a weapon to boost yourself. When you cut a task from the to-do list you will get more energy and inspiration to accomplish the other task. I know I can not accomplish all the tasks and it's not possible. There is a study that if you can complete ninety percent of the to-do list that means the day was a more productive day for you. Now tell me about your to-do list and other stuff. 

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/m50hvxoj0f5t89ra9sxc.jpg)
Parser for TXT and CSV file without any 3rd Party Library
Tags: react, javascript, webdev, programming
Published: 2022-10-15 07:20:32

Hi, this is the code for Parser purely based on javascript.

```
export const csvToArray = (fileContent, rows, delimiter) => {
  let splittedFileContent = fileContent?.split('\n')
  let newRows = splittedFileContent.slice(0, rows)

  if (newRows.length === 0) {
    return
  } else {
    // Counting max delimiter and
    //Splitting columns based on max delimiters in the splitterFileContent based on user Input
    const headers = delimiter
      ? [
          ...Array(
            Math.max(
              ...newRows.map((row) => (row.split(delimiter) ?? []).length),
            ),
          ).keys(),
        ]
      : [0]

    const arr = newRows.map((row) => {
      const values = delimiter ? row.split(delimiter) : [row]
      const el = headers.reduce(function (object, header, index) {
        object[header] = values[index]
        return object
      }, {})
      return el
    })
    //converting array of object into array of array
    const result = arr.map(Object.values)
    return result
  }
}
```

[GitHub](https://github.com/priyabnsal/Parsing-txt-And-CSV-file)

Connect with me on:
[LinkedIn](https://www.linkedin.com/in/priyaabnsal/)
Agile Team - How do we work?
Published: 2022-10-15 07:13:19

현재 직장인 Agile 팀 일한지 1년 5개월째, 이번 글은 약 1년 동안 느낀 애자일 조직 문화를 주제로 써보려고 한다.

입사 전, "애자일" 이라는 단어만 들었을 땐 무슨 개발 용어인줄 알았다. 현재 팀에 합류한 뒤 온보딩 과정에서 애자일 방법론에 대한 교육을 받았을 때, 적지 않은 충격을 받았던 기억이 난다.

이전 회사에선 워터폴 방식으로 업무를 했었기도 했고, 모든 개발팀은 다 그런식으로 일하는 줄 알았기 때문이다.

애자일과 워터폴은 프로젝트 방법론으로, 조직의 특성에 맞게 알맞은 방식을 채택하여 사용한다. SaaS(Software as a service) 제품을 개발하는 우리는 팀의 특성에 맞게 애자일 방식을 채택하여 운영중이다.

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

출처: https://hackr.io/blog/agile-vs-waterfall

간단히 설명하자면,

- Waterfall: 전체 개발 주기가 정해져 있고 작업이 순차적으로 진행됨.
- Agile: 짧은 개발 주기가 반복되고, 완성도의 차이는 있지만 결과물을 빠르게 볼 수 있음.

우리 팀은 애자일 방법론 중에서도, [Scrum](https://www.wrike.com/project-management-guide/faq/what-is-scrum-in-agile/)이라는 방식을 사용하고 있다.

우리 팀이 일하는 방식을 하루 일과를 통해 알아보자🙌

**10:30am - 데일리 미팅**
<img src="https://dev-to-uploads.s3.amazonaws.com/uploads/articles/v3wmzleollpj4xhwj87t.png" alt="image" width=200>


- 어제 한 일을 서로 짧게 공유하고, 오늘 todo를 정한다. (+ 이슈가 있었다면 이슈 공유도 한다)
- 이번 스프린트의 todo는 화이트 보드에 각 이슈별로 포스트 잇으로 정리되어 있다
- 작업이 완료된 이슈는 todo 에서 done으로 옮긴다

다들 각자 할일이 명확하게 정해져 있기 때문에 하루 일정을 자유롭게 사용하면 된다.

나는 보통 코드 리뷰할 일이 있다면, 오전에 리뷰를 요청드려서 오전 시간을 보내는 편이다.
(우리 팀은 PR이 아닌 1:1 또는 1:2 코드 리뷰를 하기 때문에 시간이 꽤 소요된다)

점심 시간은 자유롭게 편한 시간에 사용하고, 오후 업무를 시작한다.

오후 일정도 특별한 일은 없고, 데일리 미팅 때 정한 todo를 이어서 하면 된다.


**sprint planning**
2주 주기로 있는 스프린트 회의는 PO(Product Owner)의 주도 하에 앞으로 2주동안의 계획을 짠다. 

기획, 개발 팀은 필수로 참여하고, 영업/마케팅 팀은 영업적 측면에서 고객의 요구사항 등 필요한 기능들을 전달한다.

돌아가면서 짧게 회고를 하고, 각 이슈에 대한 내용을 공유하며 해당 이슈에 대한 estimation을 한다.

작업이 어느 정도 소요될지를 정하는 단계이며 스프린트 회의의 핵심이라고 할 수 있다.

1d, 3d 등 day 기준으로 estimation이 이루어지고, 디테일한 일정은 개발팀끼리 따로 2차 플래닝 때 정한다.

2차 플래닝 때는, estimation이 된 이슈를 가지고 세부 계획을 짠다.
만약 2d(1d = 6h) 기준 짜리 작업이 있다면, 시간 단위(h)로 또 일정을 세운다.

ex) 
- 3h - 기능 분석
- 3h- API 작업 (query 추가, schema 변경)
- 3h - UI (style, 레이아웃)
- 3h - 테스트 및 이슈 처리

---


#### 장점
- 2주라는 짧은 기간동안 작업한 것들을 상용에 배포시키기 때문에 성취감이 잘 느껴진다. 
 
- 미리 2주동안의 계획이 있기 때문에, 급하게 요청받을 일이나 계획에 없던 작업이 생길일이 거의 없다. 
(크리티컬한 버그를 급하게 수정해야 할 일이 아니라면)

- 각자 주도하에 todo만 잘 해낸다면, 일정이 자유롭다.
(회사의 분위기에 따라 다르겠지만, 만약 오늘 6h가 걸리는 일을 3h 만에 끝냈다면? 그냥 퇴근해도 아무런 문제가 없다!!)

- 기획, 디자인 일정에 영향을 받지 않는다.
  - 만약, 워터폴 방식이라면 기획이 늦어지면 디자인, 개발을 진행하기 어렵다.
  - 애자일 방식은, 기능 단위로 기획-디자인-개발-테스트-배포가 진행되기 때문에 기획 + 디자인이 완료된 다른 기능 개발을 시작하면 된다.


#### 단점
- 2주 스프린트가 계속 반복되기 때문에 일의 강도가 높은 편이다.
  - 이 부분도 팀마다 다를 순 있겠지만 보통 일정이 여유로울 때도 있고 빡빡(?)할 때도 있는데, 일정한 강도의 업무가 계속 이어져서 지치기 쉽다.

(최근 팀에 합류한 동료의 말에 따르면, 처음에 적응하기 어려웠다고 한다)


---


보통 스프린트 플래닝 하는 날엔, 하루 종일 플래닝을 하기 때문에 끝나고 나면 기가 엄청 빨릴 때도 있다😅😅

그래도 지금까지 경험하기에 단점보다 장점이 훨씬 많고, 개인적으로도 잘 맞는 업무 방식이기 때문에 충분히 만족하고 추천할 만한 개발 방법론이라고 생각한다.

이번에 이렇게 글을 작성하면서, 다시 한번 이상적인 애자일 팀에서 일하고 있다는 생각이 들었다. 시니어 분들이 이미 애자일에 경험이 많으신 분들이라 시스템화가 잘 되어있고, 항상 더 효율적인 업무 방식을 고민하시기 때문이다.

애자일 방식을 채택하지 않은 팀에 간다면 적응하기 힘들 정도로, 잘 적응이 되었고 애자일의 스크럼 이외에도 더 좋거나 공유하고 싶은 개발 방법론이 있는지 알아봐야겠다.
PHP 8.2 - What's new?
Tags: php, php82, programming, feature
Published: 2022-10-15 07:10:48

Let's speak about the new upcoming features in PHP v8.2 - https://php.watch/versions/8.2

{% youtube https://youtu.be/yqj48lOKIIA  %}

PHP 8.2 will be released on November 24th 2022, with a lot of handy features in the box! 🤗

---
👉 Psst! My Udemy course on how to build a real-world PHP 8 application from scratch is now available at https://www.udemy.com/course/create-real-world-php-webapp-from-scratch/
What I've been reading (week 41, 2022)
Tags: watercooler, news, discuss
Published: 2022-10-15 07:00:52

Each week I share a few things that I've been reading. Here's seven from this week:

## [Introducing OG Image Generation: Fast, dynamic social card images at the Edge](https://vercel.com/blog/introducing-vercel-og-image-generation-fast-dynamic-social-card-images)

This looks very cool! Hopefully, it won't be too long before someone uses the core engine (https://github.com/vercel/satori) to make a similar product that works as well on Cloudflare Workers or Netlify Edge Functions as this does on Vercel's platform.

## [Design Systems For Figma](https://www.designsystemsforfigma.com)

A big collection of Figma design systems from companies like Atlassian, Uber, Airtable, IBM, Slack, Figma themselves, and Salesforce.

## [Flood warning finds its voice](https://defradigital.blog.gov.uk/2019/10/11/flood-warning-finds-its-voice)

The Environment Agency and Natural Resources Wales switched their text-to-speech provider to Amazon Polly, and their costs for the service went from £40,000 to less than £1,000 🤑

## [Building a Next-Level Code Playground / Sandbox / REPL with Sandpack](https://www.joshwcomeau.com/react/next-level-playground)

Sandpack looks great! I can see this being really useful for making a component/library demo/playground page when something like Storybook would be a bit more than was required. Thank you CodeSandbox team for open-sourcing it! 💖

## [How to fetch data in React with performance in mind](https://www.developerway.com/posts/how-to-fetch-data-in-react)

I really like Nadia's posts. This has given me an idea for something to try on shop.coop.co.uk to slightly speed up a vital HTTP request made in our routing file. We used to use a prefetch for this, but had to stop after introducing a version header to the API we use.

## [First-class Vite support in Storybook](https://storybook.js.org/blog/first-class-vite-support-in-storybook)

Boom! I am excited about more and more tools moving to a post-Webpack, ESBuild/Rollup/Vite foundation. I don't use Storybook at work at the moment and I miss it, so I might add the Vite-ified to my personal site instead to stay in the loop.

## [Notes on synthetic speech](https://tink.uk/notes-on-synthetic-speech)

An interesting post on the evolution of different types of synthetic speech, and how the answer isn't yet to throw machine learning at the problem (or not until it can run locally rather than in the cloud, at least)

---

I also [tweet these as I find them (@philw_)](https://twitter.com/philw_) and post them on my personal site at https://wolstenhol.me/#reading.

What were your favourites? Was there anything you found useful?

{% user philw_ %}
Check for Valid BST
Tags: javascript, leetcode
Published: 2022-10-15 06:56:39

Given the root of a binary tree, determine if it is a valid binary search tree (BST).

A valid BST is defined as follows:

The left subtree of a node contains only nodes with keys less than the node's key.
The right subtree of a node contains only nodes with keys greater than the node's key.
Both the left and right subtrees must also be binary search trees.
 

Example 1:

Input: root = [2,1,3]
Output: true

Approach 1 : keeping two values max & min Range

```js
var isValidBST = function (root) {
  return validate(root, -Infinity, Infinity);
};

var validate = function (node, lower, upper) {
  if (node == null) {
    // empty node or empty tree
    return true;
  }

  if (lower < node.val && node.val < upper) {
    // check if all tree nodes follow BST rule
    return (
      validate(node.left, lower, node.val) &&
      validate(node.right, node.val, upper)
    );
  } else {
    // early reject when we find violation
    return false;
  }
};
```
Approach 2 : Performing in order Traversal & thn checking array with sorted array.

```js
var isValidBST = function (root) {
  function inOrder(node) {
    if (!node) return [];
    return [...inOrder(node.left), node.val, ...inOrder(node.right)];
  }

  const sortedArr = inOrder(root);

  for (let i = 0; i < sortedArr.length; i++) {
    if (sortedArr[i + 1] <= sortedArr[i]) return false;
  }
  return true;
};

```
Approach 3 : Performing InOrder Traversal & keeping one Min Pointer to perform comparison
```js
var isValidBST = function (root) {
  let previous = -Infinity;

  function checkInOrder(root) {
    if (root === null) {
      return null;
    }
    if (checkInOrder(root.left) === false) {
      return false;
    }
    if (root.val <= previous) {
      return false;
    }
    previous = root.val;
    return checkInOrder(root.right);
  }

  return checkInOrder(root);
};

```
🚀 Angular 14 + ESLint, Material + Transloco + Jest, TestCafe + Docker + Prettier 🚀
Tags: angular, javascript, webdev, beginners
Published: 2022-10-15 06:44:28

This is **THE** Angular 14 Starter project you are looking for!

## GitHub
https://github.com/wlucha/angular-starter

## Features
✅ [Angular 14](https://angular.io/)
✅ [Angular Material](https://material.angular.io/)
✅ Unit Testing with [Jest](https://jestjs.io/)
✅ End-to-End Testing with [TestCafé](https://testcafe.io/)
✅ Internationalization with [Transloco](https://github.com/ngneat/transloco)
✅ Auto documentation with [Compodoc](https://compodoc.app/) 
✅ Analyse your project with [source-map-explorer](https://www.npmjs.com/package/source-map-explorer)
✅ [Docker](https://www.docker.com/)
✅ [ESLint](https://eslint.org/)
✅ [Prettier](https://prettier.io/)
✅ [Commit Linting](https://github.com/conventional-changelog/commitlint)

## Demo
[![StackBlitz Demo](https://user-images.githubusercontent.com/7531596/83507657-2424e180-a4c9-11ea-8e4f-b3f8e7d6b4c5.png)](https://stackblitz.com/github/wlucha/angular-starter)

## Setup

```bash
# Clone the project
$ git clone https://github.com/wlucha/angular-starter
$ cd angular-starter

# Install dependencies
$ npm install

# Start server
$ npm run start

# Open in browser: http://localhost:4200
```

## Docker Deployment

```bash
# Build Docker image
$ docker build . -t angular-starter

# Run Docker Container
$ docker run -p 3000:80 angular-starter
```

## Docker Hub

https://hub.docker.com/r/wlucha/angular-starter

## Commands

- `npm run start` - start the app
- `npm run lint` - lint the project
- `npm run test` - run unit tests
- `npm run build` - build the project
- `npm run build:prod` - build the project in production mode
- `npm run build:prod:stats` - build the project in product mode with stats
- `npm run analyse` - analyse bundle with [webpack-bundle-analyzer](https://github.com/webpack-contrib/webpack-bundle-analyzer)
- `npm run compodoc` - generate [compodoc](https://github.com/compodoc/compodoc) documentation
- `npm run changelog` - generate changelog
- `npm run prettier` - format the whole project

**GitHub**
https://github.com/wlucha/angular-starter
How to Import Chart of Accounts into QuickBooks Desktop?
Published: 2022-10-15 06:27:16

Importing a chart of accounts is additive, the import will add accounts to the existing chart of accounts, but won’t remove any duplicate or QuickBooks online default accounts. When the user imports the chart of accounts, the type and detail type must exactly match the types available in QuickBooks. If you are also looking for the guide to [import the charts of accounts in QuickBooks desktop](https://www.axpertaccounting.com/import-your-charts-of-accounts-into-quickbooks/), then reading this post can be of great help. For more details, you can also get in touch with our QuickBooks support team . Our experts will be happy to help you.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1051do8wke9toz6tcpn0.jpg)
 
Requirements to import file
Before you import the charts of accounts, it is important to first ensure that you have considered and fulfilled all the requirements:
•         The very first requirement is that the import file size should be limit to 2MB or 1000 rows per import
•         And the file must be in excel and must have the account type and name fields
•         The next thing to consider is that the users can import sub accounts by using the parent account name
•         And also, all columns must include the heading
 
Steps to import charts of accounts into QuickBooks desktop
•         The very first step is to log in QBO account
•         And then select the gear icon present in the top right-hand corner of the page
•         After that, the user needs to click on import data
•         Tap on the chart of accounts icon
•         And then, click the links that says download a sample file
•         And also open the downloaded file and clear the sample data
•         The last step is to copy the data in one column at a time
 
We end this post over here with the hope that the information we have shared in above might help the user in importing the charts of accounts in QuickBooks desktop with much ease. However, if the error persists call us at our toll-free number +1-844-405-0906. Our experts and [certified QuickBooks desktop support](https://www.axpertaccounting.com/) professionals will be happy to help you.