teleren/devto huggingface dataset:
Introducing #25DaysOfServerless, an Azure Functions Challenge
Tags: serverless, dotnet, csharp, azure
Published: 2019-11-25 15:23:31

[![advent-of-serverless.gif](https://s5.gifyu.com/images/advent-of-serverless.gif)](https://gifyu.com/image/vNo5)

Hello Friends!  

We are excited to announce [#25DaysOfServerless](https://www.25daysofserverless.com), a 25-day event to create a 25 new serverless workloads leveraging [Azure Functions](https://azure.microsoft.com/services/functions?WT.mc_id=25daysofserverless-blog-cxa).

## Rules

Solve the daily challenge in the programming language of your choice. Then submit your solution via GitHub (and share it on Twitter), and we'll showcase the best solutions every week! 

If you're new to serverless, we'll have hints to help you! All you need is a GitHub account to post your solution and a sense of adventure.

## Example

> 'Tis the season for gift giving, and we need a solution to share images of our gifts! One problem though: we can only share png files.
>
> For this challenge, create an Azure Function triggered by Azure Blob Storage that will verify that each photo uploaded to our Azure Blob Storage container is a png; if it is not, delete the photo from the container.


We can create a simple [BlobTrigger in Azure Functions](https://docs.microsoft.com/en-us/azure/azure-functions/functions-create-storage-blob-triggered-function?WT.mc_id=25daysofserverless-blog-cxa) to solve this one in C#! 

```csharp
[FunctionName(nameof(GiftPhotoValidationFunction))]
public static async Task Run([BlobTrigger(_containerName)] CloudBlockBlob blockBlob, ILogger log)
{
    log.LogInformation("Validating Gift Image is a PNG");

    if (blockBlob.Name.EndsWith(".png", StringComparison.InvariantCultureIgnoreCase))
    {
        log.LogInformation("Confirmed PNG");
    }
    else
    {
        log.LogInformation($"Photo {blockBlob.Name} is not a PNG");

        log.LogInformation($"Deleting {blockBlob.Name} from container");

        await blockBlob.DeleteAsync().ConfigureAwait(false);

        log.LogInformation($"Deleted {blockBlob.Name}");
    }
}
```

## Get Started

Starting December 1st, visit https://www.25daysofserverless.com to find the daily challenge, and follow both [@AzureAdvocates](https://twitter.com/azureadvocates) and [#25DaysOfServerless](https://twitter.com/search?q=%2325DaysOfServerless&src=typed_query) on Twitter. 

If you're new to Azure, sign up for a [Free Azure Account](https://azure.microsoft.com/free/?WT.mc_id=25daysofserverless-blog-cxa) before [#25DaysOfServerless](https://twitter.com/search?q=%2325DaysOfServerless&src=typed_query) kicks off on December 1st!
Day 13 of⚡️ #30DaysOfWebPerf ⚡️: HTTP/2
Tags: webperf, performance, latency, webdev
Published: 2019-11-25 15:14:19

{% twitter 1198982112747180032 %}
{% twitter 1198982113976094720 %}
{% twitter 1198982115314032642 %}
{% twitter 1198982116383571969 %}
{% twitter 1198982117516087296 %}


---

This article was originally published on [sia.codes](https://sia.codes/). Head over there if you like this post and want to read others like it, or sign up for my [newsletter](https://buttondown.email/sia.codes) to be notified of new posts!
The 7 Most Popular DEV Posts from the Past Week
Tags: top7
Published: 2019-11-25 15:09:40

---
title: The 7 Most Popular DEV Posts from the Past Week
published: true
description: A round up of the most-read and most-loved contributions from the community this past week.
tags: icymi
cover_image: https://thepracticaldev.s3.amazonaws.com/i/sfwcvweirpf2qka2lg2b.png
---
Every Monday we round up the previous week's top posts based on traffic, engagement, and a hint of editorial curation. The typical week starts on Monday and ends on Sunday, but don't worry, we take into account posts that are published later in the week. ❤️


#1. Deal With It

If you're a JS developer, you'll need to understand event loops. In this post, Lydia explains even loops through a series of GIFs. 


{% link https://dev.to/lydiahallie/javascript-visualized-event-loop-3dif %}

#2. Not simple, not easy

Carolyn highlights the importance of creating inclusive documentation and shares a guide on how to make it happen - also a great opportunity to contribute to OSS!

{% link https://dev.to/meeshkan/how-to-remove-condescending-language-from-documentation-4a5p %}

#3. 100% Performant

Saurabh brought their Lighthouse performance score from a 43 to 100. In this post, they tell us how these improvement were made. 

{% link https://dev.to/saurabhdaware/i-rebuilt-my-portfolio-now-it-has-100-lighthouse-score-here-s-how-i-did-477a %}

#4. Export/Import

Samantha shows us the different ways of exporting modules and the corresponding ways to import them. 

{% link https://dev.to/samanthaming/javascript-module-cheatsheet-5b4o %}

#5. "One Size" Doesn't Fit All

Addy shares the benefits of adaptive loading and explains the signals used to help us understand what our users` constraints are.

{% link https://dev.to/addyosmani/adaptive-loading-improving-web-performance-on-low-end-devices-1m69 %}

#6. Real Talk

What are the first ten apps you'd download if you got a brand new MacBook Pro? John shares the first ten steps of their set up.

{% link https://dev.to/azure/the-first-10-macos-apps-i-install-in-2019-2bba %}

#7. Show The Code

Nicolas explains the benefits of using VS Code as a presentation tool and walks us through how to build our own in a step-by-step guide. 

{% link https://dev.to/nicoespeon/how-i-used-vs-code-for-my-talk-instead-of-keynote-or-powerpoint-36g0 %}

_That's it for our weekly wrap up! Keep an eye on dev.to this week for daily content and discussions...and if you miss anything, we'll be sure to recap it next Monday!_
A Life Changing Hobby For a Programmer You Should Try
Tags: balance, health, productivity, mentalhealth
Published: 2019-11-25 14:55:54

> Online is great. Condensed human knowledge in just some clicks away. But what about human experience?.. This is what my post about. A way to balance an IT lifestyle.


Hello, beautiful people! I am working as a programmer for more than 10 years. And more than half of that time I have a hobby I want to describe to you and suggest to try out.

It's called: Lindy Hop.
![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/dev8v3om3xrn7nuzes7i.png)

And here is a social demo:
{% youtube 2hVkU23aOgk %}

Generally speaking, it is a very pleasant way to spend your time. Let me share some of the reasons for it is a good idea to give it a try from a perspective of IT life.

## #. It's an Opposite To Sitting

We sit a lot. Sitting for a day is okay. Sitting for years is not. As IT-people we have lots of hours sitting.

And dancing is definitely a physical activity. It can be demanding as you wish. You can dance to faster tempos or to slower one. Also you can be more lazy or more crazy.

## #. Dancing is... fun.

It is just fun. It puts a smile on your face.

> Dancers were found to have higher levels of serotonin, known to boost moods in humans. ©

When coding is more about brain, dancing is more about body.

## #. Learning is... fun

For me this is a big deal. The process of «figuring out» is a whole journey! Learning to dance is fun. Usually classes happen once or twice per week.

Believe me, it is very different from staring at somebodies code. It makes your brain work in a totally different way. Which is gooood.

## #. It's Easy

You figure out the basics, you are ready to rock. It's up to you when you feel ready to nail at the dance floor. 

## #. It's Challenging

It is also a challenge you are facing. It's putting yourself out there. Expressing yourself. «Dancing like nobody is watching».

## #. It's a Worldwide Community

There are hundreds (thousands?) of communities all around the world. And there are social events. Being part of the community means you have an additional purpose while travelling. And there are small and huge events across the globe. You can fly there, you can learn and party there. It. Is. Amazing.

## #. It's Parties

This is what's it's all about! I like to put it like this. Lindy Hop, for me, is a celebration of a human being. If this article resonated with you — consider giving it a shot.

I believe to truly share everything it would be billion of reasons. I am doing this for more than 7 years. And hey! You should [check my Instagram account](https://www.instagram.com/rg.swing.dancer/). 🤗

See you on a dance floor!

[*] Photo credits go to [Eric Esquivel](https://www.facebook.com/eric.esquivel.007?hc_location=ufi). The dancers are [Audrey Da Sois](https://www.facebook.com/audrey.dasois?hc_location=ufi) and [Aurélien Lesdos](https://www.facebook.com/aurelien.lesdos?hc_location=ufi).

---
How do you practice safe public wifi access?
Tags: discuss, security
Published: 2019-11-25 14:50:45

---
title: How do you practice safe public wifi access?
published: true
description: What methods do you use to stay safe while browsing on public wifi?
tags: discuss, security
cover_image: https://cl.ly/b82115bbdfe5/Image%202019-11-25%20at%209.49.39%20AM.png
---

What methods and/or tools do you employ to stay safe while using the internet from a public wifi connection?

_[Image via Unsplash](https://unsplash.com/photos/X0EtNWqMnq8)_
Daily Challenge #124 - Middle Me
Tags: challenge
Published: 2019-11-25 14:42:28

---
title: Daily Challenge #124 - Middle Me
published: true
series: Daily Challenge
description: Place X in the middle of an N amount of Y.
tags: challenge
---
**Challenge**
Write a function that will take a key of *X* and place it in the middle of *Y* repeated *N* times.

Rules:
If X cannot be placed in the middle, return X.
N will always be > 0.

Example:
<pre>
X = 'A';
Y = '*';
N = 10;
Y repeated N times = '**********';
X in the middle of Y repeated N times = '*****A*****';
</pre>

Good luck!
***
_This [challenge](https://www.codewars.com/kata/59cd155d1a68b70f8e000117) comes from Capocaccia on CodeWars. Thank you to [CodeWars](<https://codewars.com/>), who has licensed redistribution of this challenge under the [2-Clause BSD License](<https://opensource.org/licenses/BSD-2-Clause>)!_

_Want to propose a challenge idea for a future post?  Email **yo+challenge@dev.to** with your suggestions!_
To mount Google Cloud Shell home onto Mac
Published: 2019-11-25 14:26:34

You can mount your Google Cloud Shell home onto your local filesystem in your Mac. First, [install FUSE and SSHFS](https://osxfuse.github.io/). Then run the command for the mounting point `~/my-cloud-shell`:

```
bash -c "$(gcloud alpha cloud-shell get-mount-command ~/my-cloud-shell)"
ls ~/my-cloud-shell
```

More instructions are available at the [Google Cloud Blog](https://cloud.google.com/blog/products/gcp/introducing-the-ability-to-connect-to-cloud-shell-from-any-terminal).
The ConfigMap Pattern
Tags: kubernetes, devops, docker, pattern
Published: 2019-11-25 14:23:20

In one of our articles, we discussed the environment variable pattern; how to define them, where to use them and their potential drawbacks. We briefly touched the configMap and Secrets resources as a means of injecting external configuration settings to the Pod (and its running containers). In this article, we have a deeper demonstration of the configMap and Secret usage patterns and best practices.

What’s The Problem With Using Environment Variables?
There are several considerations that you must take into account when deciding to use environment variables for all your configuration needs:

They are honored in multiple layers. For example, an environment variable that’s set in bash_profile of an image will be overridden if the same variable name was set in the Dockderfile. Even further, the same variable can be overridden in the Pod definition. Such behavior can cause hard-to-detect bugs when you’re not certain that your environment variable won’t get overridden by mistake.
Environment variables cannot be changed once the application is launched. Modifying an environment variable requires restarting the container to apply the new data but depending on your deployment pattern, this may or may not be desired.
More often than not, the external configuration is not limited to a bunch of variables, it spans throughout the whole configuration file. Think of php.ini, config.json, or package.json files. Those files need to be externally availed to the running container. The application expects to find its configuration file in a specific location rather than a set of environment variables.
Using environment variables for storing sensitive data is a security risk.

For more information: https://www.magalix.com/blog/the-configmap-pattern
How to get your local Django DB on Heroku
Tags: django, heroku, unix
Published: 2019-11-25 14:23:13

---
title: How to get your local Django DB on Heroku
published: true
description: 
tags: 
- django
- heroku
- unix
---

I was trying to push the data from a local Django app I was working on to Heroku without committing a DB dump to my Git repo, and kept running into problems. The command to make it work was so weird that I'm recording it for posterity:

```
./manage.py dumpdata | heroku run --no-tty "./manage.py loaddata --format=json -"
```
[PT-BR] Porque eu escrevo e porque vc deveria escrever tbm (Especialmente se vc é minoria)
Tags: motivation, brasileiras
Published: 2019-11-25 14:13:28

Bom dia galera :)
Mais um post traduzido pro meu povo Brasileiro.

**Hoje eu estou escrevendo sobre o porque eu escrevo.**

Eu comecei a codar mais ou menos a um ano e meio, e desde que comecei, passo um bom tempo no google, assistindo aulas e lendo posts como esse aqui.
E adivinha? A grande maioria desse material tem como autor um homem cis e branco. Se você é um homen cis e branco não se ofenda por favor, a maioria do material é ótimo, mas como sou mulher (E aqui nos Estados Unidos, sou considerada mulher de cor, por ser latina) eu não me sinto representada. E isso me trás inseguranças, tipo, será que tem mesmo lugar pra mim em tech? 


**E a resposta é, claro que tem!**
Graças as mulheres que estão por ai trabalhando por isso! Que compartilham suas jornadas e me inspiram a fazer o mesmo. E essa é uma das principais razões pela qual eu escrevo, para aumentar a representação feminina em tech! Para outros novatos se motivarem. Para mais imigrantes verem! 

**Fato é, eu sou um bebê quando o assunto é código. **Eu ainda nem consegui meu primeiro trampo de dev. Mas quando eu conseguir, não vai ser minha vitória sozinha. Vai ser uma vitória para todas que eu represento. E para todas que me representam.

Então, não importa se você é uma iniciante ou se você é uma dev de anos, COMPARTILHE! Compartilhe para inspirar, para ensinar e também para ser motivada, porque nossa comunidade é linda,e vão te ajudar em dias ruins.
E se você é aquele homem cis branco que eu mencionei lá em cima, por favor, torça pela gente! Compartilhe o que você sabe pra nos incentivar. Seja nosso aliado.


Isso é tudo por hoje pessoal,
Boa semana!

Beijos,
Pati
JustBreathe.xyz - Taking the anxiety out of guided deep-breathing
Tags: webdev, html, css, productivity
Published: 2019-11-25 14:06:00

There are a myriad of deep-breathing applications and websites out there that aim to alleviate stress, anxiety and improve overall well-being. Deep breathing can be a complex topic and most solutions out there provide a large number of options, settings and instructions depending on what the users want to achieve (for example calming anger, qualming an addictive urge, getting to sleep). Even worse, some apps have ads, videos and pop-ups.
As someone who has witnessed panic attacks, I wanted to create a deep-breathing app that removed the jargon and complication and would help a user in the midst of a panic attack to breathe calmy, slowly and deeply. Hence, JustBreathe.xyz was born.
![Simple deep breathing with JustBreathe.xyz](https://thepracticaldev.s3.amazonaws.com/i/7o722hdt4i24z24dk0k2.jpg)

JustBreathe is an ultra-minimalist web-app that works on desktop and mobile browsers. On the technical side it's made in basic HTML, CSS (including transitions) and a little JS. The code is as simple as the app itself. I chose a gentle, neutral colour-scheme and an expanding-circle visual cue. The app has three settings- shallow, medium and deep (all of which follow researched deep-breathing timing) which are activated with a simple button press. Outside of this, there are no sounds, no complicated settings and nothing to distract the user from *just breathing*.

By saving the JustBreathe web-app to their homescreen, a panicking user can simply hit the icon and start controlling their breath immediately. No noise, no jargon, no guided tour, just simple deep breathing. The absence of clutter is incredibly important and I hope that JustBreathe.xyz solves the problem of complicated apps being too much for a panicking individual in the midst of an attack.
Black Friday/Cyber Monday Deals (2019)
Tags: watercooler
Published: 2019-11-25 14:04:43

Hey everyone!

Was just thinking we could post a post together where people can link the best Black Friday/Cyber Monday deals that they've come across this year. Personally I'm looking for a decent coding laptop and good VPN, so if anyone comes across this stuff, please post away! 

If you're looking for anything yourself, comment below and I'm sure the awesome Dev community can help us out! :D
Porting Envoy To Windows
Tags: opensource, cloud, kubernetes, windows
Published: 2019-11-25 14:48:53

---
title: Porting Envoy To Windows
published: true
date: 2019-11-25 14:00:56 UTC
tags: opensource,cloud,kubernetes,windows
canonical_url: https://blog.yechiel.me/porting-envoy-to-windows-5db834d03982
cover_image: https://cdn-images-1.medium.com/max/1024/1*WaXzP3Jtw5KqJQmKFL1aPQ.jpeg
---

#### My Talk At KubeCon 2019

So, I did a thing.

For the past few months, I’ve been working on an exciting project at Pivotal.

Envoy Proxy is a popular Open Source edge proxy and graduated CNCF project. The only problem is, it doesn’t work on Windows (yet).  
Pivotal has been using Envoy for our Linux Cloud Foundry containers for a while, but we had nothing similar for Windows, so we got to work contributing an implementation back to the community.  
Others have expressed interest in the work we were doing, so at this year’s KubeCon in San Diego, my pair Bill and I presented a progress report.

You can watch it here:

{% youtube FGBBeyZ-p1k %}


* * *
Deploying a Project to Heroku that uses a Private Ruby Gem Repo on Gitlab
Published: 2019-11-25 13:41:23

---
title: Deploying a Project to Heroku that uses a Private Ruby Gem Repo on Gitlab
published: true
description: This is a quick guide to help you overcome authentication issues on Heroku when trying to use a gem in a private repository on Gitlab by using Personal Access Tokens.
tags: 
---

On a recent Ruby on Rails project deployed on Heroku, I needed to require a privately hosted gem on Gitlab. Without the proper authentication with Gitlab, this will result in the following errors trying to push to Heroku.

```
remote:        fatal: could not read Username for 'https://gitlab.com': No such device or address
remote:        
remote:        Git error: command `git clone 'https://gitlab.com/YOUR_ACCOUNT/YOUR_GEM.git'

```

To get this working, we need to provide authentication details to Bundler. We'll do this using Gitlab's Personal Access Tokens.


## Create a Personal Access Token on Gitlab

First you need to navigate to https://gitlab.com/profile/personal_access_tokens and create a token with `read_repository` access.

![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/92v3h62u5q6bhzliht6a.png)

**You will see this token once, so be sure to save it somewhere secure.**

## Configure Bundler to use your Token

You could add the following in your Gemfile:

```ruby
gem 'YOUR_GEM', git: "https://oauth2:YOUR_TOKEN@gitlab.com/YOUR_ACCOUNT/YOUR_GEM.git"

```

However, that would be exposing your access token in your main project's Git repository. Instead, you can set a bundler config variable and leave the entry in your Gemfile as:

```ruby
gem 'YOUR_GEM', git: "https://gitlab.com/YOUR_ACCOUNT/YOUR_GEM.git"
```

### Local Config

To do it locally in your project:

```bash
$ bundle config --local gitlab.com oauth2:YOUR_TOKEN
```

This will set a variable in `.bundle/config` that bundler will use to authenticate with Gitlab.
```bash
BUNDLE_GITLAB__COM: "oauth2:YOUR_TOKEN"
```

Make sure that the `.bundle` directory is added to your `.gitignore` file so this isn't stored in your repo.

### Heroku Config

Heroku supports the above bundler configuration feature as environment variables. Simply add your Gitlab token using the following command (*note: this will restart your app!*):
```bash
heroku config:add BUNDLE_GITLAB__COM=oauth2:YOUR_TOKEN
```

## Deploy to Heroku

Now that it's all setup, deploy away!
```bash
git push heroku master
```
Broken Layered Opacity And Transform Rotation
Tags: webdev, css, pwa
Published: 2019-11-25 13:35:28

---
title: Broken Layered Opacity And Transform Rotation
published: true
description: When developing my Memory Matching game, I came across both of these issues within a few minutes of each other. Here's how I solved the issues: Layered Opacity, then Transform Rotation in Safari.
tags: WebDev, CSS, PWA
series: Browser Details
cover_image: https://thepracticaldev.s3.amazonaws.com/i/82y10060newmwizr7upb.png
---

When developing my [Memory Matching](http://bit.ly/memory-matcher) game, I came across both of these issues within a few minutes of each other. Here's how I solved the issues with Layered Opacity (in general), then Transform Rotation (in the Safari browser).

To clarify

* The opacity issue was in all browsers (that I tested).
* The issue with transform rotation was only in Safari (that I tested).

Thanks to some amazing people on Stack Overflow, I got the issues resolved rather quickly ...

## Issue with Layered Opacity

Basically, I had set opacity to 0.85 on the "modal" that I was creating. I decided to create a 0.5 opacity wrapper that covered the remainder of the screen (this is something that I've done MANY times on several projects without issue) ... that's where the problem occurred.

What I got was a 0.5 opaque wrapper with an equally opaque modal ... ***not what I wanted***.

A quick search found ...

{% stackoverflow 13509036 %}

Problem solved ...

... got the app working the way I wanted.  Then I ***pushed to production*** and notified the world that I had a new game for people to try out. Loaded it onto my son's android ... while my wife loaded it on her iOS phone.

**"It doesn't work,"** said my wife.

Me, "it doesn't work?" It works on my linux machine. It works on Android.

Me again, "What's it doing?"

**"It doesn't work,"** said my wife.

After some careful questioning, the card-flip wasn't working. I then loaded the app onto my iOS phone so that I could say, ***"It works on my phone."***

It didn't work on my phone ...

## Issue with Transform Rotate

This whole project started with an article I came across that showed how to execute a card-flip with CSS: [Card Flip](https://3dtransforms.desandro.com/card-flip). The visual was exactly what I was looking for.

Everything was going well and my application doing what I expected.

Then, I tried to load the Progressive Web Application (PWA) on my phone ... and the card-flip broke. A rotation occurred, just showing the same image on both sides.

Another search came up with this ...

{% stackoverflow 44316609 %}

## Conclusion

Problem solved.

Had my wife load the app and verify that it was working. Reloaded it on my son's phone to verify I hadn't broken something else.

Notifications updated to tell everyone it was working correctly.

Wrote this article ...