teleren/devto huggingface dataset:
Throw Away Your Productivity Techniques
Published: 2021-05-12 07:46:33

I have read every productivity book out there. GTD, the Rapid planning method by Tony Robbins, The seven habits of highly successful whatever… all of them, and I have benefitted a lot from each of them. But all of them aim at getting your projects done.

That’s a bad idea. Your projects get done, and now what? As a productive individual, with what are you left? With my recent approach to things that took my first startup Proxies API to profitability, I realized that aiming productivity tools at projects were not helping me.

Instead, I aim to build habits.

Because mastery of productivity tools and methods don’t build your confidence, habits develop your confidence. You are only as confident as your habits. Tweet that!

I, in my psyche, don’t see that I have to build a successful startup in Proxies API. It appears like that to other people. For me, I have built two habits, which, in turn, create a successful startup. The habits are:

a) Make the product better every day

b) Write every day

I have never really missed a day; that’s where my confidence comes. Even if Proxies API fails for some reason, it is not a huge setback, because I got my boys, which is this relentless chugging away at making the product better and writing about it every single day.

I feel this is the proper application of all productivity techniques. If you subscribe to this view, here is a check that you can do at the end of every month to see if you are on the right track.

What habit have you built in the last 30 days? Which you have done every single day?

What pattern are you planning to develop in the next 30 days?

The answers to these questions can be quite telling because they predict the success or failure of your projects or startups. Also, they anticipate your confidence level.

The author is the founder of Proxies API, a proxy rotation API service.
Sequelize One-To-Many association – NodeJS/Express, MySQL
Tags: sequelize, node, mysql, onetomany
Published: 2021-05-12 10:53:12

https://grokonez.com/node-js/sequelize-one-to-many-association-nodejs-express-mysql

Sequelize One-To-Many association – NodeJS/Express, MySQL

In the <a href="https://grokonez.com/node-js/sequelize-one-to-one-association-nodejs-express-mysql">post</a>, we got started with Sequelize One-To-One association. Today we’re gonna create Sequelize One-To-Many association models with NodeJS/Express, MySQL.

Related posts:
- <a href="https://grokonez.com/node-js/sequelize-one-to-one-association-nodejs-express-mysql">Sequelize One-To-One association – NodeJS/Express, MySQL</a>
- <a href="https://grokonez.com/node-js/sequelize-many-to-many-association-nodejs-express-mysql">Sequelize Many-to-Many association – NodeJS/Express, MySQL</a>

<!--more-->
<h2>Sequelize One-To-Many</h2>
One-To-Many associations are connecting one source with multiple targets. But the targets are connected to only one source.

<pre><code class="language-javascript">
const Company = sequelize.define('company', {/* ... */})
const Product = sequelize.define('product', {/* ... */})

Company.hasMany(Product)
</code></pre>

The above code will add the attribute companyId to Product. Instances of Company has accessors <code>getProducts</code> and <code>setProducts</code>.

We can use <code>sourceKey</code> option to associate records on different columns:

<pre><code class="language-javascript">
const Company = sequelize.define('company', {
  uuid: {
	type: Sequelize.UUID,
	defaultValue: Sequelize.UUIDV1,
	primaryKey: true
  },
  
  ...
  return Company;
}

const Product = sequelize.define('product', {
	/*attributes*/
	
	return Product;
}

Company.hasMany(Product, {foreignKey: 'fk_companyid', sourceKey: 'uuid'});
Product.belongsTo(Company, {foreignKey: 'fk_companyid', targetKey: 'uuid'});
</code></pre>

https://grokonez.com/node-js/sequelize-one-to-many-association-nodejs-express-mysql

Sequelize One-To-Many association – NodeJS/Express, MySQL
Laravel Tinker - SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: No address associated with hostname
Tags: laravel, phpstorm, mysql, docker
Published: 2021-05-12 10:52:38

Read some good reviews on laravel tinker, **a phpstorm plugin** which I wanted to try out. I installed the plugin on my phpstorm editor and was ready to start tinkering. Was using Laradock which I had configuration for apache2, mysql, workspace and phpmyadmin. All was running well until I decided to experiment with laravel tinker. 

This was the setup for mysql database connection in the **.env** file.
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/g0640xoqboun3ehlq5pr.png)

Laravel tinker could not resolve the host name -

**Illuminate\Database\QueryException with message 'SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: No address associated with hostname**. 

After long hours of reading and searching online for a solution I couldn't get the help I needed. I later had suggestion from a senior colleague to use the IP adrress of mysql docker container. I did try and this time around the error changed to 

**Illuminate\Database\QueryException with message 'SQLSTATE[HY000] [2002] Connection timed out**

Making progress at least. I then inspected the mysql docker container networks by using the command :
**docker inspect [_container id_]**

Had a long list of information on the container but the focus was on the _Networks_ properties of the *NetworkSettings*.

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/863hdypthu0b9d278ce5.png)

I then changed the IPAddress to the Gateway which is equally an IP but directs traffic locally. Lo and Behold Laravel tinker was up and running.....
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/uv74fesamdclfa5wp5vp.png)

Hope this article helps someone who might find him or herself in similar situation. Comments and corrections are welcome as we all learn by building each other up.
Automagically un-collapse Jira comments
Tags: productivity, showdev
Published: 2021-05-12 10:35:55

---
title: Automagically un-collapse Jira comments
published: true
description: I made a thing
tags: productivity, showdev
series: Quickies
//cover_image: https://direct_url_to_image.jpg
---

If you use Jira, you probably know that you can order ticket comments either wrongly (reverse-chronological, like Twitter) or rightly (the way humans read English).

The default setting is "wrongly[^1]"

If you fix it, then you're left with a different problem. You see, you, as a user, want to be able to read the comments in the correct order, but you're also most likely to be interested in the latest one. Only Atlassian have decided you shouldn't be allowed to read it until a period of several time-units has passed, in which you've scrolled down and clicked "View x newer comments" a gazillion times[^2].

So a made an exceptionally dumb Chrom(e|ium) extension to fix it, which periodically mashes the button on your behalf.

```js
const swonk = function() {
  const buttonNodes = document.querySelectorAll('[data-test-id="issue.views.issue-details.issue-layout.left-most-column"] button');
  const buttonElements = [...buttonNodes].filter(e => e.innerText.match(/^View\s+\d+\s+remaining\snewer\scomments$/));

  buttonElements.forEach(e => e.click());
}

setInterval(swonk, 100);
```

Why don't I use a `MutationObserver` you ask? Well, it's because in longer than the two minutes it took to type that out, I couldn't find anything useful to _observe_, since Jira's HTML is complete div soup.

If you are lazy, like me, you can grab this. I put it on GitHub for a change: [moopet/jira-comment-uncollapser](https://github.com/moopet/jira-comment-uncollapser)


[^1]: I may be using Alternative Words for Added Effect.
[^2]: Hyperbole is good, ok, it's got "hyper" in it so it must be.
Sequelize ORM – Build CRUD RestAPIs with NodeJs/Express, Sequelize, MySQL
Tags: sequelize, orm, express, mysql
Published: 2021-05-12 10:31:24

https://grokonez.com/node-js/sequelize-orm-build-crud-restapis-with-nodejs-express-sequelize-mysql

Sequelize ORM – Build CRUD RestAPIs with NodeJs/Express, Sequelize, MySQL

Sequelize is a promise-based ORM for Node.js v4 and later. In the tutorial, we will show how to build CRUD RestAPIs with NodeJs/Express, Sequelize, MySQL.

- Related posts:
<a href="https://grokonez.com/node-js/sequelize-one-to-one-association-nodejs-express-mysql">Sequelize One-To-One association – NodeJS/Express, MySQL</a>

<!--more-->
<h2>Sequelize ORM</h2>
Sequelize is a promise-based Node.js ORM for Postgres, MySQL, SQLite and Microsoft SQL Server. It has many solid features for transaction, relations, read replication and more.

<strong>Getting started with MySQL</strong>:
<h3>Installation</h3>

<pre><code class="language-javascript">
$ npm install --save sequelize
$ npm install --save mysql2
</code></pre>

<h3>Set up a connection</h3>
<pre><code class="language-javascript">
const Sequelize = require('sequelize');
const sequelize = new Sequelize('database', 'username', 'password', {
  host: 'host',
  dialect: 'dialect',
  operatorsAliases: false,

  pool: {
    max: 5,
    min: 0,
    acquire: 30000,
    idle: 10000
  }
});
</code></pre>
<h3>Sequelize model</h3>

More at:

https://grokonez.com/node-js/sequelize-orm-build-crud-restapis-with-nodejs-express-sequelize-mysql

Sequelize ORM – Build CRUD RestAPIs with NodeJs/Express, Sequelize, MySQL
How to create an Uber for maids app step by step?

Tags: startup, flutter, ios, android
Published: 2021-05-12 09:50:05

Dreaming of starting an online business? Don't know where and what to start?

Let us help you!

The on-demand business is booming as people love getting services instantly.

If you're interested in starting a home service business [otherwise known as Uber for maids] like Task Rabbit, here we explain the steps to start one. If you're interested in starting a home service business [otherwise known as Uber for maids] like Task Rabbit, here we explain the steps to start one.

## What is Uber for maids business?
[Uber for maids app](https://www.rentallscript.com/blog/on-demand-house-cleaning-services-app/) is an online platform where customers who need a home service can connect with the service providers.

### So how it works?
The working principle of the Uber for maids app is as same as the Uber app itself.

The customer can search through the service they need via a mobile application.

Then, they book or schedule the service.

The service provider accepts the request and offers the intended service.

The customer pays for the service using the mobile application.

Both customer and service provider can rate and review each other.

The admin is the one who manages the business operations, and they'll transfer the earnings to the service provider.

Features to be incorporated into your Uber for maids app:

## Features and functionalities are the backbone of any software platform to perform smoothly.

Here're some of the important features that can be included in your home services app.

### Customer app features:
Registration
Multiple service categories
In-app wallet
Scheduling services

### Service provider app features:
Registration
Earnings management
Push notifications
Map integration

### Admin dashboard features:
Users management
Transactions management
Geofencing
Service management

## But how can you create an Uber for maids app?
You can create an Uber for maids app using scratch or by using readymade apps like [Wooberly](https://www.rentallscript.com/blog/on-demand-house-cleaning-services-app/).

But the former costs you a lot.

Yeah, you read that right!

Why wait? Start creating!
xhr.js:177 POST http://localhost:5000/posts 404 (Not Found)
Published: 2021-05-12 10:10:20

Hello, I trying to learn MERN STACK and watch a video tutorial but I got stuck with a problem, I've been struggling to solve this problem, I was about to finish the tutorial but I got stuck in the last section. I don't know where I went wrong. How can I solve this problem? I tried to search and re-watch the tutorial but I can't solve it.

https://github.com/Zurcemozz/PRACTICE_MERN/tree/master/server
![image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cpsvnfr471mifmpv42rc.png)
 

Can anyone help me with this? Thank you, I really appreciate it!
UI Dev Newsletter #56
Tags: webdev, html, css, javascript
Published: 2021-05-12 10:08:37

- [Airbnb JavaScript Style Guide](https://bit.ly/3tFGqLv)
Airbnb shares a comprehensive style guide for using JavaScript.


- [The State of CSS Cross-Browser Development](https://bit.ly/3hbY4DO)
Ahmad Shadeed shows how css cross-browser development used to be and highlights css problems that still need to be fixed.


- [Simple things are complicated: making a show password option](https://bit.ly/33zx9tr)
Andy Sellick describes how to build secure and accessible password input with a show password option.


- [HTML Developers: Please Consider – in the year of 2021](https://bit.ly/2Q0um9A)
Steve Faulkner lists common aria attributes and which HTML elements to use with them.


- [Debugging vertical layouts in 2021](https://bit.ly/3hcIN5H)
Chen Hui Jing revisits the states of DevTools for debugging CSS grid in vertical writing mode.


- [17 learnings for making better landing pages](https://bit.ly/33tSUuM)
Blake Emal shares 17 learnings to help your landing page convert from auditing 500+ websites over the past six years.


- [Is CSS a Programming Language?](https://bit.ly/3ewbHfl)
Chris Coyier tries to answer the evergreen question about CSS with respect in mind.


- [Kern Type, the kerning game](https://bit.ly/3txtfvY)
A game that helps you learn to kern type.



Happy coding!

[Subscribe to the newsletter here!](https://bit.ly/34155z3)
What made me use SWR?
Tags: react, swr, webdev, javascript
Published: 2021-05-12 09:59:57

I have been working on a project which have multiple screens and since I am using **react** I have to deal with several components but when it came to data fetching it wasn't easy to use the hook called **useEffect**, I was able to control the *useEffect* functionalities to some extent using *dependency array* but the component was *mounting* and *unmounting* which made it to *refetch* the data every single time. 
When I learnt about **SWR** it kind of gave so many functionalities that I could use to control the number of refetches so the first thing I used was, **dedupingInterval** here I can set the time interval when I need to refetch the data. 
Second thing which I used was, 
**mutate(key)**: what are the other scenarios I would like to refetch or I can say invalidate the old call.
Why I Only Have 2 Items On My To-do List Every Day?
Published: 2021-05-12 09:37:14

It is a lie. Now I have about four items on my to-do list every day. But when I started my bootstrapped startup Proxies API, I only had two things on my to-do list for months.

a) Make the product better every day

b) Write every day

The reason for this is:

a) I believe a startup, in the beginning, is nothing but the sum of the founder’s habits.

b) Habits are the dependable assets of the startup.

c) Even if the startup fails, I take home these habits, so they can’t hurt in the next startup or job.

So for months, this is all I did. I refused to even explain in the to-do list what I was going to write. It didn’t matter what I wrote. I just wrote today, that’s a more significant takeaway in the whole scheme of things than what I wrote. It also didn’t matter how good it was. Time will fix that anyway. I focus on not breaking the habit no matter what. That’s the deal with myself.

I am not allowed to read about the latest marketing growth hack on medium or Twitter. Put my head down and show me after 100 days that I have not broken the streak of writing every single day. That's what I need.

It is no surprise that Proxies API went on to be my first successful startup. It is a huge relief. But this secret was never in building a startup, and the secret is making a couple of simple habits.

The author is the founder of Proxies API, a proxy rotation api service.
How to configure JavaMailSender with SpringBoot
Tags: springboot, mail, javamailsender
Published: 2021-05-12 09:36:17

https://grokonez.com/spring-framework/spring-boot/configure-javamailsender-springboot

How to configure JavaMailSender with SpringBoot

<strong>Spring Framework</strong> provides <strong>JavaMailSender</strong> interface & <strong>Spring Boot</strong> provides auto-configuration for it. So in the tutorial, <strong>JavaSampleApproach</strong> will introduce how to configure <strong>JavaMailSender</strong> to send a gmail by a sample code.

<!--more-->
<div id="tuttoc" class="jsa-toc"></div>

<div id="tutcontents">
<h2>I. Technologies</h2>
– Java 1.8
– Maven 3.3.9
– Spring Tool Suite – Version 3.8.1.RELEASE
– Spring Boot: 1.5.1.RELEASE
<h2>II. Practice</h2>
<strong><em>Step to do</em></strong>
- Create SpringBoot project
- Create MailSender
- Develop a test client
- Run & check results
<h3>1. Create SpringBoot project</h3>
– Using <strong>SpringToolSuite</strong>, create a SpringBoot project. Then add <strong>spring-boot-starter-mail</strong> dependency:
<pre><code class="language-html">&lt;dependency&gt;
	&lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
	&lt;artifactId&gt;spring-boot-starter-mail&lt;/artifactId&gt;
&lt;/dependency&gt;</code></pre>
<h3>2. Create MailSender</h3>
- Firstly, open <strong>application.properties</strong> file, configure <strong>spring.mail</strong> for <strong>JavaMailSender</strong>:

More at:

https://grokonez.com/spring-framework/spring-boot/configure-javamailsender-springboot

How to configure JavaMailSender with SpringBoot
Getting Started With Terraform for RDS MySQL on Alibaba Cloud
Tags: terraform, database, mysql, linux
Published: 2021-05-12 09:32:48

Are you those who get used to do everything in a Linux without GUI? If so, you may need the help of Terraform when there is a need to provision cloud resources in your projects.

Many geeks are using Terraform, will you in?

We prepared a 10 mins video to tell you all the stuffs to get started, have a look~
[Watch Now](https://www.youtube.com/watch?v=zDDFQ9C9XP8&list=PL54EFTJJZrwhlXruht3cQA18ISUKo6GAD&index=3)

If you feel it helpful, do not forget to give a like or subscribe for more contents.
[Subscribe us on YouTube](https://www.youtube.com/channel/UCzPDwZfrr1AWY-yTiUrWIjA)
There is not only one right way
Tags: webdev, design
Published: 2021-05-12 09:32:32

Many times when we want to work on design projects we normally think of following the best practices UX design process. This is a worrying subject for almost every designer especially beginners, we tend to ask ourselves if the flow or pattern we use is the best practice when it comes to UX design. 

I have come to understand that there isn't a one-way process when it comes to designing websites, web apps or mobile apps.  Your process will highly depend on the type of product you’re designing. Every project requires different approaches; the approach to designing a website for an alumni network of an institution or your alma mater differs from the way we design a cryptocurrency app(it's the new thing being talked about😀), for example.

I think what we should really focus on as designers are to apply the concept of [Design Thinking](https://www.interaction-design.org/literature/article/5-stages-in-the-design-thinking-process) and the principles of [principles of design](https://www.toptal.com/designers/ui/principles-of-design). The design thinking process has five stages in it: empathize, define, ideate, prototype, and test
This should be great for any kind of project ✌🏽.

My next post will be a brief on the process I used when designing a website for my Alumni network. Stay tuned, mia ga do go🤝 (meaning we will meet again, translated from Ewe- a Ghanaian language)
Excel Formulas to Display the Current Date and Time ~ Simple Tricks!!
Tags: excel, excelformula, excelformulas
Published: 2021-05-13 02:28:10

---
title: Excel Formulas to Display the Current Date and Time ~ Simple Tricks!!
published: true
date: 2021-05-12 06:58:33 UTC
tags: Excel,ExcelFormula,Excelformulas
canonical_url: https://geekexcel.com/excel-formulas-to-display-the-current-date-and-time/
---

We have already learned how to **[display the current date in Excel](https://geekexcel.com/excel-formulas-to-display-current-date/)**. Similarly, here we will show the easy trick to **display the current date along with time in Excel**. Let’s get them below!! Get an official version of ** MS Excel**  from the following link: [https://www.microsoft.com/en-in/microsoft-365/excel](https://www.microsoft.com/en-in/microsoft-365/excel)

## General Formula:

- You can use the below formula to display the current date and time in a worksheet.

**=[NOW](https://geekexcel.com/how-to-use-now-function-in-microsoft-excel-365/)()**

## Syntax Explanations:

- **NOW** – In Excel, the **[NOW function](https://geekexcel.com/how-to-use-now-function-in-microsoft-excel-365/)** helps to return the current date and time.
- **Parenthesis ()** – The main purpose of this symbol is to group the elements.

## Practical Example:

Let’s consider the below example image.

- Here we will enter the above-given formula in  **Cell B4**.

![Enter the formula](https://geekexcel.com/wp-content/uploads/2021/05/Enter-the-formula-35.png)<figcaption id="caption-attachment-40684">Enter the formula</figcaption>

- And press  **ENTER**  key it will display the current working date.

![Result](https://geekexcel.com/wp-content/uploads/2021/05/Result-34.png)<figcaption id="caption-attachment-40685">Result</figcaption>

- You can also display the current date by pressing the **Ctrl** + **;** then enter a **Space** character and press **Ctrl** + **Shift+ ;** keys.

## Bottom-Line:

So yeah guys this article has explained how to **display the current date and time in an Excel** worksheet. Hope you like it. If you are stuck or need some help, **comment** below, and I will try to help as much as possible.

Thank you so much for visiting  **[Geek Excel](https://geekexcel.com/)!! **If you want to learn more helpful formulas, check out [**Excel Formulas**](https://geekexcel.com/excel-formula/) **!! **

### Read Also:

- **[Excel Formulas to Find the Number of Days in a Month ~ Simple Method!!](https://geekexcel.com/excel-formulas-to-find-the-number-of-days-in-a-month-simple-method/)**
- **[How to Show or Display All Cell Formulas in Excel Office 365?](https://geekexcel.com/how-to-show-or-display-all-cell-formulas-in-excel-office-365/)**
- **[Excel Formulas to Create Custom Weekday Abbreviation ~ Easy Tutorial!!](https://geekexcel.com/excel-formulas-to-create-custom-weekday-abbreviation/)**
- **[Excel Formulas to Count Dates in Current Month ~ Simple Tutorial!!](https://geekexcel.com/excel-formulas-to-count-dates-in-current-month-simple-tutorial/)**