teleren/devto huggingface dataset:
Keep clean your git repos!
Tags: devops, git
Published: 2019-07-03 07:05:24

Many developers don't keep their local repositories clean. There is a way how to automate it though. Let's look at a few useful commands:

*To clean refs to nonexistent branches in the remote:*
```bash
$ git fetch --prune
```

`--prune` before fetching, remove any remote-tracking references that no longer exist on the remote.

*To estimate how many branches merged into dev:*
```bash
$ git branch --merged dev | wc -l
```

`--merged` option can filter list to branches that you have merged into the given branch. Squash and rebase merges usually aren't detected by `--merged`.

*List of branches merged into dev:*
```bash
$ git branch --merged dev
```

*List of remote branches merged into dev:*
```bash
$ git branch --merged dev --remote
```

*If you are courageous then:*
```bash
$ git branch --merged dev | egrep -v "(^\*|master|dev)" | xargs git branch -d
```
It removes all local branches that merged into dev (except dev and master).
**This is a potentially damaging operation. It can delete branches actually needed.**
So if you use the different approach to work with Git, you could remove some of branches manually instead. I hope you do not store all old branches, do you?
Practical Machine Learning for Front End Developers
Tags: machinelearning, javascript, webdev, python
Published: 2019-07-03 06:55:56

In this video, we will talk about the different applications, possibilities, tools and resources, as well as show a few examples and demos, so you can get started building your own experiments using machine learning in JavaScript.

Machine learning can have some pretty complicated concepts to grasp if you’re not a data scientist. However, recent developments in tooling make it more and more accessible for developers and people with little or no experience. One of these advancements is the ability to now train and run machine learning algorithms and models in the browser, opening this world to front-end developers to learn and experiment. 

{% youtube ruff6tO4l10 %}

**Thanks for reading** ❤
If you liked this post, share it with all of your programming buddies!
Follow us on **[Facebook](https://www.facebook.com/MachineLearningTutorial)** | **[Twitter]( https://twitter.com/moriohdotcom)**

### Further reading

☞ [Machine Learning A-Z™: Hands-On Python & R In Data Science](http://learnstartup.net/p/SJw1YoTMg "Machine Learning A-Z™: Hands-On Python & R In Data Science")
☞ [A Complete Machine Learning Project Walk-Through in Python](https://morioh.com/p/b56ae6b04ffc)
☞ [Machine Learning: how to go from Zero to Hero](https://morioh.com/p/e99fd80cbe35)
☞ [Top 18 Machine Learning Platforms For Developers](https://morioh.com/p/b58d2cc4a90a)
☞ [100+ Basic Machine Learning Interview Questions and Answers](https://morioh.com/p/fd6290a722e6/ "")
Podcasts. How? Why? And When?
Tags: podcast
Published: 2019-07-03 06:50:31

---
title: Podcasts. How? Why? And When?
published: true
description: 
tags: podcasts
---

So my morning routine is all about reading articles while having my cup of coffee before I start coding, and I almost always read the word `podcast` in arguably every article.

A lot of people listen to podcasts. But I've never known why.

So here's a question for everyone willing to help me out.

Why the heck would I listen to 1-hour-long podcasts? And where would I do that? Is it possible for me to do it while coding? What are they usually about? Seriously. Just, like. Help pls.
How to get the most out of Stackoverflow
Tags: beginners, stackoverflow
Published: 2019-07-03 06:44:47

---
title: How to get the most out of Stackoverflow
published: true
description: Contribute to Stackoverflow to help the community
tags: beginners, stackoverflow
---

Simple question, simple answer:

## Create an account

_Believe me, it will make a difference!_

Stackoverflow can be a life-saver when a complex problem pops up. However, starting to share your answers yourself or ask good quality questions can be a bit intimidating at first.

## Lower the barrier

Once you have an account, there are various ways to help others even if you're not sure about writing answers yet.

* **Vote** on questions & answers (or star them). This helps finding them again later and motivates others spending time to help.

* **Edit outdated answers**, and update them with new information.

* **Comment** (min 10 reputation, quite frustrating if this is blocked for your) to engage in answers/questions. Will really help you if want to dig deeper is someone else's question.

* Finally: start asking **your own well documented questions and answers**. By voting up or down, you'll have learned what makes a question easy to answer or rather hard to understand.

Stackoverflow is one of my favourite ways to find answers and give back to the community by posting some answers myself.

What are your experiences with it? Interested to hear the story!
[Dev Discussion] Passwordless login?
Tags: infosec, password, login, security
Published: 2019-07-03 06:34:57

---
title: [Dev Discussion] Passwordless login?
published: true
description: A brief discussion about the possibility of implementing logins without long-lived credentials like password.
tags: InfoSec, password, login, security
---

Hello guys! Just a question that popped out of my mind. If hackers usually target email/passwords that would grant them access to a specific service, _why not use email + a short-lived credential like a OTP (e.g., the ones generated by an authenticator app)?_ Wouldn't that be far more secure since the window of attack is considerably reduced? I know that probably that would suck from a usability point of view.
Google Guaranteed Label: A Necessity for Google Home and Assistant Listings
Tags: google, digitalmarketing, onlinemarketing
Published: 2019-07-03 05:14:42

Google Local service ads used to have Google Guarantee Label on them. But with Google Assistant ads, there popped up the confusion among the individuals regarding the fact that how one can show up in the local listings with the guaranteed label without shedding a penny.

If you have listed your business with Home Advisor and Porch you can expect the Google to show the ads else it will be required of you to submit a request for guarantee of your ads by Google using this form. 

According to Greg “in order to be Google Guaranteed, businesses must pass a background check and have their license and insurance details verified." Well payment does wonders and the process will be completed quickly while through the submissions of the forms it can take a bit more time.
 
The categories which the form qualifies for are Electrical, House cleaning, Plumbing, Garage door repair, Appliance repair, Heating and Air Conditioning, Locksmithing and House painting.
Fullcalendar in Angular 8
Tags: angular8, fullcalendar
Published: 2019-07-03 04:44:36

---
title: Fullcalendar in Angular 8
published: true
description: Fullcalendar in Angular 8
tags: Angular 8, Fullcalendar
---

Hi, here you can check post related to [Fullcalendar implementation in Angular](https://therichpost.com/how-to-implement-fullcalendar-in-angular-8).

**Therichpost**

Thank you
Do Whatever You Want, So Will I
Tags: react, javascript, cleancode
Published: 2019-07-03 04:36:40


**tl;dr**

Moving toward the creative side may result in more shit, but neat things can grow out of it.

![](https://thepracticaldev.s3.amazonaws.com/i/j1ovf7jh4c150xju2hhl.jpg)


While writing an article explaining why [spreading props to React components is a bad idea](https://reactjs.org/docs/jsx-in-depth.html#spread-attributes) - _and it is_ - my hairline receded, white hairs appeared in my beard, the music around me became too loud, and no one's clothes made any damned sense.

Technically, all that stuff happened slowly over many years, but I suddenly saw it as I prepared another shit talking session about all the crap code I've run into in the wild.  What the hell?  When did I become so fucking cranky?

Yes, if everyone did things a certain way, everything would be fine.  Fine-ish.  It may be stable, but without crazy ass innovation.  We would have a world of very resilient, performant spreadsheets.

But I certainly didn't start writing code because of a desire to take up the cause of the clean code brigade.  I couldn't have given less of a shit.  I had an idea that I wanted to present and the tool to do it was code.  Over time, possibly because of pursuing a career in code and not the _artifacts_ I once used them for, I've become obsessive over the freaking tools.  Like some crusty, psycho carpenter sharpening and organizing blades, forgetting about the freaking cabinets he was supposed to make.

"Listen up!  If you want to make cabinets, you need to stop and learn your tools.  I mean really learn them.  Learn care and maintenance, learn other tools you can use to make these tools better, and go around making sure others use their tools right.  If you're interested, I've written a lot about how to use these tools.  I've even made tools that can make other tools.  If people would just use the right freaking tools, all the cabinets would be perfect."

Meanwhile, some asshole using a chisel as hammer whacked together 16 cabinets.

Who cares?  Let people suck.


## Wild analogy shift in 3...2...1

When trying resuscitate a weed-infested lawn, you may be tempted to run straight to the weed killer.  That will kill the weeds, but has a negative overall effect on the lawn's health.  This results in a weaker lawn, which is more likely to sprout weeds.

Adding poison is a negative action.

A better reaction is to focus on nurturing the lawn.  Add phosphates and shit.  That will make the grass healthy, which will flourish, and not give the weeds anywhere to hang out.

Adding fertilizer is positive.

This pattern comes up a lot in life.  Pessimism and overall negativity are not creative.  And writing software is - hold onto your planning meeting notes - a creative process.  Meetings and story points and micro-managing dickbacks may have slowly sucked the life out of it, but I started doing this because it was another art form and pretty fun.


I've stashed my cranky article for now.
3 JavaScript Snippets to get you started
Tags: javascript, beginners, flatiron, api
Published: 2019-07-03 04:05:04

After a bitter battle with React, I jumped at the chance to answer some questions questions I got about JavaScript. While those conversations took place offline, I still think it might be helpful to provide some snippets for the most common problems other programming students were struggling with.

####Manipulating the DOM
- In JavaScript, this happens over 3 parts:
1. Fetch requests or API calls
2. Rendering on the DOM 
3. Event Handling

More and more, I understand why most programming blog posts tend to be on the longer side. But as always, I will try to provide some (templated) short snippets, with little commentary, followed by a third-party resource which goes into more detail.

####Fetch requests (GET)
```javascript
let url = "http://localhost:3000/books"
fetch(url)
.then(res => res.json())
.then(data=> {
data.forEach(book => {
parentElement.innerHTML += render(book)
})
```

####Add API objects to DOM
```javascript
const render=(book)=>{
return(`<div>
    <h1>${book.title}</h1>
    <button class='del-btn> 🗑</button>
`)}
```

####Add event handler to delete item from DOM on click
````javascript
let divTag = document.querySelector('div')

divTag.addEventListener('click', (event) => {
if(event.target.className.contains('del-btn') {
        event.target.parentElement.remove()
      }
  }
```

These are extremely simplified examples to give you an idea of how these 3 parts can interact with each other. For more detailed reading, [this article by freecodecamp](https://www.freecodecamp.org/news/a-practical-es6-guide-on-how-to-perform-http-requests-using-the-fetch-api-594c3d91a547/) provides a great basis exploring JavaScript DOM manipulation and API calls in more detail
Streak - habit tracker for Trello
Tags: showdev, productivity
Published: 2019-07-03 03:51:31


Streak is a Trello Power-Up that allows you to track habits straight on your Trello board.

![](https://thepracticaldev.s3.amazonaws.com/i/5i5t1r84j4pjjzs802mu.png)

You check off that you've completed your habit using the calendar on the Trello card, and then you can see at a glance how you're tracking across all your habits with the little badges on the front of the cards.

I initially started off hosting this on Heroku's free plan, but it puts your app to sleep after a little while so I switched over to Github Pages for free hosting.

This is my first Trello Power-Up, and whole process was pretty straightforward - I submitted the Power-Up through a form, they came back with some feedback, and it's been available in [Trello's Power-Ups directory](https://trello.com/power-ups/5c02759abbb4b58f5d5d2526/streak-habit-tracker) for a couple of months now!

Let me know if you have any feature suggestions or questions!
Keep your JavaScript up to date - kuwjs
Tags: node, npm
Published: 2019-07-03 03:44:08

JavaScript NPM packages changes very often 🔥JS community is the largest, contributors are very active and it is always good day to use JS 😆.

So you have to keep your packages up to date, Why?
- Getting latest security fixes and patches.
- Getting new improvements - specially performance related.
- Getting new features and improvements that didn't exist before.
- Getting dependencies updated for your packages.
- Utilizing newer node.js , browser capabilities and v8 engine updates and releases.

Keeping up to date with project locally installed packages and globally installed packages become a challenge.

## My 3 favorite tools I use daily to keep up with JS.

## [1 - npm-check](https://github.com/dylang/npm-check)

Keep your globally node.js npm packages up to date.

```bash

$ npm install -g npm-check

# check global installed packages and display existing version, new version and link to changelog or website.

$ npm-check -ug

```
![npm-check -ug](https://meabed.com/content/images/2019/07/image-3.png)
![npm-check -ug # installation of updated packages](https://meabed.com/content/images/2019/07/image-4.png)





## [2 - npm-check-updates](https://github.com/tjunnone/npm-check-updates)

Keep your node.js npm local project packages up to date.

```bash

$ npm install -g npm-check-updates

# check locally project installed packages and updgrade packages.json

$ ncu -u

```
![ncu -u # updates packages.json](https://meabed.com/content/images/2019/07/image-5.png)



## [3 - typesync](https://github.com/jeffijoe/typesync)

Keep your types synced and up to date - one of my favorite time saving and productivity packages!

```bash

$ npm install -g typesync

# check locally project installed packages and add or update all types needed.

$ typesync

```
![typesync](https://meabed.com/content/images/2019/07/image-6.png)


If you have any other useful ideas or suggestion to enhance productivity or keep your system up to date, I would love to hear it and share it, please feel free to leave it in the comment or [@meabed](https://twitter.com/meabed)

Happy coding 🤞
Show Me Your Favorite Thing You've Organized
Tags: discuss
Published: 2019-07-03 02:03:09

---
title: Show Me Your Favorite Thing You've Organized
published: true
tags: discuss
---

I love organizing things (when I'm not feeling overwhelmed by the number of things I need to do at my house 🙃). If you have something you've organized that you're super proud of, let's see it! Whether it's your closet, code project, toolbox, silverware drawer, browser bookmarks, whatever, ... I love seeing pictures of this kind of stuff. It's a good thing I don't use Instagram anymore. I could waste hours looking at home organization. 🥰

---

Did you know I have a newsletter? 📬

If you want to get notified when I publish new blog posts or make major project announcements, head over to [https://ashleemboyer.com/newsletter](https://ashleemboyer.com/newsletter).
Sorting arrays in Javascript by date
Tags: help, arrays
Published: 2019-07-03 00:43:41

---
title: Sorting arrays in Javascript by date
published: true
tags: help, arrays
---

I am working on a small project which gives you a list of branches on a git repo, and generates link markdown. The goal is for when someone creates a tutorial they can make branches for the progressive steps, and then easily generate the contents list when done, and paste on a readme. I know is silly. I can easily do it in the terminal with git, and maybe with a small python program or bash script to print markdown.

I've barely done any web dev, so excuse my 1995 webpage, be gentle with my js is probably ugly. I've never done any javascript before, nor asynch stuff. Anyways I wrote a small js file locally and ran with node, and I am able to sort my array of objects by date, however same function is not working with my generatrix site even though the sort function is getting called.

![](https://thepracticaldev.s3.amazonaws.com/i/yi1c9sina9zbg56a9ybq.png)

Overall generatrix pulls refs of whatever repo using the github api with a callback func, then checks each branch date with another callback func. Last thing to do is to sort by date, and output to the text area as a link markdown format. Any help would be appreciated.

[Repo is here ](https://github.com/kodaman2/generatrix)

[Webpage here](https://kodaman2.github.io/generatrix/) I've added a bunch of console logs too.

![alt text](https://thepracticaldev.s3.amazonaws.com/i/v43jn213j8ywkat0nz0a.png)

As you can see on the console, sorting doesn't work. : (
Setup-01 is older than Setup-02

![alt text](https://thepracticaldev.s3.amazonaws.com/i/bc8hk4krks3tzejmb1aw.png)
Building Plausible: June 2019 recap
Tags: productivity
Published: 2019-07-05 09:13:35

---
title: Building Plausible: June 2019 recap
published: true
tags: productivity
canonical_url: 
---

I spent the second half of June back home in Estonia to recharge my batteries and reconnect with family+friends. Summer solstice is a huge celebration in Estonian culture so everyone seems to be on holiday at the moment, enjoying nature, good food and drinks. I haven’t had as much time for Plausible as I normally do, but I’m totally OK with that.

Still, some cool things happened with Plausible this month:

- 🚀 **Shipped public stats pages:** You can now show off all the hard-earned traffic to your site
- 🚀 **Added support for ?ref= query param:** Link tagging is a common practice to get accurate referrer information. This feature allows you to manually control the referrer.
- 💵 **MRR growth: 43.5%:** Monthly revenue is at $67.91, up from $47.34 in May.
- 👩 **1347 unique visitors:** Up from 1178 visitors in May. A lot of this traffic is organic from Google, Twitter, and the (now abandoned) [journal.plausible.io](https://journal.plausible.io) blog. I also do my best to participate in communities like IndieHackers which drives a lot of traffic.

I’ve also been working on [docs.plausible.io](https://docs.plausible.io) to make sure the product and features are crystal clear to everyone. I believe that good documentation is a competitive advantage, and I plan to spend more time improving the docs.

### Looking forward

My main project in July is taking part in the [IndieHackers 30 days of growth challenge](https://www.indiehackers.com/post/871a026ac6). This will be a good test of my persistence and growth skills. The goal I’ve set for July is to get 40 new trial signups.

In terms of feature work, you can check the public roadmap at [feedback.plausible.io/roadmap](https://feedback.plausible.io/roadmap). The features not necessarily in the order I’m going to tackle them because I’m always trying to prioritise the easiest and biggest wins first.

Hope everyone has an amazing July. Stay tuned for the next update!
Variables in Postman
Tags: postman, api
Published: 2019-07-05 00:04:50

---
title: Variables in Postman
published: true
tags: postman, api
canonical_url: https://stephencharlesweiss.com//2019-07-03/postman-variables/
---

I’ve written in the past about why I like testing my [APIs with Postman](https://stephencharlesweiss.com/2019-04-13/testing-api-with-curl-and-postman). Today, I learned that they have yet another feature that makes my life easier — Environment Variables.¹

Just like using a variable in a codebase to point to a piece of information that you want to reuse multiple places, Postman variables enable reuse without duplication. They create a single point of entry and management (which [I’ve written about as a feature in the past](https://stephencharlesweiss.com/2019-07-01/array-intersection-in-psql/)).

# Managing Scope

[![postman variables scope](https://stephencharlesweiss.com/static/85bceec191a5190c15ad5d99a64cafd6/48001/postman-variables-scope.png)](/static/85bceec191a5190c15ad5d99a64cafd6/48001/postman-variables-scope.png) Postman offers five different levels of scope¹ - which I’m sure will be useful for more power users. For me - the Environment Scope is where I care most — though I can see myself also benefiting from Collections in the future as I work on more and more projects.

With environments being the most useful at this time for me, that’s where I’m focusing.

# Managing Environments

To create an Environment, select the Gear icon in the top right of your Postman window and click on “Manage Environments” [![manage environments](https://stephencharlesweiss.com/static/e111d0ea941d4bccdd4ddf85002a2435/b9e4f/manage-environments.png)](/static/e111d0ea941d4bccdd4ddf85002a2435/92cc8/manage-environments.png)

From here, you can manage a single environment (or multiple). [![add environment variable](https://stephencharlesweiss.com/static/a4c91971d02a66c1d41220aba3b6f90c/b9e4f/add-environment-variable.png)](/static/a4c91971d02a66c1d41220aba3b6f90c/ad34c/add-environment-variable.png)

In this case, I’ve created a `HOST` variable so that I can easily switch between my local environment and hitting the endpoints in staging or production.

# Using Variables

Once a variable’s been saved, it can be included in the path bar - I did below for the `HOST`. [![use environment variable](https://stephencharlesweiss.com/static/1c651350f3266bd44829e4812ad902cb/b9e4f/use-environment-variable.png)](/static/1c651350f3266bd44829e4812ad902cb/2053a/use-environment-variable.png)

It can also be used in a Param or Header section. [![variable tool tip](https://stephencharlesweiss.com/static/062f9552276a089d0a270cf386e89cd6/1016b/variable-tool-tip.png)](/static/062f9552276a089d0a270cf386e89cd6/1016b/variable-tool-tip.png)

# Conclusion

Using variables is easy and makes managing different environments so much easier than what I was doing before - which included a mix of manual management and maintaining multiple APIs with the environment in the label.

# Resources

- ¹ [Variables | Postman](https://learning.getpostman.com/docs/postman/environments_and_globals/variables/)