teleren/devto huggingface dataset:
Fundamentos de Python (Parte 1)
Tags: python, beginners, spanish
Published: 2022-10-06 13:38:57

 ## Zen de python

Son principios de desarrollo, fueron creados en 1999.

El Zen puede ser visto dentro de una línea de comando si usamos la instrucción

```python
import this
```

Los principios son:

 1. Bello es mejor que feo.
 2. Explícito es mejor que implícito.
 3. Simple es mejor que complejo.
 4. Complejo es mejor que complicado.
 5. Plano es mejor que anidado.
 6. Espaciado es mejor que denso.
 7. La legibilidad es importante.
 8. Los casos especiales no son lo suficientemente especiales como para romper las reglas, sin embargo, 
 9. La practicidad le gana a la pureza.
 10. Los errores nunca deberían pasar silenciosamente.
 11. A menos que se silencien explícitamente.
 12. Frente a la ambigüedad, evitar la tentación de adivinar.
 13. Debería haber una, y preferiblemente solo una, manera obvia de hacerlo.
 14. A pesar de que esa manera no sea obvia.
 15. Ahora es mejor que nunca. 
 16. A pesar de que nunca es muchas veces mejor que ahora mismo.
 17. Si la implementación es difícil de explicar es una mala idea.
 18. Si la implementación es fácil de explicar, puede que sea una buena idea.
 19. Los namespaces son una gran idea.

## Entorno virtual
Es un contenedor o ambiente de ejecución aislado de python. Permite tener proyectos separados de python y como resultado los modulos y sus versiones se manejan de manera descentralizada.
Para crear un environment podemos usar el comando:

```
python3 -m venv venv
```
En el comando anterior, el segundo venv es el nombre que queremos darle al entorno virtual.
Para ingresar al entorno virtual previamente creado y activarlo, basta con ejecutar el comando (sistemas tipo unix).
```
source venv/bin/activate
```
JavaScript: Module export and import (browser and Node.js runtime)
Tags: javascript, beginners
Published: 2022-10-06 23:31:56

====================================
## Browser runtime
1. Open a HTML file with js modules directly from default browser will throw an error. You need to create a **local server** with VSCode.
2. The script.js file has imported module should have an attribute `type= 'module'` when linking to HTML, the file has exported module doesn't need to be linked to HTML.
3. To export several functions, `export {func1, func2...}` or add `export` before declare the function
4. To import a function `func` and rename it to `newfunc`, `import {func as newfunc} from 'path'`
5. To export a function as default, use `export {func as default}` or simply `export default func` 
6. To import a default value, `import importfunc from path` works the same with `import { default as importedResources } from 'path'`
7. object-destructuring in import.
[MDN Web Docs on object destructuring](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment)

```
const resources = {
  func1,
  func2
}
export default resources;

import resources from 'path'
const {func1, func2} = resources
```

====================================
## Node.js runtime

1. `module.exports.func1 = func1 ` to export function1. 
2. `const func1 = require('./path')` to import values. For built in module, no need to provide the path.
3. object-destructuring in import:

```
module.exports = {
  func1,
  func2
}

import way 1:
const func = require('path');
const func1Value = func.func1;
const func2Value = func.func2;

import way 2:
const {func1, func2} = require('path')
```
Linux Kernel 5.19.12 Damaging Laptop LCD Screens?
Published: 2022-10-06 23:23:58

I read about this last night while perusing [Hacker News](https://news.ycombinator.com/).

[Here's an Ars Technica article about it](https://arstechnica.com/gadgets/2022/10/linux-5-19-2-kernel-can-flicker-and-damage-screens-on-some-intel-gpu-laptops/)

[And here's this](https://lore.kernel.org/all/YzwooNdMECzuI5+h@intel.com/) from kernel.org

On Linux you can check your Kernel version with ```uname -r```

Be safe y'all. Take care.
Phalcon v5.0.3 Released
Tags: phalcon, phalcon5, release
Published: 2022-10-06 22:51:08

---
title: Phalcon v5.0.3 Released
published: true
date: 2022-10-06 22:43:45 UTC
tags: phalcon,phalcon5,release
canonical_url: 
---

We are happy to announce that Phalcon v5.0.3 has been released!

This release contains a few bug fixes.

Thank you to our wonderful community for the help in identifying these issues.

## Changelog

### Changed

- Fixed `Phalcon\Filter\Sanitize\StringVal` to accept flags for `htmlspecialchars()` [#16135](https://github.com/phalcon/cphalcon/issues/16135)

### Fixed

- Fixed `Phalcon\Html\Escaper::attributes()` to honor the `$flags` set for `htmlspecialchars()` [#16134](https://github.com/phalcon/cphalcon/issues/16134)
Day 631 : Backaddit
Tags: hiphop, code, coding, lifelongdev
Published: 2022-10-06 22:13:41

_liner notes_:
- Professional : Had a couple of meetings today, but it was all about knocking some of these projects out. I got one wrapped up and tested it to make sure it works. For another project, I got the code for the Web Components into a new GitHub repo and added some documentation. I published one of the Web Components but it wasn't showing up in a CDN. I think it may be due to the GitHub repo being Internal. I sent a message to my manager to see if they can get it set to public and hopefully that will fix the issue with the CDN. I'll check tomorrow.

- Personal : Last night, I did some work on a Web Component for my current side project. Eventhough, I'm thinking I can get a similar effect with using some CSS and not with the library I'm trying to shoehorn in. I think it'll make it a lot easier. Realized that "The Walking Dead" is "backaddit" with new episodes and watched a couple and went to bed.

![A barren land in Uyuni, Bolivia with hexagonal patterns on the ground with mountains in the distance at sunset](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vaxgmvls1j6xhzqtfl9n.png)

Tonight, I want to go through some tracks for the radio show. Maybe work on my side project if I have time. I'll probably have "She Hulk" and "The Walking Dead" on while I work during commercials. I think "Atlanta" also comes on tonight.

Have a great night!

peace piece
Dwane / conshus
https://dwane.io / https://HIPHOPandCODE.com
{% youtube VK_ftGok8As %}
Eliminar todos los procedimientos almacendos con un sentencia SQL Server.
Tags: sql
Published: 2022-10-06 21:43:57

Debemos tener seleccionada la base de datos o usar especificame el comando:

```sql
use nombredatabase;

```
 
```sql
declare @procName varchar(500)

declare cur cursor 



for select [name] from sys.objects where type = 'p'

open cur

fetch next from cur into @procName

while @@fetch_status = 0

begin

    exec('drop procedure ' + @procName)

    fetch next from cur into @procName

end

close cur

deallocate cur

```
Help with a .net core api architecture
Tags: help, api
Published: 2022-10-06 21:05:54

Hi Everyone,

I hope everyone is doing good, today I need some advice to optimize resources to create monolithic API architecture based on .net core and mssql, I got a freelance project from my friend's company and they need to migrate an old nodejs api to API .net core API, this API is going to be used by 40 or 50 users but they want to make it to support at least 100 connections.

basically, this API is going to serve information from 5 different mssql databases to 4 main applications:

1.- Power BI.
2.- Custom-made angular dashboard with reports, charts and stuff.
3.- Custom-made angular intranet.
4.- Excel sheets with dynamic information.

the server provided by my client specs are:

- INTEL Xeon E5-2670 v2 @ 2.50GHz (2 processors)
- Windows server 2012 R2
- 5gb RAM
- 1gb internet connection (probably optical fiber)

this same server is also used as web server with apache to run the angular app's and the databases are located on others differents servers.

thanks in advance, any advice is very appreciated!!.
Knowing Better About Git
Tags: javascript, git, opensource, staticsitegenerator
Published: 2022-10-06 21:03:03

## I love JS projects and also need to get better
I had to pick one project from a list of project. Although I'm practicing Java on my OpenSSG Static Site Generator, I still want to build more Javascript skills. So, I asked a few of Javascript SSG owners. Fortunately, one of them accepted me and I posted an issue right away so that no one else writes the same issue at the same time. 

## Open source setup
I think I should remember this process better for more of future open source contribution. I should fork the repo, and clone it on my local. Then, I need to create a branch to work on. Sometimes, I forgot this process, and I had to copy my working-in-progress in somewhere to reset my master branch and redo the work. 

## Finally understand git fetch! 
This week's biggest learning was `git fetch`. So far I didn't recognize the difference between `git pull` and `git fetch`. And I thought why `git fetch` didn't get anything to my local. I just didn't know what `git fetch` actually is. And I learn that `git fetch` is a very powerful command. I just haven't realized its power because I didn't have to work with many others. It's amazing that I can get any branch from other repo for testing and reviewing. `git pull` is a combination of `git fetch` and `git merge`. That's a lot easy to remember. What a lesson!

## Understanding new code structure and convention
The code structure was easy to understand. But last time I made too much change because of my `prettier` setup on my local. So I tried not to make the same mistake and looked at indentation, semicolons, and linebreaks. It's very cautious steps, but I would feel bad if someone sends me the code that has format changes all over, and I have to find which lines are actually changed. 

## Testing is tedious, but make sure of quality
I don't want to embarrass myself by missing test cases that can be found easily. Testing is tedious work as I need to make sure that all my sanity check passes every time I make a change. Even if it's a small change. It's going to harm my credibility if I forget something that could be found by anybody. Usually mistakes happens right before finalizing the work because a change is very small and I feel very excite to push it as soon as possible. 


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rx7607incok6nu43v4ex.png)*Recently contributor to my OpenSSG had to ask many questions as a result of not updating README*

## Don't forget to update README
Even for my project, I work hard to make a change and forget to update my README and the code that is related to my change such as usage description in my program. Documentation might not be fun work, but it's important. And it's a part of programmer's job forever.
Rollback revision Helm
Published: 2022-10-06 20:52:27

---
title: Rollback revision Helm
published: true
description: Como executar um rollback de uma revisão no helm
tags: 
# cover_image: https://direct_url_to_image.jpg
# Use a ratio of 100:42 for best results.
---

Listando o histório de deploys da release

helm history {release} --namespace {namespace}

Executando o rollback

helm rollback {release} {revision} --namespace {namespace}
Bare minimum setup on VSCode to work on TS/JS projects
Tags: beginners, javascript, typescript, webdev
Published: 2022-10-06 20:43:02

There are plenty of VSCode Extensions on the marketplace but which one is necessary when it comes to working with TS/JS projects?

I'll cover the bare minimum extensions to work on a well-established TS/JS project and some extras which I find very helpful in my day-to-day tasks.

---

## Eslint

When it comes to working with others developers in environments where we need to keep consistent code, we need to have something to make sure everyone is following certain rules and Eslint does exactly this.

To use this extension you need to install Eslint on your project as a development dependency and a configuration file.

```
npm i -D eslint
```

you can find some good examples of configuration files at Eslint [docs](https://eslint.org/docs/latest/user-guide/configuring/configuration-files)

- [Eslint](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint)

## Prettier and EditorConfig

Those two tools work alongside Eslint to help developers format and follow all patterns established.

To use Prettier you need to install it as a developer dependency and create a prettier config file ([docs](https://prettier.io/docs/en/configuration.html))

```
npm i -D prettier
```

and for EditorConfig you will need to create an editorConfig file as well ([docs](https://editorconfig.org/#example-file))

- [Prettier](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode)

- [EditorConfig](https://marketplace.visualstudio.com/items?itemName=EditorConfig.EditorConfig)

---

## Extras

### Package Json Upgrade

This extension is very helpful when you need to easily visualize which package you can upgrade and which versions are available  


![Package upgrade view](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pxe3hygrzwxjk3vy06m1.png)


- [Package Json Upgrade](https://marketplace.visualstudio.com/items?itemName=codeandstuff.package-json-upgrade)

### Dev Containers

Dev containers is very helpful when working with docker containers.

- [Dev Containers](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers)

### Github Copilot

I can't put in a few words how much this is helpful nowadays... if you are not aware of what copilot is please check out some videos on youtube about it.

- [Copilot](https://marketplace.visualstudio.com/items?itemName=GitHub.copilot)
Deploying Rancher Server com o Vagrant
Tags: tutorial, kubernetes, rancher, vagrant
Published: 2022-10-06 20:40:50

As etapas a seguir implantam rapidamente um Rancher Server com um cluster de nó único anexado.

## Atenção
A intenção desse guia é lançar rapidamente um sandbox que você pode usar para conhecer o Rancher. Não se destinam a ambientes de produção. 

## Pré-requisitos
Vagrant: Vagrant é necessário, pois é usado para provisionar a máquina com base no Vagrantfile.

Virtualbox: As máquinas virtuais que o Vagrant provisiona precisam ser provisionadas para o VirtualBox.
Pelo menos 4 GB de RAM livre.

### Observação
O Vagrant exigirá plugins para criar VMs do VirtualBox. Instale-os com os seguintes comandos:

```
vagrant plugin instalar vagrant-vboxmanage
vagrant plugin instalar vagrant-vbguest
```


## Começando
Clone Rancher Quickstart para uma pasta usando 

```
git clone https://github.com/rancher/quickstart
```

Vá para a pasta que contém o Vagrantfile executando

```
cd quickstart/rancher/vagrant
```


### Opcional: edite config.yaml para:

Altere o número de nós e as alocações de memória, se necessário. (node.count, node.cpus, node.memory)
Altere a senha do usuário administrador para fazer login no Rancher. (senha do administrador)
Para iniciar a criação do ambiente execute:

```
vagrant up --provider=virtualbox
```

Quando o provisionamento terminar, acesse https://192.168.56.101 no navegador. O usuário/senha padrão é admin/adminPassword.

Resultado: o Rancher Server e seu cluster Kubernetes estão instalados no VirtualBox.


## Destruindo o Meio Ambiente
Na pasta quickstart/rancher/vagrant execute 

```
vagrant destroy -f.
```

Aguarde a confirmação de que todos os recursos foram destruídos.
Localization Made Easy: Generate 100+ Languages with Single Click in Flutter
Tags: flutter, dart, localization, android
Published: 2022-10-06 20:36:21

Hey developers 👋 I have recently made a package in flutter which makes localization in flutter very easy. It can generate localization in 100+ languages with just a single command. It basically extracts strings from the project and uses google translate to achieve this. If interested you can check out the package on pub dev or I have made a detailed video as well.

{% youtube FMbS-X65fpY %}

YouTube: https://www.youtube.com/watch?v=FMbS-X65fpY
Package: https://pub.dev/packages/very_easy_localization
Github: https://github.com/YashMakan/very_easy_localization

If you have any doubts, suggestions then do let me know & it'll make my day if you can star the repo and subscribe to my channel. Hoping to see you on the other side... 😁
Day 9/100: finding the eye of the hurricane
Tags: webdev, devjournal, 100daysofcode, react
Published: 2022-10-06 20:30:44

The last 2 days have been extremely hectic everywhere else than on the pc, yet I still type on. 

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

I have been busy reading up on React and editing a bunch of my react components both structurally and stylistically. My research led me down a rabbit hole, one of which I feel will make my site MUCH more aesthetically pleasing. I'm genuinely excited. 

PS. I'm becoming a CSS master

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

PSS. Sorry for today's short passage. I'm literally running on coffee fumes.
Who has an website idea to build #hacktoberfest
Tags: hacktoberfest, python
Published: 2022-10-06 20:21:48

---
title: Who has an website idea to build #hacktoberfest
tags: hacktoberfest, python
published: true
description: Markata is looking for early adopters to build something with markata and submit it to he project gallery.
cover_image: https://stable-diffusion.waylonwalker.com/000330.2940668004.webp
---

If you are someone who likes building things with python for the web, check out a project I have been slowly building up over the past few years.  Open sourced in March this year.

## Markata

[Markata](https://markata.dev) is a plugins all the way down static site generator for python.  Meaning that you can build a working site from it out of the box, and you can make it your own through configuration.  You can also really make it completely customized to your needs by writing plugins to do what you need it to do.

## Contribute to the project-gallery

Once you have something built, and hosted in the wild, submit it to the [project-gallery](https://markata.dev/project-gallery/).  There are instructions inside [issue#78](https://github.com/WaylonWalker/markata/issues/78).


## The Blog Starter
_want to see an example check out the [starter](https://blog-starter.markata.dev/)_


Throughout this month I have been converting some of my sites over to an official blog [starter](https://blog-starter.markata.dev/) that uses all of the best features for a blog out of the box.  It includes a variety of pages that are general instructions about how to configure the various plugins.  These serve as great examples of how to use it, especially while the docs are a bit of a work in progress.

## Don't want to host an example?

If you don't have anything that you want to host in public I would still appreciate anyone to try to make a project with it and leave feedback.  If you run into any issues submit a small pr to either the project or the starter template.  If you have a larger issue, please raise an issue and discuss it before putting tons of work into it.

## Site Ideas

Markata is setup to build about anything you can imagine on the web that can be statically compiled and hosted.  Please make something that you want for yourself.  Something that is all yours, and brings you joy.  If you are struggling with ideas here are a few.

* [gh projet portfolio](https://github.com/WaylonWalker/markata-gh) - This is a starter repo.
* [markata-starter-blog](https://github.com/WaylonWalker/markata-blog-starter)
* wiki
* docs
* Journal
* Tils
* Linktree
* [Todo](https://github.com/WaylonWalker/markata-todo)
* [Slides](https://github.com/WaylonWalker/markata-slides)
* Image Gallery - ex: [my stable diffusions](https://stable-diffusion.waylonwalker.com/)
* Re-host your tweets / social posts

## What do you think?

I'd love to hear your thoughts down below.  Check out the [starter](https://blog-starter.markata.dev/) and tell me what you think.
OSD600 Lab 4
Tags: opensource, go, beginners
Published: 2022-10-06 20:20:55

## The Repo I worked On
This week I worked with [devils2ndself](https://github.com/devils2ndself) again, this time on his SSG project which was created using Go. This was my first time working with source code written in Go, but it was relatively simple with my prior knowledge of C++. I forked and created a new branch to make my changes to. Then, when I completed my changes I created a pull request ([#13](https://github.com/devils2ndself/SSGo/pull/13)) and asked the owner to review my code and shortly after my changed were merged  ([de7d8773](https://github.com/devils2ndself/SSGo/commit/de7d8773d63dd99488f746eb6be5f38cc5231278)). 

## What I Added
I added a feature which allows the application to accept a `.json` configuration file that contains options that were previously only provided through command-line arguments. I had to do a bit of Googling to figure out how to work with `.json` files in Go, but it turned out to be quite straightforward using some of Go's built-in standard library methods. I also had to change the help text and the command-line argument parsing to accommodate for a new option. 

## Difficulties I encountered
My IDE would automatically correct formatting issues upon saving a file, but since I was working with another person's repo I wanted to make as few changes as possible. How I got around it was by only staging the changes necessary to implement the feature I was adding. This way, I could maintain the formatting that was in the original source code. However, I accidentally discarded some of the changes that I made in this process. I had to manually make those lost changes again, which was inconvenient for me. In the future, I will be more careful when I am staging and discarding changes.
Chrome debugger doesn't show variable values on mouse over
Published: 2022-10-06 20:16:35

I created a simple react app by using "npx create-react-app my-app --template typescript" command. When I start the app "npm start" it is running with no issues but I'm not able to see the values in the Chrome dev tools if I add a breakpoint in the code. Am I missing any dependency or this is the way it's supposed to work for the react app?

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ce540w0e21j2ed8u2clw.png)
Free Domain Promotions I’ve Discovered Recently That Don’t Suck
Tags: beginners, webdev, tutorial, codenewbie
Published: 2022-10-06 20:07:45

###### Photo by <a href="https://unsplash.com/@firsara?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText">Fabian Irsara</a> on <a href="https://unsplash.com/s/photos/website?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText">Unsplash</a>

---

## Introduction
Let's cut to the chase. Here's a collection of free domains I've found across the internet recently. If you've found any other offers, add them in the comments to help somebody out!

_Whilst these promotions are truly 100% free (sometimes you'll be temporarily charged $1/£1 to verify your card), they are almost always **free for just one year**. Either way, free is free, and you're not obliged to renew your domain at the end of the 1 year. Make sure you turn off auto-renew on all of your domains, and delete your payment method if you so please._

❗I earn NOTHING from these links. No commission, nada.

---

## Porkbun.com
Free for 1 year. 1 free domain (total) per account.
**.design**: https://porkbun.com/event/freedesigndomain
**.dev and .app**: https://porkbun.com/event/freeappdevdomain

---

## Names.co.uk
Free for 1 year. **3** free domains (total) per account!
**.uk, .co.uk, and .org.uk**: https://www.names.co.uk/

---

## GitHub Student Developer Pack
#### ⚠️**(STUDENTS ONLY)**
#### Name.com
Free for 1 year. 1 free domain (total) per account.
**.live, .studio, & more**: https://www.name.com/partner/github-students

#### Namecheap.com
Free for 1 year. 1 free domain (total) per account.
**.me**: https://nc.me/

#### Get.tech
Free for 1 year. 1 free domain (total) per account.
**.tech**: https://get.tech/github-student-developer-pack

---

I hope these come in handy for you! 😊 If I find any more I will add them in the future.