teleren/devto huggingface dataset:
Instalación de Docker en Ubuntu
Published: 2021-05-10 20:46:48

## ¿Cuales son las alternativas?
- **Docker Desktop**: Una herramienta que permite manejar Docker y los contenedores de manera fácil, solo funciona en Windows y Mac.
- **Docker Engine**: Esta pensado para usarse en servidores Linux, sin embargo, se puede usar en un computador local. Solo para Linux.
- **Play with Docker**: Plataforma web, permite correr Docker sin instalar nada, a través de una interfaz Web.

## Instalación:
- En Windows y Mac, esta docker Desktop, se descarga el instalador y siguen los pasos que da el mismo programa.

- En Linux corresponde Docker Engine, a como es en este caso. 

## Instalación con Ubuntu:
**Requerimientos**: Tener una versión de Ubuntu entre la 16.04 y la 20.10. Otra dato muy importante, es que se necesita Ubuntu 64-bits.

Por ser un sistema operativo Linux, corresponde Docker Engine. En el caso que se tenga una versión vieja de Docker, se debe remover, eso se hace copiando el código de abajo en la terminal:sigue la instalación de Docker Engine para Ubuntu.
```bash
sudo apt-get remove docker docker-engine docker.io containerd runc
```

Ya hecho lo anterior (si no se tuvo que hacer lo anterior, se comienza desde acá), se actualizan los repositorios:
```bash
sudo apt-get update
```

Actualizado los repositorios, se instalan estas dependencias que necesita Docker para funcionar. Puede pedir contraseña del dispositivo para acceder como Super-usuario y cuando pida que se elija entre Y/N, escriban "Y", significa "Yes":

```
sudo apt-get install \
    apt-transport-https \
    ca-certificates \
    curl \
    gnupg-agent \
    software-properties-common
```

A continuación, se descarga la llave GPG, esta llave su mayor utilidad es permitir bajar los repositorios y paquetes que se van a utilizar al instalar Docker:
```
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
```
Una vez agregada la llave, es verificar que haya sido instalado de manera completa:
```
sudo apt-key fingerprint 0EBFCD88
```
Procedemos a la instalación del repositorio de Docker, en este caso el de Ubuntu, es solo copiar los comandos, a la hora de copiar los comandos automáticamente se actualizan los otros paquetes del sistema:
```
sudo add-apt-repository \
   "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
   $(lsb_release -cs) \
   stable"
```
Instalando el Docker Engine como tal, aprovechando que se tienen todas las dependencias y repositorios listos, el primer comando para actualizar los paquetes y el segundo para instalar no solo Docker, también otras dependencias, son 85mb:
```
sudo apt-get update
```
```
sudo apt-get install docker-ce docker-ce-cli containerd.io
```
El siguiente paso seria descargar una versión especifica de Docker, en el caso del curso, no es necesario. Sin embargo, si es necesario verificar que el Docker Engine esté instalado:
```
sudo docker run hello-world
```
Si en la salida se ve "Hello from Docker!", ¡Yeah!, la instalación de Docker en Ubuntu a sido terminada.
Reason to learn docker as a web developer
Tags: docker, webdev, webperf, devops
Published: 2021-05-10 20:30:30

Reason to learn docker as a web developer

# Portability

You can create a docker image with the files and the configurations, share it in the docker hub and then share it so that you have the same infrastructure is the same.

Even in terms of the developer environment for the local testing and also in deploying it on the different cloud platform.

# Reusability

Similar to being portable they can be configured for the future projects. You can have a very general Virtual Host for the deployment of the websites you can set certain flags and switches for the deployment.

# Better understanding of the infrastructure
MERN stack, WAMP stack and a lot of the other Infrastructure for the projects in windows will be un understood as we have an GUI as way to communicate with the system but while developing the Dockerfile you can learn a lot about the file system of the stack basically you can use ubuntu for the development locally and testing it locally but you can get the actual knowledge about the software/technology file system through docker only.

# Backups

In docker we can have different mount points in the container and endpoints can be defined in the Dockerfile,which is certain file system entry points where the files live in the host system and also in the volumized containers. (you will learn these exclusively in the docker compose).

you can copy and detach those mount points and put them from one container to another container.

You can copy a file to the `WORKDIR` mentioned by the user and then use it as a mount point and then detach and use it as folder in the other container.

docker volumes comes after the docker compose thus make sure that you are following me for the updates.

and obviously for
# Isolation

Isolation in web development is very important for example shared hosting, a lot of the projects have a shared hosting sometimes a project might require a different version of the software dependency, with the docker image you are isolated to that container that you are using thus you can change the image as required by you and you can deploy it later.(lets say JDK version ,alpine version and so on).


Thank you all.
404 page redirecting using .htaccess
Tags: php
Published: 2021-05-10 20:26:06

Using .htaccess to redirect user to 404 page when ever an invalid url is enter.

<br>

To do this is very simple Follow the steps below.

<br>

<li>On the file manager open Public_html folder.</li>

<br>

<li> locate .htaccess file and open it for editing </li>
<br>

<li> add this code to the htaccess file code (add at the bottom of the code)</li>

<code>
ErrorDocument 404 /404.php
</code>
The code should look like this
<code>
# HTID:15003771: DO NOT REMOVE OR MODIFY THIS LINE AND THE LINES BELOW
php_value display_errors 1
# DO NOT REMOVE OR MODIFY THIS LINE AND THE LINES ABOVE HTID:15003771:
ErrorDocument 404 /404.php
</code>

Note: to add redirect to 404 page on each folder, you have to add .htaccess to each folder.
OCAPI-Proxy v2.1.0
Tags: salesforce, javascript, node, programming
Published: 2021-05-10 19:56:08

**OCAPI-Proxy v2.1.0** 

* UI Fixes - Method and Headers now available to set.
* Updated Optional UI - no auto spawn browser instance.
* CORS support

https://www.npmjs.com/package/ocapi-proxy

*Description:*

This proxy server originally started as a web to test proxied calls to an SFCC instance. I have decided to enhance this by coupling small UI to help with testing. If you are using Proxy in production please feel free to contact me on its usages or suggestions and upgrades.

*Base Features include:*

* Proxying calls to an SFCC interface.
* Auto generation of default config file on installation.
* Configuration of Proxy(8080) and UI(80) ports defaulting.
* Google Analytic tagging by config.json.
* Logging now happens in logs subdirectory.
* Sample Postman Suite(more samples to follow) 

https://www.npmjs.com/package/ocapi-proxy
https://github.com/johnfacey/ocapi-proxy
Postman – Logging in results in losing my offline work
Tags: general, dataloss, postman, recover
Published: 2021-05-10 20:15:33

---
title: Postman – Logging in results in losing my offline work
published: true
date: 2021-05-10 19:04:25 UTC
tags: General,dataloss,Postman,recover
canonical_url: https://veducate.co.uk/postman-lost-offline-work/?utm_source=rss&utm_medium=rss&utm_campaign=postman-lost-offline-work
---

###### The Issue

When working with [Postman](https://www.postman.com/) in an offline mode or not signed in, then choosing to sign in, you lose access to your Collections and Environments you have worked on previously.

###### The Cause

In later versions, Postman introduce the [Scratchpad](https://www.postman.com/downloads/release-notes/). This is an offline area where your data is saved to.

When you create a new account in the app, you should be presented an option to move your data from your scratchpad.

If you already have an account to log into, you do not seem to get this option.

###### The Fix

- Within Postman application > Click the Settings Cog > Select “Scratch Pad”

[![Postman - Scratch Pad](https://i1.wp.com/veducate.co.uk/wp-content/uploads/2021/05/Postman-Scratch-Pad.jpg?resize=185%2C214&ssl=1)](https://i1.wp.com/veducate.co.uk/wp-content/uploads/2021/05/Postman-Scratch-Pad.jpg?ssl=1)

So now you should be able to see your offline data. If you can, you need to manually export your data then change back to your workspace and import the data.

[![Postman - export collection](https://i2.wp.com/veducate.co.uk/wp-content/uploads/2021/05/Postman-export-collection.jpg?resize=604%2C623&ssl=1)](https://i2.wp.com/veducate.co.uk/wp-content/uploads/2021/05/Postman-export-collection.jpg?ssl=1)

If you are still unable to find your data. I recommend you [follow this article](https://support.postman.com/hc/en-us/articles/360035071313-I-lost-all-my-data-how-to-recover-it-) from the Postman support site on “how to recover my data”. I did not personally have much success with this method.

Regards

[Follow @Saintdle](https://twitter.com/saintdle)<script async="" src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>

[Dean Lewis](https://uk.linkedin.com/in/saintdle?trk=profile-badge)

The post [Postman – Logging in results in losing my offline work](https://veducate.co.uk/postman-lost-offline-work/) appeared first on [vEducate.co.uk](https://veducate.co.uk).
How to use Tailwind CSS with Laravel
Tags: laravel, tailwindcss, php, javascript
Published: 2021-05-10 18:57:37

Tailwind is a modern CSS framework. It is a utility-first-based framework and provides you with a unique set of utility classes which makes the development process very easy and results in making a unique design. Utility-first CSS is fast, robust, and very efficient making your coding hassle-free. Tailwind CSS is also not opinionated; it means you are totally free to customize the design lament and website’s component.

Tailwind is a power pack of everything you need to create a website without writing any custom CSS.

Laravel is a complete framework for application development. It is an open-source PHP framework in which development is robust and easy. Most importantly it is easy to maintain the quality of code while using Tailwind CSS with Laravel when compared to custom CSS.

Installing the Tailwind framework is not simple as installing a bootstrap framework, it requires a little bit of configuration long with laravel Mix.

In this blog, We will learn how we can install a tailwind framework inside our laravel project.

https://techvblogs.com/blog/tailwind-css-with-laravel
How to Remove Elegant Theme and WordPress Branding from the footer section of Extra Theme
Tags: howto, opensource, web, eleganttheme
Published: 2021-08-14 10:34:41

---
title: How to Remove Elegant Theme and WordPress Branding from the footer section of Extra Theme
published: true
date: 2021-05-10 18:38:00 UTC
tags: HowTo,opensource,Web,eleganttheme
canonical_url: https://fossnaija.com/remove-extra-theme-branding/?utm_source=rss&utm_medium=rss&utm_campaign=remove-extra-theme-branding
---

Extra Theme is a very beautiful and high customisation theme from Elegant theme (The makers of the popular ). In this video, I will be showing you how to remove the Elegant Theme and WordPress branding from Extra theme. This is usually found in the footer section of the extra theme. This is done with simple JavaScript [code](https://fossnaija.com/open-source-really-matter-control-not-code/)integration.

ENJOY!!!


{% youtube LMoOuQ9ZHZU %}

LIKE, SHARE and SUBSCRIBE!!!

**Happy Linux'NG!**

TWITTER: [https://twitter.com/fossnaija](https://www.youtube.com/redirect?event=video_description&redir_token=QUFFLUhqbXdTZDJ3bWVCVkFaeFR6M09BeWpCdm5zdXluQXxBQ3Jtc0tsTHY1czdNZVRjaUZkN1JjMkxMajVNT0ZxV0JxSmktMHkyNXBzU09hclR5RVNaUXVVLS1yVzB4RGNjcktnR3p4QUlPVmhNMjdZaXJGQ3JRTk45dGZ3NGZHaHdOT0d4bjAxdWNVZGJtVldDSmtRNWU1Yw&q=https%3A%2F%2Ftwitter.com%2Ffossnaija)​

INSTAGRAM: [https://instagram.com/fossnaija](https://www.youtube.com/redirect?event=video_description&redir_token=QUFFLUhqbDZ1VXQ2Tk54M2lnUEFVUnVZckJPWlZ2R0tXUXxBQ3Jtc0tuZEJHTkwxS0MwUzRrYWFOVTF4aGRaNTBEYjVJZXRvaDJXUDBEVWtUMTM5dkxpTWxRYW0wRVh0M2FJSlZpZk92SUFJYlFRV2hrQUJSamFwdUFiUDZGRjRSNDhzTzZmRjhoQjFQeXhHMnJpdjQtRXg3TQ&q=https%3A%2F%2Finstagram.com%2Ffossnaija)

The post [How to Remove Elegant Theme and WordPress Branding from the footer section of Extra Theme](https://fossnaija.com/remove-extra-theme-branding/) appeared first on [Foss Naija](https://fossnaija.com).
Awesome MongoDB .
Published: 2021-05-10 18:27:29

MongoDB is an open-source document based database and leading NoSQL database. It is written in C++.
MongoDB uses JSON-like documents with optional schemas.
 
**_some frequently used MongoDB commands:-_**


> db.createCollection("testcc")
> db.testcc.drop()

> show collections
> db.student.find()

> use test
> db.dropDatabase()

> Date()
> db.student.find().pretty()
Bash scripting tips
Published: 2021-05-10 18:13:46


## Naming convention

This is only a recommendation, it doesn't really set the type of the variable, rather than a best practice to easily recognize variables scope.

<table><thead><tr><th>Type</th><th>Scope</th><th>Convention</th></tr></thead><tbody><tr><td>Environment</td><td>Global</td><td>MY_VARIABLE</td></tr><tr><td>Global</td><td>Global</td><td>_MY_VARIABLE</td></tr><tr><td>Local</td><td>Function</td><td>my_variable</td></tr></tbody></table>

### Environment variables

Available from anywhere in your code, including sub-processes and background-processes. Environment variables that were declared in a sub-process or a background-process are out of the scope of the main process.

#### sub-process

```bash
#!/bin/usr/env bash
export MAIN_VAR="MAIN_VAR value"
echo "main-process BEFORE - MAIN_VAR        = $MAIN_VAR"

# sub-process
bash -c '
export                      SUB_PROCESS_VAR="SUB_PROCESS_VAR value"
echo "sub-process         - SUB_PROCESS_VAR = $SUB_PROCESS_VAR"
echo "sub-process  BEFORE - MAIN_VAR        = $MAIN_VAR"
export                      MAIN_VAR="MAIN_VAR changed value"
echo "sub-process  AFTER  - MAIN_VAR        = $MAIN_VAR"
'

echo "main-process AFTER  - MAIN_VAR        = $MAIN_VAR"
echo "main-process        - SUB_PROCESS_VAR = $SUB_PROCESS_VAR"
```

Output
```bash
main-process BEFORE - MAIN_VAR        = MAIN_VAR value
sub-process         - SUB_PROCESS_VAR = SUB_PROCESS_VAR value
sub-process  BEFORE - MAIN_VAR        = MAIN_VAR value
sub-process  AFTER  - MAIN_VAR        = MAIN_VAR changed value
main-process AFTER  - MAIN_VAR        = MAIN_VAR value
main-process        - SUB_PROCESS_VAR =
```

#### background-process

```bash
#!/bin/usr/env bash
export MAIN_VAR="MAIN_VAR value"
echo "main-process BEFORE - MAIN_VAR       = $MAIN_VAR"

# background-process
export BG_PROCESS_VAR="BG_PROCESS_VAR value" && \
echo "bg-process          - BG_PROCESS_VAR = $BG_PROCESS_VAR" && \
echo "bg-process   BEFORE - MAIN_VAR       = $MAIN_VAR" && \
export MAIN_VAR="MAIN_VAR changed value" && \
echo "bg-process   AFTER  - MAIN_VAR       = $MAIN_VAR" \
& # set bg process

# Wait for bg processes (jobs) to complete
# Otherwise, the following lines won't be executed
wait

echo "main-process AFTER  - MAIN_VAR       = $MAIN_VAR"
echo "main-process        - BG_PROCESS_VAR = $BG_PROCESS_VAR"
```

Output

```bash
main-process BEFORE - MAIN_VAR       = MAIN_VAR value
bg-process          - BG_PROCESS_VAR = BG_PROCESS_VAR value
bg-process   BEFORE - MAIN_VAR       = MAIN_VAR value
bg-process   AFTER  - MAIN_VAR       = MAIN_VAR changed value
main-process AFTER  - MAIN_VAR       = MAIN_VAR value
main-process        - BG_PROCESS_VAR =
```
Antivirus and their function.
Tags: security, cybersecurity
Published: 2021-05-10 18:12:53

 

Antivirus software scans program using selected chunk of data from its database. If it gets a code that resembles to that of a malware stored in its database then that code is flagged as malware. Now this is either isolated or deleted
The detecting based anti-virus applications dominate the security industry over time. But due to rise in cybercrimes and criminal activities across the internet, these applications have not been very effective against the dangers. In the current times hackers are well equipped with efficient analysis workstations and penetration applications to check whether new malware software’s are being detected or not. 
![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/d7ymuejauxziw1grcm72.png)
 
 
Features of Antivirus Software
Background Scanning – the anti-virus scans the applications which are present in system, when they are opened in their backend state. This process is called an on-access scanning.  This assures that the system is safe from all sought of malware attacks
![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/h39hzsupkc4xs517c0a3.png)
 
 
 Complete System Scans. these scans are not much needed if there is on hand access feature on the system.it is well used if the anti-virus is installed for the first time or the security of the system is not updated for long time .this is implemented to ensure that there are no malware hiding in the most difficult locations and deep behind the codes of the system. Full framework scans are vital to scan your contaminated system
![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/78y76o29cozbm9dufi0s.png)
 
 
Virus Definitions - Antivirus software codes are based on the definitions to differentiate a virus from a genuine file and a malware. This the vital step to check on new virus definitions. The virus definitions clears of the of the marks of any codes which are considered as hazard in the system code.in the scenario of virus definition finds a file with marks of malware that matches accordingly, then that file is immediately terminated from execution and is isolated. The antivirus software runs through the malware, analyses it, and sends to lab to find out the origin and purpose of the malware in the system
React Without JSX
Tags: react, javascript, tutorial, beginners
Published: 2021-05-10 18:11:16

**JSX is not a requirement for React.** Using React without JSX is especially convenient when you don't want to set up compilation in your build environment.

This tutorial will show you how to use React without JSX. It will also show you how code written in JSX is converted to plain JavaScript.

---

# What is JSX?
Consider the following variable decleration:
```jsx
const element = <h1>Hello, world!</h1>;
```

This strange tag syntax is neither a string nor HTML.

It is called JSX, and it is a syntax extension to JavaScript. It is commonly used with React to describe what the UI should look like. JSX may remind you of a template language, but it comes with the full power of JavaScript.

---

# Converting to JavaScript
Each JSX element is actually syntactic sugar for calling the `React.createElement()` method. This means that any code that is written in JSX can also be written in plain JavaScript.

For example, this code is written in JSX:
```jsx
class Hello extends React.Component {
  render() {
    return <h1>Hello, {this.props.toWhat}!</h1>;
  }
}

ReactDOM.render(
  <Hello toWhat="world" />,
  document.getElementById("root")
);
```

It can be compiled to this code that doesn't use JSX:
```javascript
class Hello extends React.Component {
  render() {
    return React.createElement("h1", null, `Hello, ${this.props.toWhat}!`);
  }
}

ReactDOM.render(
  React.createElement(Hello, { toWhat: "world" }, null),
  document.getElementById("root")
);
```

This happens because the JSX code is converted to JavaScript using the package [Babel](https://babeljs.io/) during compilation. If you're curious to see more examples of how this works, you can try out [Babel's online compiler](https://babeljs.io/repl/).

---

# Shorthands
If you get tired of typing `React.createElement` so much, one common pattern is to assign a shorthand:
```javascript
const e = React.createElement;

ReactDOM.render(
  e("h1", null, "Hello, world!"),
  document.getElementById("root")
);
```

If you use this shorthand form for `React.createElement`, it can be almost as convenient to use React without JSX.
WAO: How do you release software?
Tags: watercooler, discuss, wronganswersonly
Published: 2021-05-10 18:00:47

_Cover photo by [Michal Matlon](https://unsplash.com/@michalmatlon?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText) on [Unsplash](https://unsplash.com/s/photos/wrong-answer?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText)_
 
---

# Wrong Answers Only

How do you release/deploy/package your software product (or service)?

---

Comment your wrong answer!
Code sites to challenge your skills
Tags: codechallnge
Published: 2021-05-10 17:56:48

Last Time I wrote about Place for free Code tutorials, today I have an unsorted list of code challenge sites.

<h2>Exercism</h2>
[Exercism.io](https://exercism.io/) I was introduced to exercism at a local developer meet up, remember those? We would just split into some groups work on some exercises and then had group discussions on them. I recently picked back up on Exercism because VirtualCoffee group began doing channel with biweekly challenges.
Exercism gives you a problem and some tests. Your challenge is  to write the code to pass the test. Once the code passes the test, you uncomment the next one and continue till you solve them all.
Exercism has challenges in several language tracks. Once you solve an exercise you unlock another. They now have online mentors that will review your solutions. I just started using this feature. The mentors supplied some good tips to refactor the code and make the solutions more concise. The comments included links to documentation. I read the docs, made changes and improved my answers.

<h2>CodeWars</h2>
[Code Wars](https://www.codewars.com/) tests your skills with various challenges of increasing levels of difficulty. You can view other users solutions and chat with them. Users can earn badges. There's gamification and a dark mode option.

<h2>Hackerrank</h2>
[hacker rank](https://www.hackerrank.com/) is used by many employers to test candidates. It's good to familiarize yourself with the platform in case you have Code Challenge here. 
They have a series of tests called the HackerRank Interview Preparation Kit. It goes over topics that companies test the most. They even state what percentage of companies test a particular topic.


<h2>Other Code Challenge Sites</h2>
There are many other code challenge sites but for this post I just wanted to list some I have used personally. I didn't want to just list a bunch of them. Some time in the future I ,ay explore others.
For now go out and explore a code challenge site to exercise your mind and skills.