teleren/devto huggingface dataset:
Best resources for self-taught developers
Tags: webdev, beginners, opensource, programming
Published: 2022-08-28 16:44:43

Selecting the right tools and resources from the myriad of available resources can be challenging for Self-learner and anyone looking to make a transition to web development.

Below are some of my favorite free learning resources and tools that helped me in my journey as a self-taught web developer.

## Learning Resource

## 1. FreeCodeCamp
It is a non-profit organization with the mission to help people learn to code for free by creating thousands of videos, articles, and interactive coding lessons.
      It has the most comprehensive lessons and an up-to-date curriculum. It also, consists of an interactive learning web platform, an online community forum, chat rooms, as well as online publications.

## 2. W3Schools
It’s one of the oldest online learning platforms that create simplified and interactive learning experiences. If you are looking to learn basic frontend development technologies - HTML, CSS, and Javascript, this is definitely a great website.

## 3. Javascript.info
Javascript.info created in 2007 by Ilya Kantor covers modern javaScript tutorials from the basics to advanced topics with simple, but detailed explanations.

## 4. CSSreference.io
Cssreference is a free visual guide to CSS. It features the most popular properties and explains them with illustrated and animated examples.
      It gives illustrated and animated examples to improve understanding of the cascading style sheet (CSS) covering topics like flexbox, grid, box model, positioning, transitions, animations, and typography.

## 5. DevDocs
DevDocs is a web app aimed at providing you with quick access to the reference manual of just about every front-end language and library. It combines multiple documentation of over 100+ for lots of developer tools into a single searchable interface.

## 6. MDN Web Docs
MDN (formerly Mozilla Developer Network) is a free resource for in-depth and well-explained documentation on web standards such as HTML, CSS, JavaScript, Web APIs, and much more.

## 7. Frontend Mentor
Frontend Mentor is a collaborative learning platform that provides designs so that you can practice your front-end skills using a real-life workflow.
      It helps you improve your front-end skills and knowledge of HTML, CSS, and JavaScript by building real projects.

## 8. Scrimba
Scrimba is a code-learning platform that helps motivated newbies become professional web developers without spending a fortune. Its mission is to give students the quality of a coding Bootcamp with interactive courses and tutorials on React, Vue, Angular, JavaScript, HTML, CSS, and more.

## 9. CSS In Real Life
CSS-irl is designed, written, and developed by Michelle Barker covering tips, tricks, and tutorials on the web's most beautiful language known as CSS.

## 10. Learn X in Y minutes
It’s one of the most popular tutorial websites that provides a concise and introductory guide on any programming language and technologies including Solidity, Python, JavaScript, C, C++, etc.
Fly.io, alternativa ao Heroku
Tags: heroku, flyio, cloud
Published: 2022-08-28 16:38:37

No dia 25/08/2022 chegou o e-mail que o heroku vai remover alguns serviços gratuitos lá em novembro. Se você assim como eu usava muito ele para hospedar alguns testes, soluções do seu github e até mesmo algumas brincadeiras. Fly.io pode ser uma solução incrível substituindo o heroku.

## Como migrar seus apps

Veremos um passo a passo para realizar a migração, tanto da aplicação quanto das esteiras de deploy no github actions.

## Instalação
- Crie uma conta em [fly.io](https://fly.io)

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

- Baixe e instale o SDK fornecido.

### linux
```bash
curl -L https://fly.io/install.sh | sh
```

### mac
```bash
brew install flyctl
``` 

### windows
```bash
iwr https://fly.io/install.ps1 -useb | iex
``` 

- Faça o login com o SDK
```bash
fly auth login
```

## Deploy
- Na pasta raiz do seu projeto rode
```bash
fly launch
# siga os passos de configuração necessários
```
Um arquivo chamado `fly.toml` será criado na raiz do projeto. 

- Altere a porta da aplicação.

```toml
[[services]]
  http_checks = []
  internal_port = 3000  #porta da sua aplicação aqui
  processes = ["app"]
  protocol = "tcp"
```
- Por fim rode
```bash
fly launch
# or
fly deploy
```
Acesse o link disponibilizado no fly.io e seu app estará disponível.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3fab0uumfdi4khx6371d.jpg)

## Github actions
Altere o arquivo de workflow do seu app. Remova tudo referente ao Heroku.
- Adicione no `arquivo_deploy.yaml`.

```yaml
env:
  FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
```

- No seu job

```yaml
- uses: superfly/flyctl-actions/setup-flyctl@master
- run: flyctl deploy --remote-only --detach  
```
- Exemplo

```yaml
name: Deploy to fly.io app

on:
  create:
    tags:
      - v*

env:
  FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2

      - name: Config file access
        run: |
          rm -rf config.json
          touch config.json 
          json='{"database": {"url": "://$DB_USER:$DB_PASS@$DB_HOST:$DB_PORT/"},"server": {"port": ""}}'
          echo "$json" > config.json
          sed -i -e 's/$DB_PORT/'${{ secrets.DB_PORT }}'/g' config.json
          sed -i -e 's/$DB_USER/'${{ secrets.DB_USER }}'/g' config.json
          sed -i -e 's/$DB_PASS/'${{ secrets.DB_PASS }}'/g' config.json
          sed -i -e 's/$DB_HOST/'${{ secrets.DB_HOST }}'/g' config.json
          cat config.json

      - uses: superfly/flyctl-actions/setup-flyctl@master
      - run: flyctl deploy --remote-only --detach  
```

Feito, com isso seu app já está disponível gratuitamente para uso da mesma forma que fazíamos no heroku.
Problems with packages in Go
Tags: go, packages, beginners
Published: 2022-08-28 16:30:19

I'm having problems to use packages. I a following literally the steps I find online, but I have an error message.

I have this package in GOPATH:

go/src/greet/day.go

package greet

var morning = "Good morning"
var Morning = "hey" + morning
I want to import it in my code:

go/src/app/entry.go

package main

import ("fmt"
        "greet")

func main(){
    fmt.Println(greet.Morning)
}
When I run entry.go, I receive this message: entry.go:4:3: package greet is not in GOROOT (/usr/local/go/src/greet)

Does anybody how to fix it?

Thank you.
Help me with installing Dart
Tags: dart, programming, help
Published: 2022-08-28 15:35:15

Hello guys 
These days I wanna try Dart but I cant install dart-sdk by chocolatey!
Can you help me with this problem?

Picture of Error:

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ezz5akv3xq2s3pnkijpr.png)
Kotlin Springboot -- Part 3 Controller を Resource 層にして Usecase につなげる
Tags: kotlin, springboot, ca
Published: 2022-08-28 15:25:00


## HTMLController を SpringbootResource にする

```kotlin
package com.example.springboot

import org.springframework.stereotype.Controller
import org.springframework.ui.Model
import org.springframework.ui.set
import org.springframework.web.bind.annotation.GetMapping

@Controller
class HtmlController {
    @GetMapping("/")
    fun nanika(model: Model): String {
        model["title"] = "SpringBlog"
        return "index"
    }
}
```

これが HtmlContorller.kt というファイルで書かれていて

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

アプリを起動すると index に渡したものを表示する

MVC のアーキにしたがってコントローラーと名付けていた
 
CA に変えるので リソースにする

```kotlin
@Controller
class SpringbootResource {
    @GetMapping("/")
    fun root(model: Model): String {
        model["title"] = "Springboot Root"
        return "index"
    }
}
```

これでリソースとして使う。

---

## Usecase を呼びやすくする

```kotlin
fun getTaroHanakoName():String {
    val taroName = taro.findName()
    val hanakoName = hanako.findName()
    return "$taroName,$hanakoName";
}
```

Usecase の関数を呼びやすいまとめるものにする

---

## SpringbootResource で Model と Template を噛ませながら Usecase を呼ぶ

```kotlin
   @GetMapping("/names")
    fun taro(model:Model): String {
        model["title"] = getTaroHanakoName()
        return "index"
    }
```

model と index のテンプレートを噛ませて
Usecase からの値を出力する

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

これで /names にアクセスした時に Usecase -> Driver まで動いて
中身を web に出せた。

```php
2022-08-29 00:14:57.777 ERROR 1463816
 --- [nio-8080-exec-1] org.thymeleaf.TemplateEngine             : 
[THYMELEAF][http-nio-8080-exec-1] 
Exception processing template "Taro": 

Error resolving template [Taro], 
template might not exist or might not be accessible 
by any of the configured Template Resolvers
```

なお、 Thymleaf を使ってしまっているので 
Template と Model ナシで直接 Usecase を
Getmapping に噛ませ用途すると失敗する。

## まとめ

Kotlin Springboot で Rest/Resource 層から
Usecase -> Driver としてデータをとってくるためには

旧来の Controller の書き方で書いて、名前を Resource にして
Usecase の呼び出しの結果を model に渡して
template で表示する。
Hello, world.
Published: 2022-08-28 15:14:18

'Hello, world' as the first blog post title...a bit cliché? That's okay, it's an apt beginning.

So what is the purpose behind starting another blog in the already vast sea of developer blogs?

A personal record, a place to type things out in my own words in hopes of reinforcement, somewhere to share my learning and document my journey.

---

It will be an attempt at weekly posts sharing things I learned and what I worked on that week. 

Problems I encountered (and hopefully how they were solved!), interesting tidbits and lessons about the world of programming and web development in general, conference talks and presentations that I enjoyed and what I took away from them.

---

A little late to starting it, but better late than never.
Dockerizing a Nest js application and deploying to Dockerhub (without docker-compose)
Published: 2022-08-28 14:58:53

---
title: Dockerizing a  Nest js application and deploying to Dockerhub (without docker-compose)
published: true
date: 2022-07-01 17:07:51 UTC
tags: 
canonical_url: 
---

Hi Peeps, Today we will look at how to dockerize a node application and deploy it to docker hub. We will be using [this](https://github.com/manulangat1/nest-docker-jenkins.git) project for demo purposes.

#### 1. Clone application

Navigate to your preferred folder and clone the application

```
cd Desktop 
git clone https://github.com/manulangat1/nest-docker-jenkins.git

```

#### 2. Create your docker file.

Once you have cloned your project, on the root of the project create a file Dockerfile.  
A Dockerfile is a text document that contains all the commands that a user would call on the command line for an image to be built.

```
FROM node:13-alphine # this is the base image in which our image will be based on. 
WORKDIR /usr/src/app # this sets the working directory for our image 
COPY package*.json . # this command copies the package.json and package-lock.json 
files from our host container to the docker container. 
EXPOSE 3000 # this exposes our port on the docker .
RUN npm install # this installs all our dependencies 
COPY . . # this copies all the other files from our host to our docker container
CMD ["npm" , "start:dev"] # this is the entry point of our application

```

#### 3. Build our docker image.

We are now going to build our image using docker

```
docker build -t nest-docker:nd-1.0 .

```

The `-t commands` tells docker to tag our image with the name `nest-docker` and the `.` context tells it to look for the Dockerfile at the root of the project.

#### 4. Run the docker image

We will now run our docker image

```
docker run -p 3000:3000 --name nest-service nest-docker:nd-1.0

```

`-p` binds our port to the port we had earlier exposed and `--name` gives a name to the current container that we are running.

#### 5. Deploying to docker hub.

Head over to [Dockerhub](https://hub.docker.com/) and create an account if you do not have one. Once you log in, create a repository and we are set to deploy our docker image to docker hub.

Run the following command to log in to dockerhub.

```
docker login

```

To push our docker image to docker hub, run the following command.

```
docker push nest-docker:nd-1.0

```

You have now built and deployed a dockerized nest application to dockerhub.

Follow me for more articles on docker, Jenkins and DevOps in general.
Developing my own Headless API service - Part 0
Tags: saas, headless, api, webdev
Published: 2022-08-28 14:18:12

> So I decided to use my own skills and open my own self-sustainable business.

Hello readers, I call myself daCoder, and my story begins far back, since MS-DOS and Basic, when I was developing for fun and study. 

Then at the break of Web2.0 I even started my own business, a web B2B e-commerce service. I developed, team-lead, VP-R&D and CTO'ed.
And it was a booming... 
But then it wasn't about development anymore, it was management, planning, strategies... and other managers... and business and more business. 
_And then the spark slowly faded away._ 😔

### So finally I retired...

**but now what?**

As a developer, I have 20+ years expertise in:

* Backend - PHP, Python, Java, C (CGI and stuff), Perl
* Frontend - since the happy days of native JS to nowadays React 
* Devops - from before it was called devops. 

But I've always been drawn to backend, architecture, and scaling systems.
Thats my passion 🤩

So I decided to use my own skills and open my own self-sustainable business, focusing on API services and developers.

Yeah, I know. There're soooo many services alike.  
In fact, for each of the APIs I'm writing and about to add there're numerous well-established and deeply focused businesses. 

However, my orientation is to focus on simplicity, minimalism, and as much as accurate as possible.  
This means that 

1. Services should be API first, with consumable OpenAPI documentation.
2. It should be Developer readable first, UI later
3. Deliver APIs that will solve the your development tasks faster and more sustainable than adding a library in your code
4. Fairness & transparency - you get what you pay for, and you pay for what you get. No hidden fees, no "subscriptions" when it doesn't make sense.
5. Put it all under one umbrella, so you don't have to seek and partner with so many vendors

So hi again :-) 
I'm daCoder, this is my new Headless SAAS and this is the story of building it

---
Next: [The beginning](https://dev.to/dacoder/my-own-headless-saas-part-1-where-i-begin-420c)
Injeção de dependência Dinâmica
Tags: java, javaee, jakartae, cdi
Published: 2022-08-28 14:08:30

Hoje vou falar um pouco sobre injeção de dependência sob demanda.

E comum encontrarmos beans ou controllers ou qualquer outra classe com várias injeções de dependências e na maioria das vezes uma boa parte dessas injeções são usadas em momentos pontuais da rotina.

Quando a classe que contém esses injects e instanciada, a CDI vai se virar para criar e disponibilizar todas as suas dependências, já imaginou se em cada uma das dependências existir uma lógica no seu construtor? talvez possa resultar em perca de performance.

Vamos ver na prática:

na forma tradicional seria mais ou menos assim:

```java
@inject
private Payment payment;

```

Para implementar a injeção sob demanda e bem simples

```java
@inject
@any
private Instance<Payment> paymentInstance; testess

private Payment payment;
```

Se observar estamos usando o objeto Instance para "segurar" as injeções, para que possamos obter a implementação de forma mais simples e rápida, passamos por parâmetro a interface.

 e no momento em que precisarmos dessa dependência a chamamos da seguinte forma:

```java
if( condition ){

this.payment = paymentInstance.select(SuaImplementacao.class).get();

}
```

será apenas nesse momento em que a injeção e efetivamente será executada.

Ficamos por aqui hoje... até a próxima
Processing Point Cloud data with PCL in the browser
Tags: javascript, webassembly, pointcloud, webdev
Published: 2022-08-28 14:02:00

**[pcl.js](https://github.com/luoxuhai/pcl.js)** is a Point Cloud Library (PCL) that runs in the browser, powered by Emscripten and WebAssembly. Point Cloud Library (PCL) is a standalone, large scale, open C++ project for 2D/3D image and point cloud processing.

**Removing outliers using a StatisticalOutlierRemoval filter demo:**
![StatisticalOutlierRemoval](https://cdn.jsdelivr.net/gh/luoxuhai/pcl.js@master/website/static/img/examples/StatisticalOutlierRemoval.gif)

Github: [https://github.com/luoxuhai/pcl.js](https://github.com/luoxuhai/pcl.js)
Simple Shorten URL using Redis and Auth0
Tags: redishackathon, redis, dotnet
Published: 2022-08-28 13:56:00

### Overview of My Submission

I've built Simple URL Shorten-er. It's pretty simple and uses a simple data structure. I use URL Shorten-er quite often and want to try building the simple one! I tried to extract the small requirement for the shortener and design the database structure. I implemented using .NET which is the programing language that is familiar to me. I was using RedisInsight and Redis Stack to help me during the development phase. It's awesome experience when building an app using Redis!

### Submission Category: 

Wack Wildcards

### Video Explainer of My Project

{% embed https://youtu.be/BAVv3r51VKA %}

### Language Used

C#/ASP.NET Core

### Link to Code

{% github bervProject/shorten-url %}

### Additional Resources / Info

#### Screenshots

* Didn't Login - Anonymous User

![Anon user](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/542vr3phjue1jgisqzlg.png)

* Authenticated User

![Auth User](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/k3thudkd0bzfdhu0r0xo.png)
 
* Authenticated User - URL List

![URL List](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kxw22no6llmzjknl4ae9.png)

* Authenticated User - Edit link

![Edit link](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/a1l138pj7qtezjl8rsqq.png)

### Collaborators

[berviantoleo](https://dev.to/berviantoleo)

- - - 

* _Check out [Redis OM](https://redis.io/docs/stack/get-started/clients/#high-level-client-libraries), client libraries for working with Redis as a multi-model database._
* _Use [RedisInsight](https://redis.info/redisinsight) to visualize your data in Redis._
* _Sign up for a [free Redis database](https://redis.info/try-free-dev-to)._
How to list commits from the current branch.
Tags: git, bash, code, log
Published: 2022-08-28 13:18:37

---
title: How to list commits from the current branch.
published: true
description: How to git list commits difference from the current branch to the master one. 
tags: git, bash, code, log
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yjnbq3158dumcxcrw34m.jpg
# Use a ratio of 100:42 for best results.
---

Let's say, you're on your terminal and you want to have the list of commits from your current branch !

There is some tricks to do that, the faster one is just to git log and scroll !
But i found useful to made a simple alias to do so !

![First](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/t75742p21orp6clz9kd4.png)

As you can see, this is quite simple, it's a combination of 2 main commands i set up in my `~/.gitconfig` as an alias :

```toml
[alias]
    ; to list commits from the current branch
    commit-list = !git log --no-merges --oneline --decorate master..$(git branch --show-current)
```

## HOW

- First, i need to get the branch where i am right now, and to do that, i use `git branch --show-current`
- Second, am going to compare with `git log`, the difference commits from my branch to the master branch, because i don't want merges, nor too much details, i added two flags, `--no-merges` and `--oneline` + a simple `--decorate`. `git log --no-merges --oneline --decorate`

## DEMO

![Demo](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/oyv4xoqehryc6k0mnxg3.gif)

**PS:** Don't worry about the "passphrase" on the demo, i added a lot of security checks for any git command on my local machine, i may do a future post about that soon !

EDIT : From Christophe Colombier, you can do the same thing with a native command, such as : `git cherry -v origin`

Thanks for reading, feel free to like and/or subscribe for more 🐼.
How to Prepare yourself for AZ-900 & AZ-204
Published: 2022-08-28 13:02:00

### 

**Hello Techies,**

My name is **Fahad Ashiq** working as a SDE - I at @Calrom I am co-leading Microsoft Community Lahore along with training, mentoring students for last two years in different technical domains of technology, I am also Microsoft Certified Trainer and known as Community Dev Advocate.

As tech community contributor, I am also avid of learning new technologies including **Cloud, AI and Data Science** I am actively participating in learning different online courses and platform to learn, excel & grow in respective work domain knowledge.

In the above context of learning and leading things in our communities, I have cleared **Azure-900** and **Azure-204** certification last year and a lot of community folks asked to provide them content related to preparation and guidance to clear these exams.

You can get access all the content related to azure certification on their learning platform which I am pasting below:

( https://docs.microsoft.com/en-us/ )

I am also pasting links to get access content of AZ-900 & AZ-204 

**AZ-900:** 
( https://docs.microsoft.com/en-us/certifications/azure-fundamentals/) 

**AZ-204:**
( https://docs.microsoft.com/en-us/certifications/azure-developer/)

The minimum 70% percentile needed to clear the exam out 1000 marks but if you can score above this is your intelligence and interest of learning. All the Fundamental and Associate Level exams are MCQS based but there is some practice exercises you can attempt while preparing them in associate level not in fundamental level.

You can prepare some other content as well related to these certifications which can help you in understanding topics more on technical side to get dive into the practical implementation of things use in the cloud world.

Happy Learning! 

Don't forget to subscribe me on YouTube Channel: https://www.youtube.com/channel/UC4yLR4UKU7fOtlKQqkDEmEQ
Caching for performance with Amazon DocumentDB and Amazon ElastiCache
Tags: redishackathon
Published: 2022-08-28 12:33:00

### Overview of My Submission

I move the AWS sample app from using two databases to a single database. Earlier they were using Elasticache for cacheing and DynamoDb for data persistence bu adding Redis as the primary DB I have removed one file of code and made it super simple to read and manage.


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

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



### Submission Category: 

Minimalism Magicians


### Language Used
Node.js


### Link to Code

{% embed https://github.com/ajitsinghkaler/amazon-documentdb-and-amazon-elacticache-caching-for-performance-example %}


- - - 


* _Check out [Redis OM](https://redis.io/docs/stack/get-started/clients/#high-level-client-libraries), client libraries for working with Redis as a multi-model database._
* _Use [RedisInsight](https://redis.info/redisinsight) to visualize your data in Redis._
* _Sign up for a [free Redis database](https://redis.info/try-free-dev-to)._