teleren/devto huggingface dataset:
Basic Setup for Create React App
Tags: react, javascript, tutorial
Published: 2021-11-01 01:59:23

One of the things I find most valuable is a good quick-start guide. This is the guide I put together to get a React app started and pushed to GitHub, using the Bash terminal in VS Code.

- In the terminal, navigate to the folder on your machine where you want to keep the local copy of your repo.
- Use `create-react-app` to create the new application, replacing `<app-name>` for your application's name. Additional documentation is available at [reactjs.org](https://reactjs.org/docs/create-a-new-react-app.html).
```bash
npx create-react-app <app-name>
```
- Once the application has been created, create a `main` branch (current GitHub default and preferred name) and delete the `master` branch (still the current default for `create-react-app`).
```bash
git checkout -b main
git branch -d master
```
- To use `npm` instead of `yarn`, take the following steps:
   - Delete `yarn.lock`
   - Delete `node_modules` folder
   - Reinstall `node_modules` using `npm`
   ```bash
   npm install
   ```
- Clean up the generated `README`, removing application boilerplate and adding any content desired for the first commit.
- Test the basic React setup and enjoy the spinning React logo!
```bash
npm run start
```
![React tab](https://kristenkinnearohlmann.dev/static/b92d2065e814e2ce7844d9ccd4dbf39e/60097/basic-react-app-tab.jpg)
![React logo](https://kristenkinnearohlmann.dev/static/d079ff8df3e69e9b59bd07c7474b954b/acb04/basic-react-app-logo.jpg)
- Commit code locally.
```bash
git add .
git commit -m "Initial commit"
```
- Go to your account on [GitHub](https://github.com/) and create the remote repo:
   - Use the same name used for the app creation
   - Don't choose to add any of the options for initializing the repo to avoid conflicts pushing the local repo; local already has `README` and `.gitignore` from the app creation and the license can be added later
   - Use the instructions from **…or push an existing repository from the command line** to link the local repo to the remote location; example code below, the code generated by GitHub will contain the correct values
   ```bash
   git remote add origin https://github.com/<GitHub user name>/<repo name>.git
   git branch -M main
   git push -u origin main
   ```
- The basic React app is now ready for further development!
Adding TLS to Pi-hole
Tags: pihole, security, adblocking, raspberrypi
Published: 2021-11-01 01:25:33

---
title: Adding TLS to Pi-hole
published: true
description: Updating Pi-hole Admin Interface to support TLS
tags: pihole, security, adblocking, raspberrypi
cover_image: https://wp-cdn.pi-hole.net/wp-content/uploads/2020/08/mug-2018-05-patreon-min-e1597220120301.png
---

[PiHole](https://pi-hole.net/) is a great tool for blocking ads across an entire network. However, the web-based administration panel defaults to connecting to HTTP over port 80. As a network engineer, it has always bothered me that I had to pass a password into the pi-hole I've always had it on my list to update Pi-hole to use HTTPS and I could not find any documentation.

> Disclaimer: configure to meet your own baseline for security standards, the examples given are generic.

### Prerequisites
1. Raspberry Pi
2. Pi-hole installed
3. Backup of your configuration

## Instructions

### 1. Create the SSL Cert:
a. Create the self signed certificate:
```bash
openssl req -new -x509 -keyout pihole.pem -out pihole.pem -days 365 -nodes
```
b. Change permissions to read-only:
```bash
chmod 400 pihole.pem
```
### 2. Configure Lighttpd
a. Create and move cert into Lighttpd:
```bash
sudo mkdir /etc/lighttpd/certs
mv pihole.pem /etc/lighttpd/certs/pihole.pem
```
b. Configure Lighttpd to accept HTTPS requests: `sudo vim /etc/lighttpd/external.conf`

An example configuration would be for my Pi-hole DNS address at `pihole.example.com`:
```bash
$HTTP["host"] == "pihole.example.com" {
  # Ensure the Pi-hole Block Page knows that this is not a blocked domain
  setenv.add-environment = ("fqdn" => "true")

  # Enable the SSL engine with a LE cert, only for this specific host
  $SERVER["socket"] == ":443" {
    ssl.engine = "enable"
    ssl.pemfile = "/etc/lighttpd/certs/pihole.pem" #Location of PEM file.
    ssl.use-sslv2 = "disable"
    ssl.use-sslv3 = "disable"       
  }

  # Redirect HTTP to HTTPS
  $HTTP["scheme"] == "http" {
    $HTTP["host"] =~ ".*" {
      url.redirect = (".*" => "https://%0$0")
    }
  }
}
```

## 3. Restart Lighttpd
a. Run the command `sudo systemctl restart lighttpd` to restart Lighttpd.

## 4. Test the configuration
b. Log into your Pi-hole: `https://pihole.example.com`
IssueOps: Deployment Approvals in GitHub Actions for Private Repositories
Tags: github, actions, codenewbie, devops
Published: 2021-11-01 01:17:22

Do you want to have __deployments approval__ in GitHub Actions, but you are on a Private Repository?

If you are familiar with GitHub Actions Environments, you know that __they are available only on Public Repositories__, or in GitHub Enterprise Cloud. 

In this In this live streaming you will learn how to __get GitHub Actions Approvals with Private Repos__ using a ___different approach___. I'm going to show you how you can have deployment approvals in GitHub Actions even on Private Repositories ___without___ GitHub Enterprise Cloud, thanks to __IssueOps__

I will also answer all your __questions about Deployments in GitHub Actions__. So prepare your questions! And if you can't make it, __post your questions or comments down below__ so I can address them during the live!

{% youtube MDOn9HAS7bQ %}

[Link to the video: https://youtu.be/MDOn9HAS7bQ](https://youtu.be/MDOn9HAS7bQ)

__Like, share and follow me__ 🚀 for more content:

📽 [YouTube](https://www.youtube.com/CoderDave)
☕ [Buy me a coffee](https://buymeacoffee.com/CoderDave)
💖 [Patreon](https://patreon.com/CoderDave)
📧 [Newsletter](https://coderdave.io/newsletter)
🌐 [CoderDave.io Website](https://coderdave.io)
👕 [Merch](https://geni.us/cdmerch)
👦🏻 [Facebook page](https://www.facebook.com/CoderDaveYT)
🐱‍💻 [GitHub](https://github.com/n3wt0n)
👲🏻 [Twitter](https://www.twitter.com/davide.benvegnu)
👴🏻 [LinkedIn](https://www.linkedin.com/in/davidebenvegnu/)
🔉 [Podcast](https://geni.us/cdpodcast)

<a href="https://www.buymeacoffee.com/CoderDave" target="_blank"><img src="https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png" alt="Buy Me A Coffee" style="height: 30px !important; width: 108px !important;" ></a>

{% youtube MDOn9HAS7bQ %}
Third Hacktoberfest Contribution
Tags: opensource, github, java, beginners
Published: 2021-11-01 00:02:27

After accomplished the __first 2 Issues__ I found on __Github__. I tried to find some issues that are __more interesting__. The third issue I found for the __Release 0.2__ was a `Java program`. It's about creating a website that contains a __SUDOKU__ game. 
![Game](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7ahu04q45zpy2ymh0lmf.png)
 

##Issue
For this program, the issue that I interested in was helping the repository owner to add a __Github logo__ on the webpage footer. And it should link to the github repository.[[Issue #9]](https://github.com/stefanoskapa/SudokuBase/issues/9#issuecomment-955651180)
![Issue description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/77pqnz0or33kksk3a2lh.png)

##My Solution
After go through the code of this program. I assumed that this program will reuse its `footer` for many and many times. Therefore, I could just update the code inside the footer they provided to solve this problem.
The file that I updated was `footer.jsp`. And the code I added was ```
            <a href="https://github.com/stefanoskapa/SudokuBase">
            <img src="https://ctl.s6img.com/society6/img/hNqP40bUA0DVJY-drlMuI_MylEc/w_1500/prints/~artwork/s6-original-art-uploads/society6/uploads/misc/8e29a2e79387449caa28090d71f489e3/~~/github-logo-prints.jpg" alt="logo" height="30">
                Github</a> |
```
After I added these few lines of code, every webpages that the program have will have a __Github logo__ on the footer like this :
![Screeshoot](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nwsk5rqb4xmeh71tjrts.png)

##My Feelings
This is an __interesting program__ for me. I like to play __Sudoku__ in my free time. I felt __excited__ to make contribution to a program that I like. Also, this is the first time that I help fix an issue of a `Java` program. It gains me experience of working in a __Java__ program on __Github__!

Link to the Repo I worked on: [[SudokuBase]](https://github.com/stefanoskapa/SudokuBase)
FEATool Multiphysics 1.15 - CFD simulations of non-Newtonian flows
Tags: cfd, openfoam, fluiddynamics, simulation
Published: 2021-11-01 16:30:48

---
title: FEATool Multiphysics 1.15 - CFD simulations of non-Newtonian flows
published: true
date: 2021-11-01 00:00:00 UTC
tags: cfd, openfoam, fluiddynamics, simulation
canonical_url: https://www.featool.com/news/2021/11/01/FEATool-Multiphysics-v1p15-CFD-Simulations-of-non-Newtonian-Fluids.html
---

![FEATool Multiphysics v1.15 - CFD Simulation of Non-Newtonian Flows Made Easy](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ddljkdcr83t2iy61exjg.png)

The easy to use FEATool Multiphysics™ toolbox has now been updated to version 1.15. Major new features of this release include pre-defined physics modes dedicated to simulation of non-Newtonian flows, new and updated mesh generation options, and improved graphics performance for visualization of large 3D models. Simulation of non-Newtonian Flows FEATool 1.15 adds pre-defined equations and a new physics mode for non-Newtonian flows. This allows for easy modeling and simulation of applications with non-linear shear thinning or thickening flow behavior, such as in industrial polymer applications, and biological flows.

Please visit https://www.featool.com for more information and toolbox download.
When to not be agile
Tags: agile, softwaredevelopment
Published: 2021-11-10 11:20:37

---
title: When to not be agile
published: true
date: 2021-11-01 00:00:00 UTC
tags: agile,softwaredevelopment
canonical_url: https://jhall.io/archive/2021/11/01/when-to-not-be-agile/
---

“Agile” is over-used and abused these days. It’s practically assumed that every person, team, and company, _ought_ to strive to be “more Agile”.

But why? What if “Agile” isn’t a good goal for every situation?

Some aspects of the [Manifesto for Agile Software Development](https://agilemanifesto.org/) probably make sense in all situations. I’d be hard pressed to think of a time when we should prioritize processes and tools over individuals and interactions, for example.

But the last of the values, and some of the [principles](https://agilemanifesto.org/principles.html) make certain assumptions about the type of business we’re in, and these assumptions won’t be universally true. The two most poignant examples are:

> [W]e have come to value … Responding to change over following a plan

> Welcome changing requirements, even late in development. Agile processes harness change for the customer’s competitive advantage.

I think this is where the core idea of “agility” comes from: The ability to quickly and effectively respond to changes in requirements.

But what if you’re in a business where you honestly know all the requirements up front? Or where you honestly do _not_ need to respond quickly to change?

What kind of organization would possibly create software under these circumstances?

- Perhaps your business has no competition, so you can safely rest on your laurels.
- Perhaps you work for a project with specs mandated by government regulations.
- Perhaps you’re working on a short-term project that will never be used a second time.

What other examples can you think of where agility, the ability to respond to change in requirements, is unnecessary or even unwanted?

* * *
_If you enjoyed this message, [subscribe](https://jhall.io/daily) to <u>The Daily Commit</u> to get future messages to your inbox._
Negative effects when compiling on M1 Macbook
Tags: macbook, javascript, vue, programming
Published: 2021-10-31 23:55:56

Is it me, or is the new M1 chip causing issues in the developer world?

Yesterday I was working on my Macbook Pro with the new M1 chip and after running `npm run dev` and it compiled successfully, I was getting a ton of errors in the console and my site was broken. So, I did what most of us do and started doing some research online to see if I could get to the bottom of it.

###Let me explain what I was working on...

I recently added a feature to my Saas business that allowed users to generate a Profit & Loss Statement based on filtered criteria for a start and end date. Once their statement was generated they could download it to PDF. This is where the issue began.

To accomplish this, I decided I would use the jsPDF and html2canvas packages. Once I installed these two packages and compiled my code base, I came across this error:

```
ERROR in ./node_modules/canvg/lib/index.es.js 1933:16-23
Module not found: Error: Can't resolve 'process/browser' in '/Users/jringeisen/www/esm/node_modules/canvg/lib'
Did you mean 'browser.js'?
BREAKING CHANGE: The request 'process/browser' failed to resolve only because it was resolved as fully specified
(probably because the origin is strict EcmaScript Module, e. g. a module with javascript mimetype, a '*.mjs' file, or a '*.js' file where the package.json contains '"type": "module"').
The extension in the request is mandatory for it to be fully specified.
Add the extension to the request.
``` 

A quick Google search led me to [here](https://github.com/laravel-mix/laravel-mix/issues/2737). Which suggested that I add the following to my `webpack.mix.js` file:

```
mix.options({
  legacyNodePolyfills: false,
})
```

Once I did that, I recompiled my code and the error was gone, yay! Hold on now, let's not celebrate just yet. I visited my website and in the console was a ton of red error messages and portions of my site were broken. I spent the next 3 hours trying to resolve this issue, with no luck. I decided I would go to bed and try to solve it again in the morning.

###The next morning...

I woke up, made some coffee and sat down at my desk and started to figure out a solution to the problem I was having. The first thing I did was recompiled my code. Success! No error. Ok, then I checked my website. No errors in the console and the website wasn't broken. Hmmmm.... this is when a lightbulb went off in my head and I realized everything is working as expected on my Intel based iMac. I'm only having the above issue on my M1 Macbook Pro. Now to be clear the code is exactly the same on both computers, it was pulled down from Github. Both machines are running the exact same environments and have the exact same Node versions. The only difference is the M1 vs the Intel CPU.

Anyone else having weird issues like this? I still haven't been able to narrow down exactly what's causing this issue. The only thing I can think is it has something to do with the M1 chip. Let me know your thoughts in the comments below.
small-orm for swoft
Tags: php, showdev, swoft, orm
Published: 2021-10-31 23:53:22

I've just release a Swoft 2.x implementation of small-orm. For now it came with a mysql and redis connectors (mongoDb planned).

Optionnaly, it implements crud generator (with small-swoft-auth) and form management (small-orm-forms, oriented to api validation).

Composer packages of the small-orm project :
sebk/small-orm-core
sebk/SmallOrmBundle (Symfony bundle)
sebk/small-orm-swoft
sebk/small-swoft-auth
sebk/small-orm-forms
sebk/swoft-json-response
sebk/swoft-voter
Intro to PostgreSQL
Tags: codenewbie, programming, webdev, database
Published: 2021-10-31 23:33:04

PostgreSQL is open-sourced object-relational database management system that is extremely dynamic and has many different use cases. Postgres, being a object-relational database, stores relationships as tuples.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/d93mxwiozdc7i81an4h1.png)

The object-relational part of Postgres means that Postgres includes features like table inheritance and function overloading.

Think of table inheritance like making a class and then extending all the methods and information from one class to its child classes. Function overloading is creating multiple functions with the same name as long as the arguments are different.

Postgres also supports multiple different languages and can have different languages for different parts of the database. This aspect is great because it widens the amount of people who are able to use the manager as well as will allow people to use the  languages best suited for the job at hand.

The DDL or data definition language of Postgres strongly resembles that of SQL. The common data definitions are Create, Drop, Alter, or Truncate.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1i9x9op5tdf9fnk88k22.png)

CREATE DATABASE Bookshelf;

CREATE TABLE Borrowers (
  id INT PRIMARY KEY,
  first_name VARCHAR(20) not null,
  last_name VARCHAR(50) not null,
  birth_date DATE not null);

ALTER TABLE Borrowers ADD COLUMN years_member INT NOT NULL CHECK years_member > 0;

CREATE TABLE books (
  id INT PRIMARY KEY,
  title VARCHAR(50),
  author VARCHAR(50)
  publication_date DATE not null);

  /* after populating ‘books‘ table */

  TRUNCATE TABLE books;

/* removes all data from ‘books’ table */

The DML or data manipulation language is used to work with our tables. The common DML includes Insert, Update, Delete, or Select.

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

Since Postgres is open-source new features and updates common and documentation is excellent. 

Overall Postgres is a powerful, excellent database manager that enhances traditional SQL.

Source: https://developer.okta.com/blog/2019/07/19/mysql-vs-postgres
Source: https://dev.to/hoverbaum/how-to-add-code-highlighting-to-your-devto-posts-2lp6
Source: https://www.postgresqltutorial.com/
Pumpkins fall! 🎃
Tags: halloween, javascript, html, webdev
Published: 2021-10-31 23:15:01

# Happy Halloween 2021!

I challenged myself and decided to code a tiny project related to Halloween and [Canvas](https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API)!

![screenshot](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0tp83lagbjdeulf8m08w.png)

## Confetti 🎊

I was looking toward a way to get a random particles generator in a canvas, and I came across this great tool [confetti-js](https://github.com/Agezao/confetti-js) which widely inspired this project.

## halloween-2021

Nearly everything stands in the app config:
```javascript
const app = {
    target: 'canvas',
    images: ['./images/bat.png', './images/pumpkin.png', './images/sweet.png'],
    max: 30,
    speed: 3,
    width: window.innerWidth,
    height: window.innerHeight,
    imageMinWidth: 30,
    imageMaxWidth: 100,
}
```

One helpful function:
```javascript
function getRandomInt(min, max) {
    min = Math.ceil(min)
    max = Math.floor(max)
    return Math.floor(Math.random() * (max - min + 1)) + min
}
```

Demo and code (which might be frightening 😱) are available.

Demo: https://0kyn.github.io/halloween-2021/
Sources: https://github.com/0kyn/halloween-2021
WatchIT | New Way to Experience Cinema
Published: 2021-10-31 22:57:10

Blockchain technology has been growing exponentially for the past years. We have different apps for many famous use cases: loans, entities simulation banks, and now NFTs which have brought bring a new platform for art and collectibles, allowing creators to earn more for their work.


However, while traditional cinema and television are moving into the domain of the popular streaming services, this industry is still ripe for innovation and disruption due to its financially centralized nature.

![WatchIT Marketplace Image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/w33j76giyn300v6it6lx.png)

With WatchIT Marketplace, we plan to let creators utilize our toolchain to create, monetize and promote their content. Creators will be able to upload their films, series, documentaries, and even static content like comics. Distributors and collectors alike can buy this content and re-distribute without intermediaries. WatchIT will use the same blockchain and NFT technology to make this innovation happen, much like the financial technologies mentioned above. In addition, connections between creators, distributors, and even viewers will be strengthened and incentivized.

Follow our progress at the following links:
[Website](https://watchitapp.site/)
[Github](https://github.com/ZorrillosDev/watchit-app)
[Previous Post](https://dev.to/geolffreym/watchit-2b88)
How to Install Opera Browser and get FREE VPN on Linux [VIDEO]
Tags: opensource, howto, internet, linux
Published: 2022-02-22 15:14:53

---
title: How to Install Opera Browser and get FREE VPN on Linux [VIDEO]
published: true
date: 2021-10-31 22:30:18 UTC
tags: FOSS,HowTo,Internet,Linux
canonical_url: https://fossnaija.com/install-opera-browser-linux-free-vpn/?utm_source=rss&utm_medium=rss&utm_campaign=install-opera-browser-linux-free-vpn
---

In this video, I would show you how to easily install a very popular cross-platform web browser, Opera, on Linux.

Opera is a multi-platform web browser developed by the software company also called Opera. The Opera is currently built based on the open-source Chromium browser. It gives itself a unique identity that makes it easily attractive and different from other browsers through its user interface and other features like VPN and adblocking.

ENJOY!!!


{% youtube TnK3EVyXaBg %}


#### **READ:** [HOW TO INSTALL APPS USING GDEBI.](https://fossnaija.com/install-gdebi-on-ubuntu-linux/)

#### Happy Linux’NG!

The post [How to Install Opera Browser and get FREE VPN on Linux [VIDEO]](https://fossnaija.com/install-opera-browser-linux-free-vpn/) appeared first on [Foss Naija](https://fossnaija.com).