teleren/devto huggingface dataset:
AWS Linux - Setting up Apache Vhosts
Published: 2021-07-16 20:37:09

* This tutorial was writed by Tim Williams on thewebhacker.com 
* I reposting this article because it is most easy for me found after. I will stay very happy if help you too.

If you plan to host multiple sites on a single AWS instance and you are using Apache, this is the guide for you!

1) Navigate to your instance’s Apache configuration directory:

```
[ec2-user@ip-999-99-99-99 ~]$ cd /etc/httpd/conf.d
```

2) Create a vhosts config file:
```
[ec2-user@ip-999-99-99-99 ~]$ sudo nano vhosts.conf
```

3) Supply some <VirtualHost> directives to point to the document root of each of your sites.

```shell
<VirtualHost *:80>

  # The name your website should respond to

  ServerName foo.com

  # Tell Apache where your document root is

  DocumentRoot /var/www/html/foo.com

  # Add this line if you are allowing .htaccess overrides.

  <Directory /var/www/html/foo.com>
    AllowOverride All
  </Directory>

</VirtualHost>

<VirtualHost *:80>

  # The name your website should respond to

  ServerName bar.com

  # Tell Apache where your document root is

  DocumentRoot /var/www/html/bar.com

  # Add this line if you are allowing .htaccess overrides.

  <Directory /var/www/html/bar.com>
    AllowOverride All
  </Directory>

</VirtualHost>
```

4) Restart Apache for the changes to take effect:
```
[ec2-user@ip-999-99-99-99 conf.d]$ sudo service httpd restart
Stopping httpd:                                            [  OK  ]
Starting httpd:                                            [  OK  ]
[ec2-user@ip-999-99-99-99 conf.d]$ 
```

5) Test your changes:

If you don’t have your site files in place yet, you can do a simple page to test and make sure apache is listening.

```
[ec2-user@ip-999-99-99-99 conf.d]$ echo '<h1>Hello World</h1>' > /var/www/html/foo.com/index.html
```

Then on your local machine, add the server’s public IP address to your hosts file with the new domain you setup:

```
Tims-MacBook-Pro:~ tim$ sudo nano /etc/hosts
* added to the end of the file *
999.99.99.99    foo.com
```

6) If everything went smoothly you should see your test file run when you hit the domain you setup from a browser!
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nim4uk2imnus1r6m5v9k.png)
No-Code Gives People Super Powers
Tags: nocode
Published: 2021-07-20 19:53:35

---
title: No-Code Gives People Super Powers
published: true
date: 2021-07-16 20:30:16 UTC
tags: NoCode,Nocode
canonical_url: https://maxkatz.org/2021/07/16/no-code-gives-people-super-powers/
---

I believe no-code gives folks super powers.

[![Mario figure](https://katzmax.files.wordpress.com/2021/07/mario-luigi-yoschi-figures-163036.jpeg)](https://katzmax.files.wordpress.com/2021/07/mario-luigi-yoschi-figures-163036.jpeg)<figcaption>Photo by Pixabay on <a href="https://www.pexels.com/photo/focus-photo-of-super-mario-luigi-and-yoshi-figurines-163036/" rel="nofollow">Pexels.com</a></figcaption>

A lot more folks who don’t have a traditional developer background can build solutions. There are about 24-25 million developers out there. Just image if 10 or 20 times more people can build solutions with no-code. No-code gives them super powers because they can build without needing to ask developers to build it for them and they can build it quickly. Something that would take months before (waiting for developers) now can take days or even hours in some cases. When you can build a solution yourself and fast, that’s an awesome super power.

I will say it again:

_**No-code gives people super powers**_
Fix Permissions Errors from Laravel
Tags: laravel
Published: 2021-07-16 20:28:53

When you install Laravel application on server for the first time, probably see error warnings. Usually the motive is folder permissions.

For this reason I have gathered possible actions that will solve your problem.

###Create these folders on root of application:
```
storage/  
storage/app
storage/framework/cache  
storage/framework/session
storage/framework/views
storage/framework/testing
storage/logs
```

###Set the permission 
```
chmod -R 775 storage
php artisan config:cache
```

###now run:
```
sudo chmod -R 777 bootstrap/cache
php artisan config:cache
```
if the action results in error try make this directory and after run the command again.

###run:
```
php artisan optimize:clear
```
Laravel Deploy Script
Tags: laravel
Published: 2021-07-16 20:14:15


I found this example on gists page of Github. Was writed by github.com/BenSampo

```shell
# Change to the project directory
cd $FORGE_SITE_PATH

# Turn on maintenance mode
php artisan down || true

# Pull the latest changes from the git repository
# git reset --hard
# git clean -df
git pull origin $FORGE_SITE_BRANCH

# Install/update composer dependecies
composer install --no-interaction --prefer-dist --optimize-autoloader --no-dev

# Restart FPM
( flock -w 10 9 || exit 1
    echo 'Restarting FPM...'; sudo -S service $FORGE_PHP_FPM reload ) 9>/tmp/fpmlock

# Run database migrations
php artisan migrate --force

# Clear caches
php artisan cache:clear

# Clear expired password reset tokens
php artisan auth:clear-resets

# Clear and cache routes
php artisan route:cache

# Clear and cache config
php artisan config:cache

# Clear and cache views
php artisan view:cache

# Install node modules
# npm install

# Build assets using Laravel Mix
# npm run production

# Turn off maintenance mode
php artisan up
```
CSS Structure
Tags: css, productivity, sass, webdev
Published: 2021-07-16 20:06:09

#Write CSS that is easy to read and everyone can understand

One of the struggles developers encounters while writing CSS is the fact that the property you are looking for can be in any line inside a class selector. To help to solve that problem I thought about a structure to organize the styles so you can know where to write and search the properties you need.

I have a way of writing my CSS codes that makes people think I have some kind of OCD, but the truth is I have dyslexia so reviewing code or hunting down some CSS property in a class selector is a big challenge so right at the beginning of my career I “created” an organized structure to write CSS that changed the whole experience.

This structure consists of splitting properties of a class selector into blocks so you know where to look for properties by going straight to their corresponding block.


##The Structure
* Positioning Block
* Structure Block
* Typography Block
* Modifier Block

![css-structure](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/w6ta8facji6vzsx8m8h7.png)


###Positioning Block
Properties that change the absolute positioning of the element on the page like *position*, *top*, *right*, *bottom*, *left*.
![position-block](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tch4xm72tg3eyuuqf17h.png)
\
###Structure Block
Properties that modifies the structure, shape, size and details of the element like *display*, *flex and grid properties*, *margin*, *padding*, *background*, *border*...
![structure-block](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/12wrl36jyim66fw9z2vb.png)


###Typography Block
Everything relate to the lettering in general, text and font properties like *font*, *text-align*, *color*, *text-decoration*, *text-transform*...
![typography-block](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mzl2821qs7dmpozz3mj8.png)


###Modifier Block
CSS Properties that change the element in any way or add some detail to it and you can't fit in the other blocks. In my case, I put usually properties like *transition*, *transform*, *box-shadow*, *cursor*, *animation*...
![modifier-block](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dprpkfy1wrj8omzso6qt.png)
My Template for Node.js Server with Express.js using TypeScript.
Tags: typescript, node, javascript
Published: 2021-07-16 19:42:29

Hello everyone, I just created a template for Node.js server side code with Express.js framework using TypeScript, I really found it so good, but if any of you are a Senior Developer, please review my code to suggest some improvements.
And also, please comment how good or bad the code is and Guess my experience with the code quality.
And if you are a Junior Developer, you may download the repository to start your project as it has common features built already like handling Routes with Controllers and Database interaction using a popular ORM 'Sequelize' for MySQL, PostgreSQL or any of some other Relational Databases mentioned the its Docs.
Thanks for reading it, and please don't forget to comment your opinions.

URL:- https://github.com/KrishnaSharmaRS/ExpressJS-Template
GitHub Username: KrishnaSharmaRS
Scrawl-canvas: kaleidoscope video creator
Tags: codepen
Published: 2021-07-16 19:35:32

Drag-drop an image onto the canvas to load it into the kaleidoscope. Click on the record button at any time to record the output. Video will download when you stop recording. Move your mouse over the canvas to stretch things. Note: this CodePen works in Chrome and (possibly) Firefox; YMMV!

{% codepen https://codepen.io/kaliedarik/pen/XWRKdoj %}
Glassmorphic Sign In Page!
Tags: flutter, dart, github, uiweekly
Published: 2021-07-16 19:26:52

Glassmorphism is the most recent pattern in UIs in flutter and have gained even more popularity than neuromorphic images in the recent days. . .
with this we can attain - 
* Frosted-Glass effect
* Highlight the blurred transparency
* A light border on the translucent objects. 

![Glassmorphic Sign In Page UI](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qanm4kmowyv54frwdgcf.png)

Find the complete source code here and star the repo if you liked it!
{% github qwertypool/Glassmorphism-flutter %}

Also, find my instagram channel where I keep on posting such useful content & code snippets. Please follow if you find my posts useful!--->>
{% instagram CRGxygpjpK9 %}
Additionally you can also know -
{% details What is Glassmorphism %}Glassmorphism is the most recent pattern in UIs and is quickly filling in prominence. One of the more standard uses of this plan showed up in Apple’s macOS Big Sur  which turned out in 2020. However, what is Glassmorphism? As the name shows, it has a straightforward, smooth look. It is feasible for clients to see through layers. These layers can assist with presenting progressive system in the design.{% enddetails %}
{% spoiler BackDropFilter %} It applies a filter on the current widget and makes the blur impact underneath the current widget. As far as anyone knows we have an image widget so we put the image widget first at that point put the Backdrop Filter widget as its child. {% endspoiler %}

{% tag flutter %}
{% tag dart %}
{% tag github %}
¿Qué necesito saber antes de iniciar con Redux ?
Tags: redux, react, javascript, programming
Published: 2021-07-16 19:24:05

![Redux Image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wnqxxcr143jjn6rojvjn.png)
 
al construir aplicaciones web con React, te encontrarás con la necesidad de manejar el estado de tu aplicación, ya sea de forma local (componentes) o global (única fuente de la verdad). Si bien podrías administrarlo con las distintas formas que React te ofrece (useState, setState, ContextAPI, etc) con el tiempo se volvería un poco tedioso tener que recordar las decisiones arquitectónicas que tomaste en cada componente para manejar el estado de tu app.

Redux ya te ofrece una arquitectura para manejar el estado de tu app, basada en Flux, sin embargo entrar a esto sin tomar el tiempo para comprender como funciona realmente, es decir, los fundamentos, será sumamente dolorosa la curva de aprendizaje para incorporar Redux en tus proyectos.

En este post, trataré de trasmitirte de la mejor manera algunos de esos conceptos para que sean fáciles de comprender para ti. Algunos términos los dejaré en ingles porque es mejor quedarse en una misma nomenclatura y evitar confundirnos en sus traducciones.

## State Management — Manejo del Estado


Podríamos decir que el manejo del estado de un aplicación común está conformado por:

* **State (estado) :** Unica fuente de verdad

* **View (vista):** Una declarativa (como deseo que se vea) descripción de la UI, basada en tu state actual.

* **Actions:** Son los distintos eventos que suceden cuando el usuario realiza una acción en nuestra aplicación, por ende actualiza nuestro estado y nuestras vistas se actualizan también.

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

Localmente esta solución pareciera funcionar, pero ¿Qué sucede cuando necesitamos propagar esos cambios del estado a distintas parte de nuestra aplicación? Pasando props de componentes padres a componentes hijos, pudiera ser una solución, la cual no la veo muy eficiente, más cuando son componentes sumamente anidados. 

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


¿Qué pasa con componentes que están en distintas partes de nuestra aplicación? Ya nuestra solución local no podría solventarla.

Una manera de solucionar esto es centralizando nuestro estado y permitiendo que los componentes tomen las piezas que necesitan para mostrar en la UI, o actualizar el estado. Esto nos permite tener un código más estructurado y mantenible, independencia entre **views** y **states**.

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

Esto vendría siendo lo básico detrás Redux, tener un punto centralizado de nuestro estado, un patrón definido para actualizar nuestro estado, haciendo nuestro código más predecible, de manera que cualquier desarrollador que entre al proyecto pueda entender de que se trata y poder integrarse fácilmente.
Adding Scopes to Laravel Scout Queries
Tags: laravel
Published: 2021-07-16 19:12:49

---
title: Adding Scopes to Laravel Scout Queries
published: true
date: 2021-07-16 19:09:12 UTC
tags: laravel
canonical_url: https://adithya.dev/adding-scopes-to-laravel-scout-queries/
---

I included a new section for [four day work week jobs](https://arbeitnow.com/four-day-week-jobs) and when building the logic for that, I wanted to make use of scopes that are present in the eloquent model. I use [Laravel Scout](https://laravel.com/docs/master/scout) to offload some of the work.

Scope `scopeIsPublished` has an easy boolean check against the database like this:

```
<?php

//model definition

 public function scopeIsPublished($query)
 {
   return $query->where('is_published', true);
 }
```

With Scout, I wanted to include this when a user searches for a job. So naturally, this was what I ended up with.

```
<?php

//logic
$query = Jobs::search('search text')
            ->onlyPublished()
			->otherConditions();
           
```

I was surprised when the results were unfiltered so I looked a little into the support for scopes in Laravel Scout. On the model instance, ScoutBuilder exposes a handy callback for `query` so you can use it like this.

```
<?php

//logic
$query = Jobs::search('search text')
            ->query(function ($query){
                return $query->onlyPublished();
            })
			->otherConditions();
           
```

This helped get the expected results and should work with all providers Algolia, Elasticsearch, Meilisearch, etc.
The Organization Behind Chaos Engineering w/ Matt Fornaciari of Gremlin
Tags: chaosengineering, engineering, organization, implementation
Published: 2021-07-16 18:57:17

Is Chaos Engineering really chaos? Or is there a method to the madness?

On this week's episode of [Dev Interrupted](https://devinterrupted.com/podcast/chaos-engineering/), Matthew Fornaciari, CTO at Gremlin, talks about Chaos Engineering. Matthew details the history of Chaos Engineering, why its name may be a misnomer, and why continuous chaos is a good thing.
#**Listen to the full episode**
{% spotify spotify:episode:2xwZ0IxHB5fvljUEf9EpNi %}

#**Episode Highlights include:**
* What is Chaos Engineering?
* The benefits of Chaos Engineering
* Where Chaos engineering can be implemented within an organization
* Should your organization consider using Chaos Engineering?

{% youtube -O0vjlejc6U %}

#**Join the Dev Interrupted Discord Server**
With over 1200 members, the Dev Interrupted Discord Community is the best place for Engineering Leaders to engage in daily conversation. No sales people allowed. [Join the community >>](https://discord.gg/devinterrupted)
![Join the Dev Interrupted Discord Community!](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/19j3dzgz4r4kzav3w6z8.png)
What was your win this week?
Tags: discuss, weeklyretro
Published: 2021-07-16 18:27:19

---
title: What was your win this week?
published: true
description: Got to all your meetings on time? Started a new project? Fixed a tricky bug?
tags: discuss, weeklyretro
cover_image: https://cl.ly/188e843c2985/download/Image%202019-02-15%20at%202.36.37%20PM.png
---

Hey there!


**Looking back on your week, what was something you're proud of?**

All wins count — big or small 🎉

Examples of 'wins' include:

- Starting a new project
- Fixing a tricky bug
- Getting a vaccine... or whatever else might spark joy ❤️ 

---

Congrats on your wins this week!

![Heart-shaped balloon](https://media.giphy.com/media/26ybw7DGEFk8WhTPO/giphy.gif)
3 way to learn code faster
Tags: motivation, productivity
Published: 2021-07-16 18:14:14

> you can reach 50 to 60 percentage within a week to master something it take high amount of practice

### 1. what is active vs passive learning?
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2bfff00ssldzehv7zn38.png)
Studies show that one need a lot more attention while reading a book than that of watching videos. Reading is slow process which gives you more retention.
> #### Action to be taken:
* learn from docs and write a blog post about the stuff you learn
* make them easy to understand by everyone
* join a community and answer some question if it is already answer then simplify it and vice-versa.

***

### 2. how one should take notes while learning or watching tutorial?
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dlveqsf72h5e8qpmpmgw.png)
Better way to learn is taking notes after listening or watching videos. Taking notes side-by-side lead to less retention.
> #### Action to be taken
* use space repetation mention while learning
* build a small application that can be scalable
* stick with one course don't jump from one place

***

### 3. where to start and stop by code-along tutorial?
![Alt Text](https://previews.123rf.com/images/fotogestoeber/fotogestoeber1409/fotogestoeber140900219/31869987-businessman-has-to-choose-between-wrong-and-right-way.jpg)
code along is easy way to get start to know about unfamiliar thing. If you like it then explain the entire project to yourself then stop code along and start by expanding your project. If you feel struck then google but don't repeat watching the video again and again
> #### Action to be taken
* write a very small ebook with the help of your project and explain it with simple term and make publish it in online store.

***
(Mis)Understanding REST
Tags: rest, api, beginners, learn
Published: 2021-07-16 18:14:02

What a get can do if you don't know what it should do
![What a get can do if you don't know what it should do](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/17ug7k0pmae8ojjmbc04.png)


I have been working in IT industry for three years now, had already built a lot of http apis.

I worked in Java, golang, php while creating the apis but never knew if those were RESTful or not, so I was just thinking what REST actually is? and why we even needed it?

And then I read a few articles and was just getting somewhat understanding of REST. When I read the below article ([Misunderstanding REST](#misunderstanding-rest)), everything was making sense to me but later on I got to know that those were the author's misunderstandings :(. Still it was a good read knowing that I knew nothing as I was nodding to all the misunderstandings.

Though I've got a tiny bit of grasp on what REST is now, I would suggest people reading the following articles, they are fun reads and I'm sure you will learn something or maybe unlearn something as well.

[Misunderstanding REST](https://medium.com/free-code-camp/rest-is-the-new-soap-97ff6c09896d
)<a name="misunderstanding-rest"></a>
> `please read this only if` you can read the next one because this is the one where the author had misunderstanding about REST and I had fallen for it

[Uncovering of Misunderstanding REST](https://phil.tech/2017/rest-confusion-explained/)


Following articles are good read on REST:

- Can read the following for understanding REST and RPC for http apis, really a good article https://www.smashingmagazine.com/2016/09/understanding-rest-and-rpc-for-http-apis/ 


- This article help you create a picture of how to breakdown your use-case and then turning it into a RESTful api
https://www.martinfowler.com/articles/richardsonMaturityModel.html#level3
What's a good online course for Unit Testing in C#?
Tags: csharp, dotnet, testing, help
Published: 2021-07-16 18:10:01

---
title: What's a good online course for Unit Testing in C#?
published: true
description: Please give me recommendations!
tags: ["csharp", "dotnet", "testing", "help"]
//cover_image: https://direct_url_to_image.jpg
---

Hello,

I'm working on trying to get my team to adopt unit testing. I'd like to recommend a course or two that covers the subject pretty exhaustively, including 

* what is a unit test
* what makes a good unit test
* how to write testable code
* how to use a mocking framework

Do you have any good recommendations? 

Please and thank you!
Reminder — All CodeLand Talk Proposals Due by Tuesday, July 20th @ 11:59 PM UTC
Tags: codeland, codenewbie, meta
Published: 2021-07-16 17:52:52

---
title: Reminder — All CodeLand Talk Proposals Due by Tuesday, July 20th @ 11:59 PM UTC 
published: true
description: A check-in for those of you planning to submit a talk to the CodeLand 2021 CFP 
tags: codeland, codenewbie, meta
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2bfpxvdyv50938ie5urb.png
---

### <mark>I’ll keep this reminder short and sweet: the CodeLand 2021 Call-For-Proposals (CFP) closes in just a few days!<mark>

Hosted by DEV and [CodeNewbie](https://community.codenewbie.org), [CodeLand](https://codelandconf.com) is the most welcoming conference for early-career developers and their champions. 

This year, CodeLand will be taking place _virtually_ from September 23-24, 2021 – we’re excited to welcome speakers and attendees from all over the globe. 

If you’ve been considering submitting a talk, now is your chance ⏰



## Read more details on the CodeLand CFP [here](https://community.codenewbie.org/codenewbie/reminder-submit-your-codeland-talk-proposals-by-tuesday-july-20th-163l) by this Tuesday @ 11:59 PM UTC. 

---

## Submit your talk [here](https://cfp.codelandconf.com/events/codeland-2021)

We hope to see a CodeLand 2021 talk proposal from you 🌈