teleren/devto huggingface dataset:
How to put graphs in your emails programmatically
Tags: bigdata, html
Published: 2021-02-27 01:25:37

Use Case: I run speed tests daily, and every week I'd like a report showing my speed results
Problem:  Javascript just doesn't work for email. You can make a website look great with a number of JS libraries that won't work once you email it.
Solution. I found 2 services, Image-charts.com, and quickchart.io that could relieve this problem by using a dynamically generated chart image


Email is a finicky thing. With email you can insert all sorts of HTML, however, pending your client, Javascript just doesn't work for email. I learned this while attempting to add a graph to an email I generate using NodeRed. I have a Speed test that occurs on the hour. I like to know that I am getting what I pay for as far as bandwidth is concerned. That said, the furthest I got on it was being able to take the CSV file and generate a table and shoot it in an email. I decided then to play around with Google Chart API. It was easy to get set up and looked great in my browser, but when I would inject it into the body of my email, and send it, well, Gmail did not like my graph. So after doing some digging, I found some very unfortunate news, don't expect ANY javascript to properly work in an email client. At this point, I was just going to accept defeat and deal with tables, but then I decided to spend some time and research it. I can't be the only person who had this problem. Turns out, I'm not. I found a fix, Well, 2 solutions. These solutions are image-charts.com and quickchart.io. Both services offer APIs to generate images of the data you provide to them. I played around with both of them, and they both have their ups and downs, but would both work for my solution. Rather than having a JSON object embedded on your page to generate an image, you instead pass the data into the query of the URL. You are essentially embedding a dynamically driven image on your page. Both clients have a Get and Post method, with the post method returning a shorter image URL. In my case, I have just enough data to keep it in the get command.  One thing you do have to watch out for if using a Git command is the number of characters you pass, as there are limits on how much data you can send to these APIs using get. I did reach the limit on image-charts.com's API and am going with quickchart.io to generate my chart for me.
The method '>=' was called on null.
Published: 2021-02-27 00:40:56

> Flutter - The getter 'length' was called on null, punkteanzahl_teamEins is only declared. But not initialized. So it is throwing null error. You should assign value to punkteanzahl_teamEins as Unhandled Exception: NoSuchMethodError: The getter 'id' was called on null. Receiver: null Tried calling: id 'The getter 'uid' was called on null' in flutter. 1. [Additional reading](https://www.xspdf.com/resolution/58042507.html)

In my case : one of my variables were not intialised i.e **double _bmi = 0;**
Como instalar Laravel en Mac OS
Published: 2021-02-27 00:35:51

Lo primero que tenemos que hacer es instalar homebrew, para eso seguimos los pasos en la página oficial.

También instalamos composer, lo podemos hacer a través de la página oficial [Link](https://getcomposer.org/download/), una vez instalado movemos composer hacia  /usr/local/bin para poder usarlo en cualquier lugar.

```php
mv composer.phar /usr/local/bin/composer
```

Luego de esto instalamos php y mysql:

```php
brew install php
```

```php
brew install mysql
```
Una vez hecho esto procedemos a instalar valet

```php
composer global require laravel/valet
```

Y también el instalador de laravel

```php
composer global require laravel/installer
```

Ahora añadimos esto a ~/.bashrc 

```php
export path="$HOME/.composer/vendor/bin:$PATH"
```
ejecutamos:

```php
source ~/.bashrc
```
Ya podemos crear nuestro proyecto de Laravel! 

```php
laravel new blog
```

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lsx30jin6zk7rncae4qq.png)
Better diff highlighting in git
Tags: git, programming, productivity
Published: 2021-02-27 20:10:36

---
title: Better diff highlighting in git
published: true
date: 2021-02-27 00:00:00 UTC
tags: git, programming, productivity
canonical_url: https://jhall.io/archive/2021/02/27/better-diff-highlighting-in-git/
---

A couple of weeks ago I introduced [Semantic Line Breaks](https://sembr.org/) as a way to improve the readability of richtext formats, like Markdown. One reader, Joel Clermont, wrote back with an alternative solution: `diff-highlight`. And not only did he write to tell me about it, but he [wrote a post](https://joelclermont.com/post/2021-02/better-diff-highlighting-in-git/) explaining it all!

I also came upon [`diff-so-fancy`](https://github.com/so-fancy/diff-so-fancy) which expands this capability even more, optionally providing:

- Prettier hunk indicators
- pretty-formatting the diff headers for each file
- Removing the leading `+` or `-` sign from each line, which are redundant when using colors
- customizable colors
- and more
How to pop out a specific stash from the stash list in Git?
Tags: git
Published: 2021-02-27 00:00:00

---
  title: How to pop out a specific stash from the stash list in Git?
  published: true
  tags: Git
  date: Sat Feb 27 2021 05:30:00 GMT+0530 (India Standard Time)
  canonical_url: https://melvingeorge.me/blog/pop-specific-stash-git
  cover_image: https://melvingeorge.me/_next/static/images/main-770357a53bccf2ee534f1914b200d19b.jpg
  ---
  [Originally posted here!](https://melvingeorge.me/blog/pop-specific-stash-git)
  
To pop a specific stash in git, you can use the `git stash apply` command followed by the `stash@{NUMBER}` command.

```bash
# Get or pop out a specific stash in Git
# "n" refers to the number in the list
git stash apply stash@{n}
```

For example, to list out all the stashes you have saved into the git stash you can use the,

```bash
git stash list
```

command.

It will show the list of stashes you have saved.

Then you can see something like this in the terminal,

![stash list](https://melvingeorge.me/_next/static/images/stash-list-b2f73f155d9ec729a9a3ec3d493c61ea.png)

As you can see from the above image, there are 3 stashes called `stash@{0}`, `stash@{1}`, and `stash@{2}`.

To pop out the `stash@{2}` you need to type like this to the terminal and press enter,

```bash
git stash apply stash@{2}
```

That's it! 😃

### Feel free to share if you found this useful 😃.

---
5 Steps to a Non-boring Standup Meeting
Tags: career, steps, advice
Published: 2021-02-26 23:49:52

> I think all of us have been in a meeting before that seems to go on for an eternity. Over the past year I have learned a lot about hosting standup meetings, and I am here to tell you all the advice that you need to have a non-boring standup meeting…keep reading!

## 1. Keep it brief 
There are days when your team may be in a talkative mood, but during my time hosting standup meetings I find that most the time it’s the beginning of the day and people are ready to get started on their work, or it is the end of the day and people are exhausted from their work. Keeping your meetings brief will make all your teammates/employees happy!

## 2. Have a plan
Being unprepared is no fun, neither for the person presenting or for the person listening. Making sure that you have an agenda for your meetings will make everyone feel at ease, organized, and competent. If you have your meetings at the beginning of the day, going over the schedule for the day during your meetings will make your whole team feel more prepared. If you have your meetings at the end of the day, try asking all your team members what they gotten accomplished.

## 3. Have some fun
Having some fun at your meetings, every once in awhile, will bring big payoff. This will make you seem more relatable and approachable. I do this by playing games occasionally or just chatting about something that is not work/school related during our meetings. If there is someone new in your team, I would suggest doing a fun icebreaker game (or just really the cheesiest thing you can think of). Even though this may be a bit awkward, it will help everyone feel like they are a part of the team and let them know that you are not afraid to have some fun.

## 4. Care for one another
This may sound like a no-brainer, but sometimes just asking simple questions to everyone like, “how was your day” or “do you need any help on X project” might be a good nudge towards teamwork. Lending help or giving advice when needed can really help build trust within a team and make everyone more comfortable with each other. I find that this also brings a sense of vulnerability. Even just caring about how someone answers “how was your day” is so important when trying to build trust in a team.

## 5. Challenge each other
Do you have a teammate/employee that has been wanting to read a particular book for over a year? Maybe someone who has been meaning to make a new recipe for a family dinner? Challenge each other to do those things! Encouraging one another to do the things in life that they have been putting off or “too busy for.” This is a great tool for helping everyone in your team learn and grow without feeling like they are taking time away from work or school.

> Thank you for reading my post and I hope that this advice helps you and your team. Go out there and host some very non-boring standup meetings!
Day 318 : New Type Of Something
Tags: hiphop, code, coding, lifelongdev
Published: 2021-02-26 23:30:09

_liner notes_:
- Professional : Pretty good day. Worked on a Web Component for a demo application I'm building. I'm using TypeScript to build it, so it's taking me a little longer. Then I got on a call with some co-workers to end the day and bring in the weekend. Really good to talk with everyone.

- Personal : Last night, I went through a bunch of tracks for the radio show. I also worked on my side project. I'm working on the ability for someone logged in to be able to upload image files. Been reading up some documentation on MDN. Looking into the regular file input element, a drag and drop option and maybe thumbnails and progress bars. This is a new type of something I've never done before and want to learn as much as I can.

![An aerial view above Brockton, England where you can see some houses and fields extend into the distance](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/o8pl28nfuc2pvddeut86.jpg)

Going to finish up getting the radio show together. I want to watch 'WandaVision'. The show is really good. I may watch another episode of 'Attack on Titan'. Then if I feel up to it, I may work on my side project. I'll probably do it because the file uploading is pretty interesting to me to get it worked out.

Have a great night and weekend!

peace piece
Dwane / conshus
https://dwane.io / https://HIPHOPandCODE.com
{% youtube jfaYWR2cyDc %}
NameError Error
Published: 2021-02-26 22:30:18

Hello. Please I am trying to write me first Flask program. Clicking the link to the server generated link, shows some error. 
NameError: name '_hello_' is not defined

Traceback (most recent call last)
File "/home/archibongid/.local/lib/python3.8/site-packages/flask/_compat.py", line 39, in reraise
raise value
File "/home/archibongid/Desktop/Python/training/Hello.py", line 2, in <module>
app = Flask(_hello_)
NameError: name '_hello_' is not defined

Please any advice on how to understand the error message please
What is the best approach for you to learn to program?
Tags: beginners, mentoring, question
Published: 2021-02-26 22:27:40

As my wife is learning to program with online courses. I noticed that she sometimes struggles with understanding of some concepts.

It's really hard for her to stay focused during theoretical lectures.

Practical tasks are really very generic. I noticed that she understands better if she sees some close-to-the-real-world examples. Not foo/bar ones.

I'm an experienced programmer, but I struggle to explain things simply. So I'm searching for ways to help her out on this journey. But it seems I need to learn how to teach better.

So I wonder, what is the best approach to learn that worked for you?

If you had a mentor, how would you want him/her to help you out?
(SOLVED) MongooseServerSelectionError: Could not connect to any Servers in your MongoDB Atlas cluster.
Tags: mongodb
Published: 2021-02-26 21:51:23

I recently had an issue connecting to a MongoDB Atlas cluster and was receiving the below error message:

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

Initially, I thought the error was due to my IP address and I ensured that my IP was whitelisted. The easiest way to do this is the “All IPs” whitelist of 0.0.0.0/0 but I also included my computer’s own IP.

However, I was still unable to connect. Finally, after some further research, I checked to make sure my internet settings weren’t preventing my connection. As I use Xfinity internet, the security settings were apparently set too high and this was the cause of the connection error. This is due to the router not allowing a connection to port 27017. The workaround here is to connect to your iPhone’s Hotspot and test your application therein.

Thank you!
The 3 most popular C++ posts of February 2021
Tags: bestofdev, cpp
Published: 2021-02-26 20:51:26

Each month starting from now I'm going to share the 3 most popular [C++ articles](https://dev.to/t/cpp/top/month) of the month. Popularity is derived from the number of reactions, and I try not to include multiple articles from the same author.

Feel free to share your favourite one in the comments.

***
[Sandor](https://dev.to/sandordargo) started a new series about one of the flagship features of C++, concepts.

{% link https://dev.to/jasonalkain/relearning-c-part-01-26i %}

***

[Jarrod](https://dev.to/jarrodconnolly) shares his experience with contributing to Node.js core. An interesting part of it, N-API allows developers to write native addons to Node.js in C or C++.

{% link https://dev.to/jarrodconnolly/contributing-to-node-js-core-2a5n %}

***

[Pradeepsingh](https://dev.to/bhatipradeep) shares two solutions to the knapsack problem.

{% link https://dev.to/edualgo/0-1-knapsack-problem-222d %}
Is there a process for getting insights from the developers in this community?
Published: 2021-02-26 20:20:26

Hey folks,

I'm a UI and UX Designer and would like to do a bit of research to understand front end/back end developers - but I know that there's universally some sort of guidelines towards posting surveys or a "listing" to find those interested in doing an interview. I believe it would be considered soliciting?

Anyway, I definitely don't want to get flagged and am wondering if there's a process to do this on Dev.TO, or maybe a sub place on here where it is allowed?
Fix Your dbt Concurrent Transaction Database Error
Tags: sql, database, datascience, testing
Published: 2021-02-26 20:17:03

![found on Unsplash](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tt53povfvubzm6s32blw.jpeg)

If you use Fishtown Analytics' [data build tool (dbt)](https://www.getdbt.com/) for data engineering and development, you may have increased your project's thread count. This is easily done in the Profiles.yml file under your **.dbt/** folder for various reasons, from [running `dbt test` faster](https://dev.to/corissa/4-quick-facts-about-dbt-testing-299o) to [configuring dbt projects for multithreading](https://blog.getdbt.com/how-we-made-dbt-runs-30--faster/).

###The Concurrent Transaction Error
But sometimes, increasing your thread count can lead to errors like this common database error showing a concurrent transaction conflict. 

```
Completed with 1 error and 0 warnings:

Database Error in model test_model (models/stg/test_model.sql)
  could not complete because of conflict with concurrent transaction
  compiled SQL at target/compiled/of_models/stg/test_model_column_name.sql
```
###A Potential Quick Fix
This fix doesn't work for every case, but if
a) you're not trying to multithread and
b) if you're getting this error and can't even run your models, it's a quick fix. 

**Try returning to a single thread for `dbt run`. Then you can increase your thread count when you're ready later.**

That's your quick fix for the dbt database error for running concurrent transactions. Happy programming!
Converting a website to support Multilanguage after development 
Tags: help, discuss, webdev
Published: 2021-02-26 20:01:54

Hello all, Jr. web developer here. I developed a website for a company about a year ago using basic HTML, CSS/Sass, and a little JavaScript and jQuery. It was one of the first larger websites I designed and developed so if I was to redo this site today I would approach it a bit differently. The company now wants the site to support Multilanguage, English being the default and 2 additional languages. 

Being a static site what are my options now that it's already complete? The site is roughly a dozen or so pages and really the only area that gets updated is the news section. 

How would you approach this? Any feedback is greatly appreciated, thanks!
Enterprise Tech Meetup with Jeff Lawson Co-Founder & CEO of Twilio
Tags: eventsinyourcity, twilio
Published: 2021-02-26 19:15:46

SIGN UP HERE: https://zoom.us/webinar/register/WN_LZH1iAz2Qk24IlSC8ve3uw

We're excited to welcome Jeff Lawson, Co-Founder & CEO of Twilio, for a fireside chat on "Unleashing Rapid Growth with a Developer Mindset" on March 11th at 2pmET. 

Jeff has developed a unique playbook on how to tap the full potential of software developers at Twilio, and will dive into:

- Why do developers matter more than ever? 
- How do you create a developer-led culture? 
- How do you attract and retain top talent in today's competitive environment? 
- How can developers help you make better decisions and close customers? 

​We'll also feature an enterprise startup demo from Elizabeth Lawler, Co-Founder and CEO of AppLand. AppLand helps organizations keep their software architecture aligned, clean, and secure through application observability and analysis tools purpose built for developers.
Obtaining A+ SSL w/ Caddy
Tags: caddy, web, tutorial
Published: 2021-02-26 19:29:58

Hi there, today I'm going to show you how to get an A+ on [SSL Labs](https://www.ssllabs.com/).

> Note: This tutorial is only usable with [Caddy Server](https://caddyserver.com/).

### The DNS CAA

The DNS CAA (or DNS Certification Authority Authorization) is a security mechanism that allows you to mark certain certificate authorities as trusted.

For instance, if you are using [Let's Encrypt](https://letsencrypt.org/) certificates, you would have to allow `letsencrypt.org` to make valid certificates for your domains.

To add this verification level, you must add a CAA record to your domain's DNS.

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

In text only, the record looks like: `your.domain. CAA 0 issue "letsencrypt.org"`

### Headers

To get the A+ score, you need to set up some headers as shown below:
```caddyfile
header {
    X-Frame-Options "Deny"
    Content-Security-Policy "
        default-src 'none';
        style-src 'self';
        script-src 'self';
        font-src 'self';
        img-src data: 'self';
        form-action 'self';
        connect-src 'self';
        frame-ancestors 'none';
        base-uri 'self';
        report-uri {$CSP_REPORT_URI}
    "
    X-Content-Type-Options "nosniff"
    Strict-Transport-Security "max-age=31536000; includeSubDomains; preload"
}
```
Let's see what all of this stuff does shall we?

 - `X-Frame-Options "Deny"`  disallows other pages or websites to add embeds, frames, iframes and objects referencing your domain. Alternatively of `Deny`, you can set it to `SAMEORIGIN` so you can use it on your website.
 - `X-Content-Type-Options "nosniff"` is used to prevent [MIME Sniffing](https://www.keycdn.com/support/what-is-mime-sniffing)
 - `Strict-Transport-Security "max-age=31536000; includeSubDomains; preload"` is forcing your domain to have a valid HTTPS certificate for the time period specified by the `max-age` parameter (one year in our case). If the HTTPS certificate is not present, the browser will display an error. The `includeSubDomains` directive is used so the STS is applied to all subdomains as well.
 - `Content-Security-Policy` is a wide range of policies to allow or not distant domains to load resources (such as CSS or JavaScript files). The provided configuration only allows for the current domain to load files which can be problematic in some use cases. To allow a domain to load resources, just add it after the `self`. E.G: `style-src 'self' CDN.domain.TLD;`

### Word of the end

Congrats!
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8jb5xfdb2w24jztm3je8.png)
You should be ready now. The only thing to do left is to test  your settings using a tool like [SSL Labs](https://www.ssllabs.com/).
AWS Lambda Go logging middleware example
Tags: aws, lambda, go, middleware
Published: 2021-02-26 18:58:23

---
title: AWS Lambda Go logging middleware example 
published: true
description: AWS Lambda Go logging middleware code example 
tags: #aws, #lambda, #go, #middleware
series: learning in public
---


> For experienced programmers: A recap is always welcomed.


> For beginners: you will have a description of what are and how middlewares work in a Go web app. Don't forget, the comments section is open. Leave a comment if you need more explanations.

*We will see what middlewares mean from a web application perspective.*


## What represents the middlewares in a web app?

Middleware is a way for defining the separation of concerns in an application (distributed or not). Sometimes is called "the glue" or "plumbing" since it helps "glue" together different services and passes data between them [[1]](https://www.webopedia.com/definitions/middleware/) [[2]](https://www.cleverism.com/what-is-middleware-and-how-does-it-work/). Web applications are used for executing a set of instructions before the request is handle by a controller. The instructions are usually to filter the requests (e.g. is this user allowed to access this page?), logging the request and the list can continue.


## How to implement a middleware in Golang?

**Requirement: Implement a logging middleware for AWS Lambda.**

Checkout this [repository](https://github.com/claudiunicolaa/aws-lambda-go-middleware-example).

Inspired by:
- [A Guide To Writing Logging Middleware in Go ](https://blog.questionable.services/article/guide-logging-middleware-go/)
- [Writing HTTP Middleware in Go](https://justinas.org/writing-http-middleware-in-go)
- [Writing Go Middleware for AWS Lambda ](https://www.zachjohnsondev.com/posts/lambda-go-middleware/)
- [Moesif AWS Lambda Go GitHub repository](https://github.com/Moesif/moesif-aws-lambda-go)
What was your win this week?
Tags: discuss, weeklyretro
Published: 2021-02-26 18:57:11

---
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
- Landing a new job
- Finding some (very) early signs of spring (maybe?) ... or whatever else might spark joy ❤️ 

---

Happy Friday!

![Nature](https://media.giphy.com/media/TcG7Tw3uq6tJS/giphy.gif)