teleren/devto huggingface dataset:
BotTuber, automates compilation videos YouTube Channel Completely. Check it out on GitHub.🔽(Video Tutorial Included)
Tags: python, youtube, opensource, automation
Published: 2022-01-23 01:21:19

Features😶‍🌫️ - 

> 1. Interactive  Auto/Manual mode
> 2. Makes Compilation (Intro & Outro)
> 3. Auto Title, Description & Tags 
> 4. Auto TimeStamps & Credits (Username & Caption from Video)
> 5. Edit description.txt when in manual mode

GitHub👩‍🚀 - https://github.com/sam5epi0l/BotTuber.git
Releases👨‍💻 - https://github.com/sam5epi0l/BotTuber/releases/tag/v1.21.0
by sam5epi0l - https://twitter.com/sam5epi0l

 *Please Comment Below if You found Bugs*

📄Quick Start

`git clone https://github.com/sam5epi0l/BotTuber.git
cd BotTuber
(add instagram credentials in config.py)
(add YouTube API v3 credentials to googleAPI.json (check instructions))
pip3 install -r requirements.txt
python3 botTuber.py`

Usage✅

`python3 botTuber.py -i # interactive mode
python3 botTuber.py -a # Full automation
python3 botTuber.py -m # manual mode
python3 botTuber.py -h # help menu`

Video Installation Tutorial - https://youtu.be/BbPErvcqXyw
Vue 3 + Vite + TypeScript + Quasar issue
Tags: vue, vite, quasar, webdev
Published: 2022-01-23 01:21:08

**Namaste to everyone!🙏**

I'd like to share with you an issue that I had to cope with today:)

It's important to mention, that I used vite cli command to create vue project, then I started adding extensions to it.

When I tried to add typescript to my exsisting project on Vue 3 + Vite + Quasar, I faced the problem:

> Following the stipulations here (https://quasar.dev/quasar-cli/supporting-ts)
I received an error from the compiler : `File "@quasar/app/tsconfig-preset" was not found.`

So, I started to look for a solutions on github and stackoverflow, but found nothing there...

After trying commands like`vue add quasar`, I looked up in Quasar docs and found App Extensions section. But there I found instructions only for quasar cli:( 

But not got discouraged I decided to try a command: `yarn add @quasar/app`

And **_voila!_** It works!:D

Thank you for reading and I hope that this information will be useful:)

P.S. I'm always open to discussion on any theme! Feel free to reach me!:) I'm on Discord: IngSm#0471
Crypto.com y el robo de 34 millones de dólares
Tags: ciberseguridad, cryptocurrency, totp
Published: 2022-01-23 01:18:38

La plataforma Crypto.com sufrió, el pasado lunes, un ataque que le llevo a perder alrededor de $34 millones de dólares en criptomonedas, según confirma la misma compañía mediante su web, durante la pasada noche. Esta situación obligó a la compañía a detener los retiros durante la mayor parte del día y solo aseguró que sus clientes no perderían dinero.

Este ataque comprometió a 483 usuarios y permitió a los los piratas informáticos obtener:

- **Ethereum's**: 4.836,26.
- **Bitcoin's**: 443,93.
- **Otras Criptomonedas**: 66.200 dólares aprox.

Pese a que no se han oficializado los métodos utilizados para vulnerar los sistemas de crypto.com, todo apunta a una falla en el segundo factor de autenticación (**TOTP**), que le permitió a los atacantes pasar por alto esta validación. Lo que, siendo enero 2022, nos deja con un muy mal sabor de boca, ya que este método se considera uno de los principales sistemas que buscan no permitir accesos no autorizados.

Hemos de velar, constantemente, por la seguridad de nuestros sistemas, contar con los procedimientos correspondiente ante alguna situación inesperada y no esperar el desastre para reaccionar. Sabemos que no existen sistemas de seguridad infalibles, pero la proactividad en la detección de vulnerabilidades o fallas de procesos, deben ser parte de nuestro día a día.

Que no sea una posibilidad el arriesgar nuestras empresas.
Running dynamoDB locally
Tags: database, javascript, node, aws
Published: 2022-01-23 00:31:33

This is in part summary of a YouTube video: [link here](https://www.youtube.com/watch?v=ul_85jfM0oo&t=877s) 

Question to start with: How do I run dynamoDB locally? I do not want to risk all my codes going into AWS and mess things up there (big aws charges). 

## Prerequisites

Clone this repo: https://github.com/SamWSoftware/ServerlessYoutubeSeries/tree/l19-serverless-offline

Once cloned, run the following commands in your working directory. 

```
npm install
```

```
sls dynamodb install
```

this will create a local dynamodb instance in your working directory. 

then run

```
sls offline start --stage dev
```

once done, use postman to test whether your local endpoint is connected to the dynamodb!!!
bootstrap-select not work in angular
Published: 2022-01-23 00:08:44

Hello

Copy/paste and execute this in index.html of angular project:

```
`<!doctype html>
<html lang="en">

<head>
  <meta charset="utf-8">
  <title>NgAuth</title>
  <base href="/">

  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="icon" type="image/x-icon" href="favicon.ico">
</head>

<body>
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css"
    integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous" />
  <link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">

    <!-- 
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-select/1.6.3/css/bootstrap-select.min.css" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-select/1.6.3/js/bootstrap-select.min.js"></script> -->

  <!-- Latest compiled and minified CSS -->
  <link rel="stylesheet"
    href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-select/1.13.2/css/bootstrap-select.min.css">
  <!-- Latest compiled and minified JavaScript -->
  <script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-select/1.13.2/js/bootstrap-select.min.js"></script>
  <!-- (Optional) Latest compiled and minified JavaScript translation files -->
  <!-- <script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-select/1.13.2/js/i18n/defaults-*.min.js"></script> -->

  <!-- <app-root>Loading...</app-root> -->
  
  <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"
    integrity="sha384-0mSbJDEHialfmuBBQP6A4Qrprq5OVfW37PRR3j5ELqxss1yVqOtnepnHVP9aJ7xS"
    crossorigin="anonymous"></script>
  
  <!-- <script src="../node_modules/jquery/dist/jquery.js"></script>
  <script src="../node_modules/bootstrap/dist/js/bootstrap.js"></script> -->

  <script src="./assets/js/custom.js"></script>

  <select class="selectpicker" data-live-search="true">
    <option data-tokens="ketchup mustard">Hot Dog, Fries and a Soda</option>
    <option data-tokens="mustard">Burger, Shake and a Smile</option>
    <option data-tokens="frosting">Sugar, Spice and all things nice</option>
  </select>
 
</body>
<script>
  alert('test');

</script>
</html>`


SAmple on: https://developer.snapappointments.com/bootstrap-select/examples/

Not working, select doesn't dropdown... why?
Thx
Understanding object in Javascript
Tags: javascript, beginners
Published: 2022-01-23 00:05:21

Object in javascript are similar with arrays, they able to store multiple value, however the difference is object don't have indexed positions like arrays
and object give a name to every value that you store.

## Analogy of object

Object in javascript has similarity with object in real life, both has property and behaviors.

Car property maybe something like:

- Brand
- Model
- Color
- Horse Power
- Transmission Type

Car also has behaviors such as:

- Accelerate
- Turn right
- Turn left
- Turn on Light

Thoose car object inside javascript will looks like this:

```js
    let car = {
        brand:"Toyota",
        model:"Prius",
        color:"silver",
        horsePower:98,
        transmissionType:"AT"
        accelerate:function(){
            // code to accelerate
        }
        turnRight:function(){
            // code to turn right
        }
        turnLeft:function(){
            // code to turn right
        }
        turnOnLight:function(){
            // code to turn on light
        }
        ...
    }
```

## How to create an object

There is two way to create object, first is using `object literal`, and second one are using `new` keyword.

```js
// object literal

const car = {
    brand:"Toyota"
}

// new keyword

let car = new Object();
car.brand = "Toyota";
```

Between the two,`object literal` are widely use among developer because it's better readability and also faster execution.

### Object properties & Method

The key:value pair in javascript object called with `properties`, there is two ways to access properties either dot notation or square bracket.

```js
// Dot notation

car.brand // Toyota

// Square bracket

car["brand"] // Toyota

// or calling square bracket with variable

const brand = "brand";
car[brand] // Toyota

```

Then you can change value of properties by set new value using `=` sign

```js
car.brand = "Honda" // or
car["brand"] = "Honda"
```

You can also access all object values in a form of arrays using `Object.values`

```js
const car = {
    brand:"Honda",
    type:"Civic"
}

Object.values(car)

// ["Honda", "Civic"]

```

To make a method (method is a function that store inside an object) you can add `function`.

```js
    let person = {
        firstName:"John",
        lastName:"Snow",
        fullName:function(){
            return `${this.firstName} ${this.lastName}`
        }
    }
    person.fullName()
    // John Snow
```

`this` keyword refers to the owner of the function, at above example it will be `person` object, therefore inside `fullName()` method `this.firstName`
will refer to `person` object with `firstName` property name or similar with `person.firstName`.
How to make union type from all the properties in a type alias or an interface in TypeScript?
Tags: typescript
Published: 2022-01-23 00:00:00

---
  title: How to make union type from all the properties in a type alias or an interface in TypeScript?
  published: true
  tags: TypeScript
  date: Sun Jan 23 2022 05:30:00 GMT+0530 (India Standard Time)
  canonical_url: https://melvingeorge.me/blog/make-union-type-from-all-properties-type-alias-or-interface-typescript
  cover_image: https://melvingeorge.me/_next/static/images/main-c93498511f5268f4e15bf111166f21e9.jpg
  ---
  [Originally posted here!](https://melvingeorge.me/blog/make-union-type-from-all-properties-type-alias-or-interface-typescript)
  
To make a union type from all the properties in a `type alias` or an `interface` type, we can use the [`indexed access type` syntax](https://melvingeorge.me/blog/get-property-type-from-another-type-alias-or-interface-typescript), and then we can use the `keyof` type operator followed by the name of the `interface` or `type alias` in TypeScript.

### TL;DR

```ts
// a simple interface
interface Car {
  name: string;
  yearMade: number;
  isSuv: boolean;
}

// make union type from all the
// properties from the `Car` interface
type CarProps = Car[keyof Car]; // CarProps -> string | number | boolean
```

For example, let's say we have an interface called `Car` with a property called `name` having the type of `string`, another property called `yearMade` having the type of `number`, and another property called `isSuv` having the type of `boolean` like this,

```ts
// a simple interface
interface Car {
  name: string;
  yearMade: number;
  isSuv: boolean;
}
```

Suppose we want to make a union type from all the properties in the `Car` interface.

To do that we can use the `indexed access type` syntax and then use the `keyof` type operator followed by the name of the `interface` we need to make the union type from. In our case, it is the `Car` interface.

It can be done like this,

```ts
// a simple interface
interface Car {
  name: string;
  yearMade: number;
  isSuv: boolean;
}

// make union type from all the
// properties from the `Car` interface
type CarProps = Car[keyof Car]; // CarProps -> string | number | boolean
```

Now if you hover over the `CarProps` type, you can see that it is now a union type composed of `string`, `number`, and `boolean` type which is the same as the types of the properties in the `Car` interface.

We have successfully made union type from all the properties in the interface. Yay 🥳!

This method can be used for the `type alias` type in TypeScript.

See the above code live in [codesandbox](https://codesandbox.io/s/make-union-type-from-all-properties-type-alias-or-interface-typescript-kyn50o?file=/src/index.ts).

That's all 😃!

### Feel free to share if you found this useful 😃.

---
Weather App, built with jQuery and Yahoo Weather API (4 color schemes) ⭐
Tags: codepen
Published: 2022-01-22 23:36:22

<p>Hello,</p>

<p>This is my Weather Application for freeCodeCamp Portfolio. The Default Location is set to London but you can change it in the settings menu! It was built with jQuery and the Weather API from Yahoo to retrieve the data in a JSON format.</p>

<p>Features:</p>

<ul>
<li>Ability to save the settings when the page is reloaded and retrieve the current settings using LocalStorage from HTML5.</li>
<li>Ability to change the current city.</li>
<li>Choose from metric or imperial system.</li>
<li>Choose from 4 themes.</li>
<li>Ability to chose what information you need to be shown on the first page.</li>
<li>9 Day's Forecast.</li>
</ul>

<p>Thanks,
Stefan</p>

<p>*featured on the front-page.</p>

{% codepen https://codepen.io/harunpehlivan/pen/BawXxaY %}
Beautifying my ugly newbie HTML page 
Tags: html, css, beginners
Published: 2022-01-22 23:29:10

You've taken the first steps. You've had a blast writing up some HTML code.

You even added a nice looking image AND used semantic HTML for improved accessibility and improved browser understanding of your content.

_Note: Semantically correct HTML helps search engines, screen readers, and other user devices determine the significance and context of web content._

But now, it looks poo.

So poo, even you don't want to look at it for longer than you need to. 😄 Know what I mean?

As I write this, this is the situation I find myself in. I don't want to design ugly web pages, so I set myself a challenge of beautifying my Tribute page about Satoshi Nakamoto.

What follows next are a series of screenshots and tips I came across along the way so that if you happen to be in the same situation, you know where to start!

## Before
_See what I mean by poo? #LetTheTransformationBegin!_


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


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

- First, I imported a Google Font (VT323 for that "retro code look")
- I then added one more image to spice up the page a little and added the pink border.
- Next, I added the heading with some cool CSS effects.
- Final touches included scaling the images on hover, for some interactivity.

**Lessons learnt**
- Designing the desktop view was great. It created the feeling of progress, however, I SHOULD HAVE CODED MOBILE-FIRST 😭, especially because I wanted it to look good on mobile. 
- Trying to adjust columns and layout after, was a pain in the ***.
- It's still not perfect but I had to move on after spending more time than I needed to on the project.
- If there's one thing I'd say, it would be to start simple. I thought I'd need to do a lot to make it look somewhat presentable.
- Simply adding images, non-boring font, exciting CSS and some layout features were enough for one of my first attempts at beautifying HTML with vanilla CSS on the fly.

**What now?**
- I came across a resource: frontendmentor.io that aims to help teach how to beautify the front end. I'll check it out and start thinking about learning Bootstrap now that I know the basics of HTML and CSS.
- I'll also finish the remaining practise projects I have lined up.

**Final words** 
I hit some challenges and used Google quite a bit (mainly for some CSS syntax). The feedback from my Bootcamp instructor (Black CodHer Bootcamp!) was also invaluable.
Doing this was a lot of fun, and I'm ready for more!
 
**View the final version**
https://zealous-snyder-47096a.netlify.app/

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/z7pzrr82nfm7rmgwjjza.png)
P.s. It's much prettier on desktop mode 😋

Thank you for your time. Please drop your comments below. See you in the next one!
Big O | Como calcular, na prática, em Javascript?
Tags: javascript, algoritmos, braziliandevs, bigo
Published: 2022-01-22 23:28:29

Olá, devs! Aqui será uma descomplicação completa em relação ao cálculo de complexidade de algoritmos com o Big O. Iremos analisar esta função no vídeo:

```
function anotherBigOChallenge(input) {
  let a = 5; //O(1)
  let b = 10; //O(1)
  let c = 50; //O(1)
  for (let i = 0; i < input; i++) { //O(n) 
    let x = i + 1; //O(1)
    let y = i + 2; //O(1)
    let z = i + 3; //O(1)
   }

  for (let j = 0; j < input; j++) { //O(2n)
    let p = j * 2; //O(1)
    let q = j * 2; //O(1)
  }
  let whoAmI = "I don't know"; //O(1)
}
```

Sugiro que, ao menos, saiba basicamente os conceito Big O no contexto constante O(1), liner O(n) e quadrática O(n^2).

{% vimeo 669017643 %}

E, agora, acrescentaremos um novo _for_ e faremos um novo cálculo:

{% vimeo 669018145 %}

Em geral, podemos dizer que a complexidade do algoritmo é apenas linear, quadrática ou constante, sem detalhes como O(5n), pois a constante 5 não altera a linearidade.

**Contatos**
Email: luizcalaca@gmail.com
Instagram: https://www.instagram.com/luizcalaca
Linkedin: https://www.linkedin.com/in/luizcalaca/
Twitter: https://twitter.com/luizcalaca
Pipeline manuales en gitlab
Tags: devops, pipeline, gitlab
Published: 2022-01-22 23:22:08

Esta semana tuve la tarea de modificar los pipelines que usamos en el trabajo para que no se despliegue en cada rama creada una API nueva, lo cual suena muy util pero ya en la practica no era tan redituable ya que no eran muy usadas y provocaban posibles errores en el cluster de K8s.

Al inicio pensé que seria algo simple ya que e podido interactuar con los archivos proporcionados por gitlab con el uso de variables de entorno pero al enfrentarme al problema descubrir que no era el caso ya que agregar una variable mataba todos los reviews lo cual no estaba buscando, entonces cambie mi problema y en lugar de permitirlo con una variable que el programador envié recordé que puedo volver manual la ejecución de alguna tarea en los pipeline dando como resultado el primer ejemplo:

```
include:
  - template: Auto-DevOps.gitlab-ci.yml
review:
  when: manual

```
De esta forma todos los review son manuales y no se están desplegando todo el tiempo, pasando ese control al programador.

Hay ocurrió otro problema ya que tenemos el habiente de dev que es llamado como review/dev lo cual hace que te pregunte si lo quieres ejecutar, eso no es le funcionamiento que necesitamos ya que al hacer un merge a dev debería de subir en automático para solucionar eso use otras reglas dando como resultado el archivo final que cumple con todas las expectativas.

```
review:
    rules:
        - if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
          when: never
        - if: '$CI_COMMIT_BRANCH == "dev"'
          when: on_success
        - if: '$CI_COMMIT_TAG || $CI_COMMIT_BRANCH'
          when: manual

```
Como últimos cambios se agrega que si el pipeline que se correo es la rama por default no se va a ejecutar el trabajo pero si es un Tag o un commit a cualquier rama se cree el trabajo pero se necesite la ejecución manual.
Self-improvement trap
Tags: discuss, personal, improvement, growth
Published: 2022-01-22 23:19:53

---
title: Self-improvement trap
published: true
description: Self-improvement without gratitude and humility is...
tags: discuss, personal, improvement, growth
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/r9zfu7iwoxbcp74mr35b.jpg
---

_Originally published on [my blog](https://www.nikola-breznjak.com/blog/daily-thoughts/self-improvement-trap/)._

> Self-improvement without gratitude and humility is just another form of feeling superior over others and boosting one's ego.

---

This is [why I write](https://www.nikola-breznjak.com/blog/daily-thoughts/why-do-i-write-these-daily-thoughts-posts/) these 'daily thoughts' posts.
Go Gin Web Frameworku ile Hello World
Tags: go, gin, webdev, programming
Published: 2022-01-22 23:05:36

Merhaba arkadaşlar, bu yazımda yeni öğrenmeye başladığım Go diline ait Gin frameworku ile basit bir giriş api’ı oluşturacağım. Buradaki motivasyonum kendi yapacağım örneği yazıya döküp internette basit de olsa bir Türkçe yazı bulunmasını sağlamak.

---

### Kısaca Go

[Go](https://golang.org/) 2009 yılında ortaya çıkan açık kaynak kodlu
bir programlama dilidir. Statik yapılı bir dildir. Google'ın mühendisleri C++ dilindeki karmaşıklığı
beğenmediklerini söyleyerek bu dili geliştirdiklerini söylemiştir.

Golang kendini

> Go is an open source programming language that makes it easy to build simple, reliable, and efficient software.

şeklinde anlatmıştır.

---

### Neden Gin Frameworkunu Seçtim?

[Gin](https://github.com/gin-gonic/gin)'i seçerken GitHub star sayısını, çevremdeki 
[Go](https://golang.org/) geliştiricilerin önerilerini ve internetteki kaynak 
çokluğuna baktım. Sonrasında [Gin](https://github.com/gin-gonic/gin) seçimini
yaptım.

---

### Go Kurulumu

Bilgisayarınıza [Go](https://golang.org/) kurmak için burdan [https://golang.org/doc/install](https://golang.org/doc/install)
işletim sisteminize uygun kurulumu seçip kurabilirsiniz.

**[Go](https://golang.org/)'yu kurduğumuza göre artık Gin için gerekli olan kurulumları yapıp ilk projemizi oluşturabiliriz.**

---

### Gin Kurulumu

[Go](https://golang.org/) için paket kurmak istediğimizde yazmamız gereken bir komut vardır. Daha önce Python yazdıysanız bunu
pip paket yöneticisine benzetebilirsiniz.

```bash
go get <go_paketinin_reposunun_ismi>
```

Yani bizim [Gin](https://github.com/gin-gonic/gin) frameworkunu kurmamız için gerekli olan komut

```bash
go get -u github.com/gin-gonic/gin
```
üstteki komuttur.

**-u parametresi varolan paketleri güncellemek için kullanılmaktadır.**

İlk olarak bir go modulü oluşturalım. Bunun için aşağıdaki komutu yazmamız yeterlidir.

```bash
go mod init go_gin_example
```
Sonrasında bir **main.go** isimli bir dosya açalım ve içine aşağıdaki kodları ekleyelim.

main.go
```golang
package main

import "github.com/gin-gonic/gin"

func main() {
	r := gin.Default() // frameworkun varsayılan ayarları ile bir router oluşturuyoruz.
	r.GET("/ping", func(c *gin.Context) { // GET isteğinin urlini ve isteğin döneceği değeri ayarlıyoruz. 
		c.JSON(200, gin.H{                // c değeri ile Gin frameworkunun fonksiyonlarını kullanabiliriz ve geriye bir JSON dönüyoruz.
			"message": "pong",
		})
	})
	r.Run()
}
```

Umarım yazı işinize yaramıştır. Anlamadığınız yerleri ya da isteklerinizi, önerilerinizi bana iletbilirsiniz. Keyifli
haftalar dilerim :) 

---

**Yararlandığım Kayneklar**

* [https://golang.org/](https://golang.org/)
* [https://github.com/golang/go](https://github.com/golang/go)
* [https://en.wikipedia.org/wiki/Go_(programming_language)](https://en.wikipedia.org/wiki/Go_(programming_language))
* [https://github.com/gin-gonic/gin](https://github.com/gin-gonic/gin)
* [https://ilteriskeskin.github.io/posts/go-gin-api/](https://ilteriskeskin.github.io/posts/go-gin-api/)