teleren/devto huggingface dataset:
How to fix node version in a Web-App
Tags: node, javascript, react, npm
Published: 2020-09-30 06:34:52

How we can fix not version so that developer, CI/CD, production, everybody uses the same node version?

# Step 1 — Add nodeVersionLock in package.json

We need to add preinstall and prestart scripts too.
package.json will look like this

```
{
  "name": "metaindex-frontend",
  "nodeVersionLock": "14.13.0",
  "scripts": {
    "preinstall": "node ./system/npm/preinstall.js",
    "prestart": "node ./system/npm/preinstall.js",
    "start": "run-p build:tailwindcss start:watchtailwindcss start:cra",
    "start:cra": "react-scripts start",
   }
}
```

# Step 2 — Throw errors when undesired node-version found.

Content of `./system/npm/preinstall.js`

```
const pkgJson = require('../../package.json');

const nodeVersion = process.versions.node;
let err = false;

if (pkgJson.nodeVersionLock !== nodeVersion) {
  console.error(`Please use node ${pkgJson.nodeVersionLock}. Try
    nvm install v${pkgJson.nodeVersionLock}
    nvm reinstall-packages v${nodeVersion}
    nvm uninstall v${nodeVersion}
  `);
  err = true;
} else {
  console.error(`Thanks for using Latest Node version ${pkgJson.nodeVersionLock}.\n`);
}

if (err) {
  console.error('');
  process.exit(1);
}
```

# Step 3— AutoUpdate of Dockerfile & GitbHub YML

This step is optional and custom. it depends on your setup.

Content of `./system/npm/fix-node-versions.js`

```
const fs = require('fs');
const YAML = require('yamljs');
const replaceFirstLineOfFile = require('file-firstline-replace');
const pkgJson = require('../../package.json');

var filename = 'Dockerfile';
var newHeader = `FROM node:${pkgJson.nodeVersionLock} as builder\n`;
replaceFirstLineOfFile(filename, newHeader, function (error) {
  if (error) {
    throw error;
  }
  console.warn('Dockerfile updated');
});

// Replace in gitlab ci file.

var gitlabCiYml = fs.readFileSync('.github/workflows/node.js.yml', 'utf8');

// parse YAML string
var gitlabCiJSON = YAML.parse(gitlabCiYml);
gitlabCiJSON.jobs.build.strategy.matrix['node-version'][0] = pkgJson.nodeVersionLock;
var spaces = 4;
var gitlabCiYmlUpdated = YAML.stringify(gitlabCiJSON, spaces);

fs.writeFileSync('.github/workflows/node.js.yml', gitlabCiYmlUpdated, 'utf8');
console.warn('github CI file updated');
```
docker-compose and duplicator plugin from WordPress 
Published: 2020-09-30 06:23:41

---
title: docker-compose and duplicator plugin from WordPress 
published: true
description: Simple solution  to get backup or copy files from you duplicator plugin on WordPress working in a docker container. 
tags: 
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/5fqftf720ov4rp3tdedp.png
---


Small video for those that wants to use docker or docker-compose with the Duplicator WordPress plugin, for local theme or plugin development.


I found my self facing the problem  that I was helping a non-profit organization to update their WordPress theme and make small changes in the PHP, CSS code.


And I wanted to host it locally and test my changes, but they have the duplicator plugin installed    and backups files from it.

The issue that I face was that I couldn't link the docker db service to the duplicators host input.

The first thing that I try was to bind my docker db service to my localhost, but there was  just a small issue  with that I have a small project running in the background for my to-dos and other personal things that use MySQL and the port was already in use do my docker-compose
Services didn't want to start because of the same port binding.

I was looking around for a better solution, then I remember that the WordPress service was in the same container as the db service.

So I just pass the service name to the duplicators input and that solve my problem.

But I look around, and I didn't find anything that could help me before, so that is why a make the video.

For the future me, I know that I will find this issue in the future
https://m.youtube.com/watch?feature=youtu.be&v=keOlz9swqds



The docker-compose yml file is the fallowing :

```yml
version: '3'
services:
   db:
     image: mariadb
     ports:
       - "3306:3306"
    #  volumes:
    #    - db_data:/var/lib/mysql
     restart: always
     environment:
       MYSQL_ROOT_PASSWORD: leamsigccom
       MYSQL_DATABASE: wordpress
       MYSQL_USER: leamsigccom
       MYSQL_PASSWORD: leamsigccom
   pma:
    image: phpmyadmin/phpmyadmin
    environment:
      PMA_HOST: db
      PMA_PORT: 3306
      MYSQL_ROOT_PASSWORD: leamsigccom
    ports:
      - 8080:80
    links:
      - db:db
   wordpress:
     depends_on:
       - db
     image: wordpress:latest
     ports:
       - "8000:80"
     restart: always
     volumes:
       - .:/var/www/html/
     environment:
       WORDPRESS_DB_HOST: db:3306
       WORDPRESS_DB_USER: leamsigccom
       WORDPRESS_DB_PASSWORD: leamsigccom
volumes:
  db_data:



```
What GIT GUI client do you use?
Tags: webdev, discuss, git, productivity
Published: 2020-09-30 06:17:10

---
title: What GIT GUI client do you use?
published: true
description: 
tags: webdev, discuss, git, productivity
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/zuwj38243r8p2wajjbqv.jpg
---
I used [GitHub Desktop](https://desktop.github.com/) at first, tho moved away as I wanted some integrated solution. So I went with VS Code extension [GitLens](https://marketplace.visualstudio.com/items?itemName=eamodio.gitlens) and I find version control much easier now.

I've heard of other solutions like [GitKraken](https://www.gitkraken.com/), [SourceTree](https://www.sourcetreeapp.com/) and [Smart Git](https://www.syntevo.com/smartgit/).
There are lots of [GIT extensions](https://marketplace.visualstudio.com/search?term=git&target=VSCode&category=All%20categories&sortBy=Relevance), as well.

What GIT GUI client do you use and why?
Where do you find design inspiration?
Tags: webdev, discuss, design
Published: 2020-09-30 06:16:36

---
title: Where do you find design inspiration?
published: true
description: 
tags: webdev, discuss, design
cover_image: https://previews.123rf.com/images/assumption111/assumption1111808/assumption111180800239/106079247-set-for-drawing-and-art-painting-with-color-palette-and-watercolor-paints-on-table.jpg
---
For me it's mostly [Dribbble](https://dribbble.com/), [Behance](https://www.behance.net/search?tracking_source=nav19), [Pinterest](https://www.pinterest.com/) and [Awwwards](https://www.awwwards.com/).
I find some UI inspiration in [Codepen](https://codepen.io/) and [CodeSandbox](https://codesandbox.io), too.

What are some sources you find your design inspiration on?
WordPress Websites I built
Tags: wordpress, webdev
Published: 2020-09-30 06:16:29

Hey everyone, I have built over 100 WordPress Websites for my clients and for myself over the years. If I go back and recall, I only remember about 10 websites, call it my ignorance or my main focus on websites that I built for myself. 

Though, I have a list of all the websites I have built stored in my Google Drive, if needed I can get them from there. Is this a bad practice? Is it necessary to know about all of them without having to look them up in Google drive?

Let me know your take.

Cheers
Where do you host your images?
Tags: webdev, discuss, hosting, images
Published: 2020-09-30 06:15:50

---
title: Where do you host your images?
published: true
description: 
tags: webdev, discuss, hosting, images
cover_image: https://previews.123rf.com/images/mackoflower/mackoflower1507/mackoflower150700433/42590633-collage-of-lots-of-popular-worldwide-dinner-foods-and-appetizers.jpg
---
How do you approach image hosting for image-heavy sites?

Do you use services like [Cloudinary](https://cloudinary.com/), or [Cloudflare](https://www.cloudflare.com/) for caching and CDN or do you have some ther cost-effective solutions?
ETHPlanet Hackathon Workshop 1: Ethereum Improvement Proposal (EIP)
Tags: blockchain
Published: 2020-09-30 06:12:35

As part of the ETHPlanet Hackathon: Building the Next Digital World, the EIP workshop will be a journey of process improvement with an overview of EIP and network upgrade in Ethereum.

📅 Workshop Date: 10/1 (Thursday) at 10 AM EST / 10 PM SGT / 4 PM CET; 20 mins presentation and 15 mins Q&A.

🎙️ Mentor: [Pooja Ranjan](https://twitter.com/poojaranjan19) from [Ethereum Cat Herders](http://www.ethereumcatherders.com/)

📍 RSVP: https://www.eventbrite.com/e/ethplanet-hackathon-workshop-1-ethereum-improvement-proposal-eip-tickets-122656223065

Workshop overview: From the early stages of development, Ethereum Improvement Proposals (EIPs) are the core component for continuous growth. This workshop aims to familiarize the present and proposed changes to the EIP and network upgrade process to new contributors of the ecosystem.

---

About Pooja Ranjan: Working towards creating awareness and promotion of Ethereum for several years with EtherWorld, she is the proud Herder-in-chief of Ethereum Cat Herders, helping the Ethereum community with decentralized project management.

About Ethereum Cat Herders: Decentralizing Ethereum project management, aiming to bring the minimum amount of order that chaos needs to move Ethereum forward.

---

Join ETHPlanet Building the Next Digital World Hackathon here>> https://ethplanet-hackathon.devfolio.co/
Simple and Easy Open Source Project for Contributors to contribute during HACKTOBERFEST - DEV-RESUME as Case study
Tags: opensource, hacktoberfest, javascript, beginners
Published: 2020-09-30 06:08:33

##Terms used
a. Open-source software is a type of computer software in which source code is released under a license in which the copyright holder grants users the rights to use, study, change, and distribute the software to anyone and for any purpose. 

b. Pull requests let you tell others about changes you've pushed to a branch in a repository on GitHub. 

###Hacking in October (hacktoberfest) ❤️
It is the month of October when developers and tech enthusiasts around the globe gather remotely and in person to celebrate open source. The experience has always been a big bang. The big bang is called HACKTOBERFEST. This is an annual event which runs through out the month of October. For this reason, I am inviting you to a beginner-friendly and easy-to-contribute project titled DEV_RESUME.

##Benefits of contributing

The following are the rewards and benefits for every contributors of this project.
1. Get recognised on GitHub with a contributor's badge issued by our GitHub contributor's bot

2. A merged PR (Pull Request) get featured on our live project at https://dev-resume.herokuapp.com which is aimed at showcasing open source contributors around the world.

##Aims of the project
To be No.1 point for recruiters to confirm developers contributions to open source.

###Below are the simple and straight forward steps to contribute to the project.

Step 1: Sign in to github.
Step 2: Search Dev-resume or follow this https://github.com/Taiwrash/dev-resume.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/blhlv48cya1aooeckzr3.jpg)

Step 3: Fork the repo using the fork button on GitHub
Step 4: after successfully forked, clone the repo by using the clone button with your system terminal
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/o4atulvxoild51iah0wf.jpg)

Step 5: Open the folder and navigate to public, then images, and move your desired image into it(note the name and extension of the image) i.e dev-resume/public/images

Step 6: leave the public folder
Step 7: Go to data.json file.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/fjdhxe29l6bta0jaojhb.jpg)

Step 8: Copy a complete object in the array starting with { and end with } put a comma as the last character and paste.
Step 9: Paste and edit the data to your personal data, then save. 
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/b0re0sjmnp4cni074h1u.jpg)

####You are almost there!💪

Step 10: Commit your changes and push to the GitHub.
Step 11: Navigate to GitHub and the forked repo should be begging for PR.

Step 12: Create a PR and you are done!

####Great work👍

Do this and you are 3 steps away from getting your tree planted by hacktoberfest team and your tee are waiting for more 3 PRs.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/tea0p57y11gag43z83hi.jpg)

This is how simple it is and you are done!

Let's hack together in this October period with the HACKTOBERFEST tag!
Hire App Developers in India
Published: 2020-09-30 05:59:46

Are you working on a new mobile app idea and looking for dedicated app developers in India or offshore? Global researches show that the total number of downloads in the year 2016 was 149.5 billion and it is expected to go up to 352.5 billion by 2021. Thus demand of mobile apps in India is growing at a rapid pace, lead by fintech, ecommerce, retail, edutech and real estate companies. If you are looking to hire App Developers India or willing to hire an app development team in India - LETS TALK!!!

Visit Website: https://www.provab.com/app-developers-india.html

PROVAB Technosoft is a top app development company, leading the digital innovations and building best in class mobile apps for global clients. We have partnered with several companies in India and have delivered winning software solutions and enterprise applications. We have a pool of skilled and experienced dedicated mobile app developers that possess expertise in all the leading technologies, native and cross platforms. We use Agile delivery framework to ensure our clients in India enjoy the benefits of fully-functioning, scalable solutions that create incremental value.

PROVAB has a team of 250+ software and app and its dedicated app development team follows the best practises to bring the customer idea into reality by deploying top mobile applications, software platforms and games. Over last few year, we have deployed several teams of mobile app developers India for end clients and software companies.
Quick set-up for ESLint
Published: 2020-09-30 05:56:09


ESLint helps to format code and analyze it to make suggestions for improvement. 
This is a quick guide to set it up on your VScode.


**Step 1:** 
Install eslint globally

``` javascript
npm install -g eslint
```


**Step 2:**
Initialize an ESLint configuration by running

```javascript
eslint --init
```


**Step 3:**
You will be prompted with a few different questions about your project to create the best configuration. Then you will also be asked to install extra packages; choose _yes_.
After that finishes, you should have a brand new _.eslintrc_ file in your project
Boosting your Serverless APIs with API Management at Create:Serverless
Tags: mscreate, azure, serverless, ama
Published: 2020-09-30 05:51:14

---
title: Boosting your Serverless APIs with API Management at Create:Serverless
published: true
description: Serverless APIs are a very appealing scenario, and as easy as they are to get started with functions, a ton of additional value is added when you add API Management to enhance the API.
tags: #mscreate #azure #serverless #ama
cover_image: https://res.cloudinary.com/practicaldev/image/fetch/s--huwXa6qQ--/c_imagga_scale,f_auto,fl_progressive,h_420,q_auto,w_1000/https://dev-to-uploads.s3.amazonaws.com/i/i3m35ktexoc4a2g9682l.jpg
---
 
## Create:Serverless
 
Join us for a half-day of conversations this 30 Sep 2020, at [Microsoft Create: Serverless] (https://aka.ms/createserverless) and connect with the experts and community members to discuss how you can run code for any application without having to manage servers.
 
Sign up and add to your calendar: [https://aka.ms/createserverless](https://aka.ms/createserverless)
 
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/0mt8dtjyyjyt46u92neo.png)
 
## Boosting your Serverless APIs with API Management
 
Serverless provides powerful and scalable ways to write APIs for web, mobile, and microservices. By combining Azure Functions with API Management, you can add new features like generating functions from an API definition, managing endpoints with policies and security, and rich end to end monitoring.
 
In this session, we'll dive into:
 
- Why would someone working with functions think about adding API Management?  What benefits does it provide?
 
- What's the easiest way to get started with API Management and functions?
 
- Show you how to get started with integrating Azure Functions and API Management
 
Want to know more? Join Jeff Hollan and Mike Budzynski on Sep 30th, at 10:25 AM (PDT) to discuss about all the ways in which you can use API Management to enhance your APIs.
 
### New to Serverless Concepts and Technologies? Start here:
 
- [Read: Azure Functions Docs](https://docs.microsoft.com/azure/azure-functions/?WT.mc_id=createserverless-docs-cxa) - to learn core concepts!
- [Create: Serverless Applications](https://docs.microsoft.com/learn/paths/create-serverless-applications?WT.mc_id=createserverless-docs-cxa) - with this hands-on tutorial.
- [Watch: POWERful Serverless Applications](https://channel9.msdn.com/Shows/POWERful-Devs/A-Deep-Dive-Into-POWERful-Serverless-Applications?WT.mc_id=servsept20-devto-wachegha) - a no-code option.
- [Serverless APIs in Azure Workshop](https://github.com/Azure-Samples/Serverless-APIs).
- Try [Azure fro FREE](https://azure.microsoft.com/free/?WT.mc_id=createserverless-docs-cxa)
 
### Code of Conduct
 
You are expected to adhere to the [Create:Serverless's code of conduct](https://aka.ms/createserverless) as well as [Dev.to's code of conduct](https://dev.to/code-of-conduct).
 
{% tag mscreate %}
 
Want to keep track of these events and conversations? Follow the #mscreate tag above or follow [@MicrosoftCreate](https://twitter.com/MicrosoftCreate) on Twitter.
Dr. Angela Yu's Web Dev Bootcamp
Tags: webdev, beginners
Published: 2020-09-30 05:44:30

Hey everyone, If you are considering a web development bootcamp, I highly recommend that you consider Dr. Angela Yu's bootcamp. Don't get confused between Colt Steele or Andrea Neagoie's bootcamp courses. Don't take me wrong, those courses are also good but Dr. Angela Yu's bootcamp is simply great.

And, while you decide to give it a go, don't forget to use [Udemy Coupon Codes](https://trydiscountcoupons.com/coupon/9-99-udemy-coupon-is-back-grab-the-offer-now/) from websites like https://trydiscountcoupons.com. You can get the course under $20 bucks easily..

I have been personally taken Colt Steele and Angela's bootcamp courses, to be honest, Colt Steel's content is dated and Angela's course is quite new. Both the instructors have bestseller and highly rated tags for their courses.

To save you the trouble, I suggest you to go ahead with Dr. Angela.

Cheers..
What service/tool would you use to implement multi-instance SaaS
Tags: help, saas, cloud, discuss
Published: 2020-09-30 05:26:50

---
title: What service/tool would you use to implement multi-instance SaaS
published: true
description: 
tags: help, saas, cloud, discuss
//cover_image: https://direct_url_to_image.jpg
---

I'm currently trying to build a MVP for a SaaS idea I had. I intend for every SaaS client to run their own instance of the application (for customisation and isolation purposes), so some sort of multi-tenant/multi-instance architecture. Currently to try to achieve this scenario, I have been thinking along these lines
* Kubernetes Multi-tenant cluster (This seemed like the most promising as I've seen a couple of companies do this e.g Kolide. I haven't proceeded with this as I'm new to the Kubernetes scene, so the learning curve was crazy and I don't have that much time)

* Switching databases depending on the subdomain value e.g client1.myapp.com switches to client1's database. (This didn't work out because the open source CMS I used doesn't support switching databases ☹️)

What tools/services are you using to handle such scenarios? Thanks for your time.
Hire App Developers in UK or Offshore
Published: 2020-09-30 04:42:05

Are you working on a new mobile app idea and looking for dedicated app developers in UK or offshore? Global researches show that the total number of downloads in the year 2016 was 149.5 billion and it is expected to go up to 352.5 billion by 2021. Thus demand of mobile apps in UK is growing at a rapid pace, lead by fintech, ecommerce, retail, edutech and real estate companies. If you are looking to hire app developers UK or willing to hire an app development team in India - LETS TALK!!!

Visit Website: https://www.provab.com/app-developers-uk.html

PROVAB Technosoft is a top app development company, leading the digital innovations and building best in class mobile apps for global clients. We have partnered with several companies in UK and have delivered winning software solutions and enterprise applications. We have a pool of skilled and experienced dedicated mobile app developers that possess expertise in all the leading technologies, native and cross platforms. We use Agile delivery framework to ensure our clients in United Kingdom enjoy the benefits of fully-functioning, scalable solutions that create incremental value.

PROVAB has a team of 250+ software and app and its dedicated app development team follows the best practises to bring the customer idea into reality by deploying top mobile applications, software platforms and games. Over last few year, we have deployed several teams of mobile app developers UK for end clients and software companies.
P2Pbin: A peer to peer paste sharing site with no servers.
Tags: showdev, ipfs, javascript, jamstack
Published: 2020-09-30 03:50:32

# P2Pbin
***
You heard that right, no servers.

### How does it work? ❓
A user will type (or paste) some text or code into an input box. It will be cached, but not saved. Then, when the user clicks "Copy", the text is "pinned" (basically saving their paste).

It is currently deployed to [Vercel](https://p2pbin.vercel.app/) and [Glitch](https://p2pbin.glitch.me/).

### Features 🌟
- **Simple**: Only 3 buttons: Copy, Load, and Reset.
- **Intergity:** IPFS uses hashes, so one letter change will change the hash entirely.
- **Mobile Ready:** Design for mobile, and is also a PWA, so it can be install/act like an app on many devices. 
- **Serverless:** It was built with JAMstack in mind, so it can easily be deployed to sites like [Vercel (a.k.a Zeit)](https://vercel.com) and [Netlify](https://www.netlify.com/).
- **Free & Open Source:** It is licensed under the CC BY-SA 4.0. Also, the full source code can be retrieved from https://github.com/aboutDavid/p2pbin or https://glitch.com/edit/#!/p2pbin.