teleren/devto huggingface dataset:
Detached database for local Meteor development
Tags: meteor, javascript, mongodb, tutorial
Published: 2020-11-06 18:01:57

This is a short tutorial on how to use [Meteor](https://www.meteor.com) with connecting to a different MongoDB database than the build-in one.

I assume that you have Meteor and MongoDB downloaded and installed.

Start your local MongoDB and create the database you want to use for your Meteor App.
If you want to use Oplog with Meteor then you will need to convert it to [replica set](https://docs.mongodb.com/manual/tutorial/convert-standalone-to-replica-set/). But for local development it might not be necessary. If you want to get into the details on this, I recommend taking the M103 course from [MongoDB University](https://university.mongodb.com).

Now that we have all of that ready we just need to let Meteor know that we want to use detached database. If you deployed to Galaxy, then you are aware of the `MONGO_URL` variable that is being used to connect to the DB hosting of your choice. It is the same locally, but we only put it in the command line before running Meteor like this:

```sh
MONGO_URL=mongodb://localhost:27017/my-database meteor --settings settings.json
```

And that is it!

Now why would you use it when Meteor has everything pre-packaged for you?
It comes down to advance uses and making sure that you don't delete your data if you need to run `meteor reset` command (which [might be desirable sometimes](https://github.com/meteor/meteor/issues/11175)).
Another use case is for testing. You have one database that you use for work and another one which is can be re-setup every time with testing data that your automated tests can work on.
You could also use it to have a separate DB for data that you get from production so that you can debug problems locally without mixing them with your local data set.

--------
If you like my work, please consider supporting me on [GitHub Sponsors ❤️](https://github.com/sponsors/StorytellerCZ).
#Day6 in 100dayofcode 
Tags: webdev, javascript, html, css
Published: 2020-11-06 17:54:39

And it's my day 6 and today I learnt MangoDb and some javascript. I learned MangoDb because I'm used to python a lot and I wish of making more with my python knowledge. So I started learning MangoDb and django for my python skills. AND I've also learnt some new things in Javascript which is quite interesting. I'm kinda loving javascript but it's still like a lot hell,but I think *I can* do this 🚀.
How to trigger a Github action with an HTTP request
Tags: github, api
Published: 2020-11-06 17:49:27

### 1. Create a new action with `repository_dispatch` trigger

Make sure your action is set to trigger on `repository_dispatch` event. This is the same event used when triggering the action through the UI.

```
name: Node.js CI

on:
  repository_dispatch:
  schedule:
    - cron: '5 12 * * 0'

jobs:
  build:
    runs-on: ubuntu-latest
```

### 2. Get yourself a personal access token to use the Github API

You can create one here: https://github.com/settings/tokens

Make sure you add `repo` and `workflow` permissions

### 3. Create the HTTP request 

https://docs.github.com/en/free-pro-team@latest/rest/reference/actions#create-a-workflow-dispatch-event

```
POST https://api.github.com/repos/<username>/<repo>/dispatches
Authorization: Bearer <Your personal access token here>

{"event_type": "hello"}
```


**cURL**
```
curl --request POST \
  --url 'https://api.github.com/repos/<USERNAME>/<REPO>/dispatches' \
  --header 'authorization: Bearer <TOKEN>' \
  --data '{"event_type": "hello"}'
```


### Sources

- https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows#repository_dispatch
- https://github.community/t/github-actions-api-to-run-a-workflow-and-cli-atop-of-it/18399
- https://docs.github.com/en/free-pro-team@latest/rest/reference/repos#create-a-repository-dispatch-event
Society values expertise, not intelligence
Tags: productivity, motivation
Published: 2020-11-06 17:47:27

We often avoid things that are hard because they make us feel stupid. To make matters worse, some people grow up being told that they are smart, which creates an identity in their mind about the fact that they are smart.

Nonetheless, when you are faced with a challenging task, you procrastinate and/or avoid facing these difficult things. And you avoid these things because they make you feel dumb.

You can re-frame this. You aren't "dumb" or "stupid." You are simply inexperienced. And to become experienced, you need to, you guessed it, gain experience. You do this by facing challenging tasks.

This mindset turns something negative ("Wow, I feel stupid") to a positive thing ("I'm learning from experience"). What society values is not intelligence. Society values expertise.

I think the biggest indicator of this in my own life is my software development skills.

I feel dumb a lot of time. I don't know everything and constantly face things that I don't know. But you know what? 5 years ago, something that would make me struggle for hours (and sometimes days) is second nature to me now.

It's like I'm climbing a mountain, and all I can see is the fact that I'm not at the top and have a long way to go.

But if you turn around and look down the mountain, you'll see just how much you've already climbed... You are not at the bottom of the mountain by any means.
Build a serverless chat app with Svelte and Firebase! (PART 4)
Tags: tutorial, webdev, svelte, javascript
Published: 2020-11-06 17:44:33

Hey! Welcome back! We're done with our chat app, now to show it to the world!

Firebase, the BaaS we're using, can also **HOST** your website for you! How cool is that? While you could use another host like [vercel](https://vercel.app) or [netlify](https://netlify.com), or even set up your own server, you should choose Firebase hosting for two reasons: 1) It requires \*almost\* no setup and more importantly 2) It integrates with Firebase Auth, meaning you don't have to configure extra callback URLs and such. All Auth providers (Firebase included) only work on a certain set of domains, and in Firebase, your hosted domain, `projectname.web.app` is whitelisted by default, so let's use Firebase Hosting.

> The code is available on [Github](https://github.com/arnu515/)

We need to install firebase cli, so if you've not done that, do it using this command:
```sh
npm install -g firebase-tools
```

## Initialise hosting

Let's initialise firebase hosting by typing:
```sh
firebase init hosting
```

Follow the steps it says. Choose the default options but make sure you make the app SPA compatible and **DON'T OVERRIDE `public/index.html`**.

## Deploy the app

To deploy the app, type these commands:

```sh
npm run build
firebase deploy --only hosting
```

You have to run these commands whenever you want to deploy any changes to your app.

## A security issue

Remember when we initialised Firebase Firestore, we set it to **test** mode? That's really bad in production, because **anyone** can make **any** changes to your database.

Let's fix that. Head over to your firestore rules, and change it out to:

```js
rules_version = '2';
service cloud.firestore {
  match /databases/{database}/documents {
    match /{document=**} {
      allow read, write: if request.auth != null;
    }
  }
}
```

## We're done

And there we go! We're done with the serverless chat app. If you feel like serverless is the way to go, and custom made backends are hard, you're in for a wild ride!

Also, if you want me to do serverless again, but with another service, and possibly different ones instead of just one big BaaS, and also using React this time, do leave a comment!

All the source code is available on [Github](https://github.com/arnu515/serverless-chat)
How to stop a link/button from moving on hover 
Tags: css, codenewbie, html, webdev
Published: 2020-11-06 17:39:36

Has it ever happen to you that you wanted to make hover effects and then everything is completely ruined ? 
Like when you want to add background color and make the link/button bigger but then when you hover on it , it moves! 
<br>

Let me show you an example of the messy hover effect :
Just hover on the twitter link and see what happens!

{% codepen https://codepen.io/nazaneyn/pen/XWKPKOv default-tab=css,result %}
<br>
So what happened here??
I gave the hover effect 20px padding and when you hover on the link it expands/moves.

```css
 a {
  color: #2196F3;
 }
```

```css
a:hover {
  background-color: #2196F3;
  color: white;
  border-radius: 15px;
  padding: 20px;
}
```

<b> Too annoying, right? </b>
<br>
Now how should we fix this?
Actually it's easier than you think!
<i>The trick is you need to create the effect BEFORE creating the hover effect.</i> In other words <u>it needs to exist before </u> the hover effect has been created.
<br>
Let me show you :

{% codepen https://codepen.io/nazaneyn/pen/zYBJoNP default-tab=css,result %}

In order to fix this mess all I had to do was create padding for the link and set the background color to transparent :

```css
 a {
  color: #2196F3;
  padding: 20px;
  background-color: transparent;
 }
```

<br>
I put the messy one and the fixed one in the same link to make things clearer.
You can play around with it on codepen to understand it better.

{% codepen https://codepen.io/nazaneyn/pen/bGexqbK default-tab=css,result %}
Teste backend pokémon pt 1
Published: 2020-11-06 13:58:16

Teste back-end pokémon pt 1

Depois de ter acompanhado toda a introdução sobre o método de estudo no [ultimo artigo](https://dev.to/renato_zero6/usando-testes-de-vagas-para-estudar-3dpg), que se consiste no desafio de criar uma API com dados de Pokémon, nós vamos colocar em prática o que aprendemos!

Nós vamos iniciar o teste criando o servidor, e para este processo nós vamos utilizar o express. Após este primeiro passo nós vamos criar uma pasta, você pode escolher o nome de sua preferência, eu vou chamar a minha de:

```
teste_backend_pokemon
```

Agora nós vamos acessar acessar a pasta criada pelo terminal, caso você não saiba basta fazer assim:

```bash
cd /home/projetos/....
```

O código acima é um exemplo da ultilização do comando `cd`

Agora que já estamos na raiz vamos iniciar o npm nela com o seguinte comando:

```bash
npm init ou npm init -y
```

O comando pode ser como o citado se você quiser preencher todas as perguntas ou podemos passar o `-y` assim aceitamos todas as solicitações e ele cria automaticamente.

Com isso ira aparecer um arquivo chamado `package.json` nele contem todas as informações sobre nossa aplicação, incluindo as dependências.

Após este passo vamos instalar as dependências nescessárias para o momento, então digite o comando abaixo:

```bash
npm i nodemon body-parse cors express
```

Agora podemos começar a parte mais importante que é codar :fire:

Para essa etapa crie um arquivo chamado `index.js`, dentro dele vamos colocar o seguinte código:

```javascript
const express = require("express"); // importamos o express
const cors = require("cors"); // importamos o cors
const app = express(); // agora instanciamos o express na variável app 
app.use(cors()); // informamos que vamos usar o cors junto ao express

// aqui falamos que o express ira entender o formato json
app.use(express.json()); 

// criamos a variavel que ira receber a porta do nosso servidor
const port = 3333; 

// inicializamos nosso servidor
app.listen(port, () => {
  console.log(`Servidor rodando na porta: ${port}`);
});
```

Depois de criar o `index.js` e digitar o código acima vamos inicializar o nosso servidor com o comando a
seguir, para isso você deve estar com o seu terminal na raiz do projeto.

```bash
nodemon index.js
```

Assim, vamos ver o seguinte resultado:

![Resultado terminal](https://dev-to-uploads.s3.amazonaws.com/i/h75nc20ojbgksb4mde5r.png)

E com isso já teremos a estrutura padrão do nosso projeto!! 😄🚀
Ask Octopus - Can I deploy database changes?
Tags: octopus, tutorial, devops
Published: 2020-11-06 17:35:43

---
title: Ask Octopus - Can I deploy database changes?
published: true
description: You're interested in automating your database deployments but not sure where to start? Check out the resources available in this Ask Octopus!
tags: octopus,tutorial,devops
series: Ask Octopus
---

You're interested in automating your database deployments but not sure where to start? Check out the resources available in this Ask Octopus!

{% youtube chBGBfNd8X0 %}

Other resources:
 - https://help.octopus.com/t/what-database-deployment-methods-technologies-does-octopus-support/25898
 - https://octopus.com/blog/search?q=database

Do you have a question about how to use Octopus? Email advice@octopus.com and someone from our team will get you an answer. You might even see it in a future episode.

Join our community slack at https://octopus.com/slack
Promise.resolve()
Tags: javascript, webdev, codenewbie, beginners
Published: 2020-11-06 17:34:30

```js
new Promise((resolve) => resolve("Welcome"))
  .then((value) =>
    console.log(value)
  ); // 'Welcome'

// is equivalent to,

Promise.resolve("Welcome")
  .then((value) => console.log(value)); // 'Welcome'
```

---

**Thanks for reading 💙**  
Follow **@codedrops.tech** for daily posts.  
[Instagram](https://www.instagram.com/codedrops.tech/) ● [Twitter](https://twitter.com/codedrops_tech) ● [Facebook](https://www.facebook.com/codedrops.tech/)

Micro-Learning ● Web Development ● Javascript ● MERN stack ● Javascript  
**[codedrops.tech](https://www.codedrops.tech/)**
What was your win this week?
Tags: discuss, weeklyretro
Published: 2020-11-06 17:28:27

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

Happy Friday!


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

All wins count — big or small 🎉

Examples of 'wins' include:

- Starting a new project
- Fixing a tricky bug
- Voting in the U.S. general election
- Cleaning your desk... or whatever else might spark joy 😊 


**Have a great weekend!**

![Good job!](https://media.giphy.com/media/28exZ74FVa4gHd660z/giphy.gif)
Hacktoberfest Challenge completed !!
Tags: hacktoberfest
Published: 2020-11-06 17:06:58


### Who am I?

I am Junaid Qureshi from Pakistan 🇵🇰
* Web Application Developer 
* React Developer 💻
* University IT Student
* Tech Enthusiast

I joined DEV because I love 😍 to interact with people like me "Developers" and discuss and know new stuff about technology. I participated in Hacktoberfest because I am always fond of giving back to the community and contributing to open source, so I saw Hacktoberfest with the same goal, so I joined it.

### Background

Actually, I am always contributing to open source and I am not new to open source, I started coding at University and now I am in 3rd year, and I know the stuff well enough.

### Progress

I just completed my challenge of 4 PRs, I submitted 13 though. 
> The process has been great overall.

### Contributions

* [Todo-App](https://github.com/developer-junaid/Demo-ToDo-App)
* [DeveloperFolio](https://github.com/developer-junaid/DeveloperFolio)


### Reflections

Overall, I can say that it was really amazing. I would love to participate again. My next step is and has always been, helping people with programming and tech-related hurdles and contributing to open source in form of code and projects.

**Thanks Hacktoberfest**
CRA default service worker issue
Tags: help, react, caching, serviceworker
Published: 2020-11-06 17:05:03

I've been working on a PWA which was created with creact-react-app and I'm using the default service worker which uses workbox to cache assets and serve them and the site works fine for some time, but after a period of time the site becomes unreachable until I close the tab and open a new one, or after I clear the service worker storage or after I do a hard refresh, I would like to avoid having that issue. Has anyone had this issue before? I'm new to service workers, haven't used one before, any help and thoughts would be appreciated. Thanks!
HactoberFest Experience
Tags: hacktoberfest
Published: 2020-11-06 16:18:21

{% tag hacktoberfest %}

I am new to this dev community. trying to learn web development 
with java-script, and bit interested in web security.

it was my first year for hacktoberfest, the experience of hactoberfest was amazing got a chance to learn something new, chance to get to know more about open source projects, and got introduced with the dev community.
Breadcrumbs Using HTML/CSS
Tags: css, html, webdev, uiweekly
Published: 2020-11-06 16:00:14

Breadcrumbs are simple navigation elements that show the current directory or path location on the website. So here we design Breadcrumbs in HTML and CSS with the help of font-awesome icons.

In this element, we used font awesome icons before selectors. Here we used the list HTML tag and CSS side we used normal CSS which is more important to show icons in after li tags.

Make it yours now by using it, downloading it, and please share it. we will design more elements for you.

[Source code](https://w3hubs.com/breadcrumbs-using-html-css/)
🚀10 Trending projects on GitHub for web developers - 6th November 2020
Tags: javascript, react, typescript, webdev
Published: 2020-11-06 15:57:15

Trending Projects is available as a weekly newsletter please sign up at [www.iainfreestone.com](https://www.iainfreestone.com) to ensure you never miss an issue.

### 1. Lando

A local development and DevOps tool for all your projects that is fast, easy, powerful and liberating

{% github lando/lando %}

---

### 2. Next.js Commerce

The all-in-one starter kit for high-performance e-commerce sites. With a few clicks, Next.js developers can clone, deploy and fully customize their own store. 

{% github vercel/commerce %}

---

### 3. Turbolinks 

Turbolinks makes navigating your web application faster. Get the performance benefits of a single-page application without the added complexity of a client-side JavaScript framework. 

{% github turbolinks/turbolinks %}

---

### 4. Deno

Deno is a simple, modern and secure runtime for JavaScript and TypeScript that uses V8 and is built in Rust.

{% github denoland/deno %}

---

### 5. G2

G2 is a visualization grammar, a data-driven visual language with a high level of usability and scalability. It provides a set of grammars, takes users beyond a limited set of charts to an almost unlimited world of graphical forms.

{% github antvis/G2 %}

---

### 6. Tailwind Starter Kit

Tailwind Starter Kit a beautiful extension for TailwindCSS, Free and Open Source.

{% github creativetimofficial/tailwind-starter-kit %}

---

### 7. Razzle

Create server-rendered universal JavaScript applications with no configuration

{% github jaredpalmer/razzle %}

---

### 8. Nivo

nivo provides a rich set of dataviz components, built on top of the awesome d3 and Reactjs libraries 

{% github plouc/nivo %}

---

### 9. GraphQL Server

GraphQL Server for Express, Koa, Hapi, Lambda, and more.

{% github apollographql/apollo-server %}

---

### 10. Boring Cyborg

A GitHub App built with Probot that automatically label PRs, issues and performs all the boring operations that you don't want to do.

{% github kaxil/boring-cyborg %}

---

Trending Projects is available as a weekly newsletter please sign up at [www.iainfreestone.com](https://www.iainfreestone.com) to ensure you never miss an issue.

If you enjoyed this article you can [follow me](https://twitter.com/iain_freestone) on Twitter where I regularly post bite size tips relating to HTML, CSS and JavaScript.
TOP-5 jobs remotely for 6 of November
Tags: android, javascript, java, testing
Published: 2020-11-06 15:51:59

See more [here](https://www.remotely.jobs/remote/developer-jobs/). 

1. [Full stack engineer (JS + Ruby)](https://www.remotely.jobs/remote-full-stack-engineer-js-ruby-job-at-almanac) (Almanac)

You have at least 3+ years experience working with a modern JS framework, ideally React. You also have 3+ years of BE experience with Ruby, or a similar language and the confidence that you can be tackling Ruby tasks effectively within the first 30 days.

2. [Software Development Lead](https://www.remotely.jobs/remote-software-development-lead-job-at-funnelytics) (Funnelytics)

- Experience with Node, Redshift, Snowflake, Vertica, Clickhouse or any other column-oriented database (customer-facing analytics)
- Experience leading development teams. If you have had past experience of growing out a small dev team one to two times, that’s great!

3. [Front End Java Script Developer](https://www.remotely.jobs/remote-front-end-java-script-developer-job-at-dataautomation) (DataAutomation)

- Javascript: 1+ year of experience 
- Experience in cross platform mobile development is a plus (preferred but not required). 

4. [Senior Android Kotlin Developer](https://www.remotely.jobs/remote-senior-android-kotlin-developer-job-at-jibble-group-sdn-bhd) (Jibble Group Sdn Bhd)

- At least 3+ years of commercial mobile development experience
- Experience with Kotlin

5. [QA Tester](https://www.remotely.jobs/remote-qa-tester-job-at-onthegosystems?utm_source=telegram&utm_medium=daily_jobs&utm_campaign=remotely_jobs_telegram) (OnTheGoSystems)

- Proven experience in manual testing
- Strong debugging skills (JavaScript, browser console, Node, Android logs)

Join us on Telegram: https://t.me/remotely_jobs
Bot: https://telegram.me/remotely_bot
The Village: Revamping an online newspaper with modern tech solutions and automated services
Tags: startup, writing, ruby, react
Published: 2020-11-06 15:16:13

The Village is an online city newspaper owned by the Redefine brand. It reports on important events of the day, culture, and entertainment in Moscow and St. Petersburg. Under the franchise, editorial offices also operate in other Russian cities, as well as in Belarus, Kazakhstan, and Ukraine.

The editors strive to make The Village appealing and useful for the widest possible audience.

By 2019, The Village already had high demands in terms of advertising opportunities, but it became technically more difficult and more expensive to implement them.

[Read a case study](https://evrone.com/village) on how Evrone [helped](https://evrone.com/ruby) The Village online city newspaper to develop a new Ruby backend and use an advanced technological approach to reduce technical debt.