teleren/devto huggingface dataset:
Monitoring at HelloFresh: Architecture
Tags: monitoring, prometheus, thanos
Published: 2019-06-15 10:37:26

---
title: Monitoring at HelloFresh: Architecture
published: true
description: Monitoring at HelloFresh Part 1: Architecture
tags: monitoring, prometheus, thanos
---
I recently wrote how the [monitoring architecture](https://engineering.hellofresh.com/monitoring-at-hellofresh-part-1-architecture-677b4bd6b728) looks like at HelloFresh  using [Prometheus](https://prometheus.io) and [Thanos](https://thanos.io) on Kubernetes.

I've shared some of the challenges we've been into and how we've managed to solve them, fell free to check that out ^^.

It worths mentioning, the upcoming articles:
- How we operate the monitoring system
- How we automatically instrument http services

Stay tuned, cheers!
An observation about UX (from a noob) - Twitter likes vs the rest
Tags: ux, design, discuss
Published: 2019-06-15 09:26:17

Had an interesting conversation with my fiancé recently about how we use likes on social media. 

It arose through the revelation that I don’t ‘like’ things on twitter, as opposed to him who likes many of the tweets he sees.

I explained that I only ‘heart’ things on twitter that I intend to go back to later, and if I like it i’ll retweet it. Effectively I use the like function as bookmark feature. 

(Yes I know Twitter now has a bookmark feature)

“But it’s a like.” He replied.
“You like things on Facebook and Instagram that you don’t intend to go back to later.” He followed up with.

He was right, so why was Twitter different?

**the context of which the feature is presented is different from the rest**

When you open up your twitter account, front and center are four key tabs. Tweets, Tweets & replies, Media, and Likes.

One of the first things the app shows you, is how to instantly access a list of things you have liked, which to me, immediately changed the setting of the like.

In Facebook and Instagram, I like something for the person who posted it, it’s my way of saying ‘good job’ and I’m not aware of a way to access a list of posts i’ve liked in Facebook and while this feature now exists in Instagram, it’s hidden away in the settings. 

So advertising upfront that you have the ability to go back to everything you’ve liked changed for me how I treated it. 

When I can like anything on facebook and know that the likes just disappear into the ether there is no accountability. Knowing that the likes are going into a list makes me feel like I should be smart with them, or scarce with them. 

I don’t want to have to rely on that list to find a specific tweet I liked three weeks ago only to have to wade through hundreds of tweets before I found it.

Or you can have your likes be public, I don’t want to have to think twice about liking a tweet, probably of Chris Hemsworth topless, that I might not want people to see that i’ve liked.

I know I’m the minority here, and have clearly over thought this specific functionality but it begs the question why is it like this? 

Aren’t these features wrapped in multiple layers of UX and customer journeys with the intent of making me use them more? And yet it’s had the opposite effect on me.

Just something weird my brain was mulling over. I work in IT and so i’m exposed to these concepts but of course have know idea what i’m on about. I just know enough to be dangerous. 

Your thoughts?

{% twitter 1134980546340085762 %}
How to investigate memory usage on ElastiCache for Redis
Tags: redis, aws, elasticache
Published: 2019-06-15 08:42:08

Recently, I faced a problem which memory usage on ElastiCache for Redis becomes huge.
This post describes how we can investigate such a problem (which keys are bottlenecks on ElastiCache).

## Export and download a Redis backup

At first, to analyze, we have to download the `.rdb` file from our ElastiCache following [the official guide](https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/backups-exporting.html).

When exporting an ElastiCache backup, please be careful that the region for S3 must be the same as the one for the backup.

## Analyze `.rdb` with redis-rdb-tools

After downloading the file, we can analyze it with [redis-rdb-tools](https://github.com/sripathikrishnan/redis-rdb-tools).

For example, if we wanna generate a memory report, we can do it as follows.

```shell
> rdb -c memory /var/redis/6379/dump.rdb --bytes 128 -f memory.csv
> cat memory.csv

database,type,key,size_in_bytes,encoding,num_elements,len_largest_element
0,list,lizards,241,quicklist,5,19
```

If your `.rdb` is too large (it may be difficult to open the csv file), you could also generate a sampled report like:

```shell
> rdb -c memory /var/redis/6379/dump.rdb | ruby -ne 'print $_ if rand < 0.1' > memory.csv
```

Of course, `redis-rdb-tools` supports features other than generating a memory report.
For more information, please see the [README](https://github.com/sripathikrishnan/redis-rdb-tools).

## Summary

- We can export and download a backup file easily with ElastiCache and S3.
- We can analyze a `.rdb` file easily with a tool like `redis-rdb-tools`.

## References

- https://docs.aws.amazon.com/AmazonElastiCache/latest/red-ug/backups-exporting.html
- https://github.com/sripathikrishnan/redis-rdb-tools
Lesson 5 : Operators In Java
Published: 2019-06-15 08:05:15

_Operators_ are the special symbols which perform any operation on one or more operands : 

 ![Alt text of image](https://1.bp.blogspot.com/-APveUDUjCf0/XQSgfnHTeaI/AAAAAAAAIO8/6r7hFDndyIkBejoVw3Dx2gA4m0d6zlwiwCLcBGAs/s1600/Untitled.png)
__1- Arithmetic operators :__


  ![Alt text of image](https://1.bp.blogspot.com/-S_4stiNlKWI/XQShl4wugcI/AAAAAAAAIPE/w_X4vxaRIrQ2Ijrv1aNZU-vLXzKc2qzaQCLcBGAs/s1600/2.png)

__2- Assignment operators :__ 

 ![Alt text of image](https://1.bp.blogspot.com/-IW9yNJ8jiys/XQSigwyLT3I/AAAAAAAAIPM/8J9HkU3cvPAH9si61PKmLhlMSG0RXj6mwCLcBGAs/s1600/3.png)

__3- Comparison operators :__

 ![Alt text of image](https://1.bp.blogspot.com/-18EAPRyVKGI/XQSjFGdTLoI/AAAAAAAAIPU/shPcVhz14mQ7tAa4z4vV_j3uty3C_TxzQCLcBGAs/s1600/4.png)

__4- Logical operators :__ 


 ![Alt text of image](https://1.bp.blogspot.com/-ZHyXqU7n9gE/XQSjcnIUqaI/AAAAAAAAIPc/uxB1hN65QlQhKftI2yFNpXF78C7cEVlsQCLcBGAs/s1600/5.png)

__5- Bitwise operators :__  


 ![Alt text of image](https://1.bp.blogspot.com/-QCH0538cQas/XQSkWHaZh_I/AAAAAAAAIPk/3Ha0I4fYv0ctq0tGiXyrUFWJGuyDsNxKgCLcBGAs/s1600/6.png)
Tips to start speaking at conferences?
Tags: discuss, career
Published: 2019-06-15 07:58:58

So I was lucky enough to talk at RedHat DevNation in SF a few years back, and although they bungled the audio on the recording overall I had a great experience.

This week I attended The Lead Dev conference in London and it was awesome and really inspired me to have another crack at conference speaking.  I'm a confident public speaker and so I'm not worried about the talk itself.

I was hoping the community would have some hints and tips on finding speaking and panel opportunities? Last time I just googled around to find relevant conferences that had a CFP open.  Surely there's something better?  Is there a site somewhere that lists all the CFPs that are currently open?

And a bit of a stretch, does anyone who's been asked to speak (e.g. direct request as opposed to CFP) have any tips on what they've been doing (social media, blogging etc) to get a profile so conferences come to you.

Thanks in advance :)
Tips to switch to Gutenberg – when your resources are ready
Tags: internet, gutenberg, wordpress
Published: 2019-06-18 07:37:31

---
title: Tips to switch to Gutenberg – when your resources are ready
published: true
tags: Internet,Gutenberg,WordPress
canonical_url: https://kevinhq.com/tips-to-switch-to-gutenberg-when-your-resources-are-ready/
---

Tips and tricks to move to Gutenberg when your resources are ready to do so. Before switching to Gutenberg Make sure your theme fully supports Gutenberg blocks This is the most important. This way, when you switched to Gutenberg, you won’t mess up your site looks. I switched to Gutenberg after I read on them… 

[Read More »Tips to switch to Gutenberg – when your resources are ready](https://kevinhq.com/tips-to-switch-to-gutenberg-when-your-resources-are-ready/)
Google Assistant now supports "Open/Close" devices
Tags: assistant, ifttt
Published: 2019-06-15 05:41:54

---
title: Google Assistant now supports "Open/Close" devices
published: true
tags: assistant, ifttt
series: Blog-A-Day in June
---

Sometime since I wrote [this post](https://dev.to/samthor/disassembling-apps-to-ok-google-my-garage-132j) about using Google Assistant to open and close my garage door, Google has gone through and added a few more device types. 🆕

Go, [check out the post!](https://dev.to/samthor/disassembling-apps-to-ok-google-my-garage-132j)... tl;dr: in my house, you can say "Ok Google, open the garage door" and the door opens. 🏡🎉

## IFTTT commands

At the time, I used If-This-Then-That. IFTTT is easy, and it just adds random strings to your Google Assistant "profile" that it can match. Additionally, if your Google Home devices have multiple users on them (which in my case they do: myself and my partner), anyone else can trigger these commands too.

So using IFTTT, you could add a command like "Ok Google, do the dishes" which calls a REST API or anything IFTTT can do. But the major downside of IFTTT is that it has no real notion of 'failure': if your REST API returns a 404/500 etc, IFTTT has no real way to pipe that back to you, and will only say one fixed string.

## Assistant Devices

For the more complex approach of devices 'properly' connected to your Assistant account (think light bulbs which are fully integrated into its ecosystem), Google did not yet support the "open" or "close" verbs.

Some folks created posts which talked about how you could control your doors by saying "Ok Google, turn my THING on" or "... THING off" (pretending to be a _smart plug_), but the verbs don't make sense.

# The Plan

So over the next few days, I'll be working out how to emulate a real device that Google knows about, removing IFTTT support from my door, but emulating an attached device. This is possible because Google now supports:

* the [GarageDoor type](https://developers.google.com/actions/smarthome/guides/garage)
* and the [OpenClose trait](https://developers.google.com/actions/smarthome/traits/openclose).

15 👋
Is it lazy for someone to make a site from a template?
Tags: discuss
Published: 2019-06-15 05:26:30

---
title: Is it lazy for someone to make a site from a template?
published: true
tags: discuss
---

Hello
A beginner here. When making a site do you make it from pure nothingness or use the already existing sources online to make one. Is it also lazy for someone to make a site using a template? I get a feeling that it doesn't come out as original to use an online template.
Color You console, with iPrint
Tags: iprint, javascript, node
Published: 2019-06-15 05:16:18

---
title: Color You console, with iPrint
published: true
description: iPrint, cool console logger
tags: iPrint, JavaScript, Node.js, JS
---
# iPrint
Hi, cosole.log(value);
is cool 😎 but it is very large syntax to, type.
And,  
how cool if you have to just do type
```
  iPrint('Hi');
```
and adding color to the console?
😲

## Here you are!

iPrint is the cool console logger.

iPrint gives color to your "console"!


## Command Line Usage
For NPM
```
  npm install iprint
```
or
```
  npm i iprint
```
# Example
```

  var iPrint = require('iPrint').iPrinter;

  iPrint('Hi, everyone');

  iPrint('Hi everyone - Magenta Color','magenta');

  iPrint('Hi, everyone - Blue Background','bgblue');

  iPrint('iPrintDefaultColor','cyan'); // Changes default output color from 'blue' to 'cyan'

  iPrint('Hi, default color changed form blue to cyan');

```

## General Syntax

Just type as follow

..1. To just print the string (default color is blue)
```
    iPrint(value);
```
..2. To add color to your string
```
    iPrint(value,colorValue);
```
..3. To add background color to your string
```
    iPrint(value,backgroundColorValue);
```
..4. To change default color to your string
```
    iPrint('iPrintDefaultColor',colorValue);
```
  'iPrintDefaultColor' is strict notation of changing the default color of output string.

  Here after output's default color will be changed.

# Color Values
```
    iPrint(value,colorValue);
```
  1. colorValue = 'blue'
  2. colorValue = 'red'
  3. colorValue = 'green'
  4. colorValue = 'yellow'
  5. colorValue = 'cyan'
  6. colorValue = 'white'
  7. colorValue = 'black'
  8. colorValue = 'magenta'

# Background Color Values
  ```
      iPrint(value,backgroundColorValue);
  ```
  1. colorValue = 'bgblue'
  2. colorValue = 'bgred'
  3. colorValue = 'bggreen'
  4. colorValue = 'bgyellow'
  5. colorValue = 'bgcyan'
  6. colorValue = 'bgwhite'
  7. colorValue = 'bgblack'
  8. colorValue = 'bgmagenta'
How can I config the ngix server in production instead of webpack-dev-server?

Tags: webpack, react
Published: 2019-06-15 04:01:00

Hello this is my first post here and i am a beginner in this production type environment, and basically i have no any experiences in any production things. We are working at a project and we have  used the webpack-dev-server to serve our webpack build files, and as we know one thing that we shouldn't use "webpack-dev-sever" in production but we are using it because we don't know how to configure properly on standard server like Nginx(we are using "Nginx"). If anyone of you guys have experiences in this field anyhelp o would be really grateful.
I have asked same question in stackoverflow, but couldn't solve issue i am getting with the responses i got. Here is the link to stackoverflow.

https://stackoverflow.com/questions/56585164/webpack-production-issue-reactjs

Thanks.
Building Blog with Bocadillo - Settings
Tags: python, programming, bocadillo, tutorial
Published: 2019-06-15 03:41:37

**GitHub Repository for this series**: https://github.com/aligoren/bocadillo_blog

----

Using Bocadillo, you may need to configure something. For example, you want to set allowed hosts for your API calls. `.env` files are good to save credentials.

This is a `.env` file;

```dotenv
DEBUG=True
DATABASE_URL=postgresql://localhost/myproject
SECRET_KEY=43n080musdfjt54t-09sdgr
ALLOWED_HOSTS=127.0.0.1, localhost
```

Don't commit `.env` file to your git project.

## settings.py File

Actually, the name doesn't matter. But we chose this name to easy understanding. You will store your constants like MailChimp secret key.

For example, we set a default title for this blog and get it.

We'll create **settings.py** under the root folder.

```python
from starlette.config import Config

config = Config(".env")

REDIRECT_TRAILING_SLASH = True
```

We'll also create a **.env** file.

```dotenv
Title="Dev.to Blog"
```

For example, we want to access settings from the app.py file. We need to import it.

```python
from bocadillo import App

import settings
```

Now our app will change like that;

**asgi.py** file

```python
from bocadillo import configure
from blog.app import app

import settings

configure(app, settings)
```

**blog/app.py** file

```python
from bocadillo import App

import settings


app = App()

@app.route("/")
async def index(req, res):
    title = settings.config.get("Title")
    res.text = f"Site Title: {title}"
```

We can run our project now.

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

This isn't important yet. But we will need to use settings. Because we want to write reusable components. Our philosophy should be "write once, use everywhere".

You may want to separate layers of your project. Like data, entities, presentation, etc.

You can skip this instruction.
I chalenged fifty-nine 9x9 grids Sudoku by OCR 
Tags: ruby
Published: 2019-06-15 03:33:25

## Tools used
・Ruby
・RMagick(ImageMagick)


## Process
Process is roughly divided into three.

①Recognize one cell
②Recognize numbers in cells
③Calculate the overlap of 9x9 grid from the positional relationship of cells

### URL
https://www.sentohsharyoga.com/puzzle/sudoku_multi/image/free_size
An overwhelmed front end developer in need of a brain reboot!
Tags: mentalhealth, discuss
Published: 2019-06-15 00:14:44

---
title: An overwhelmed front end developer in need of a brain reboot!
published: true
description: what can you do when you are overwhelmed over and over in the front end developer? 
tags: mental-health, discuss
---

Recently, I have been utterly overwhelmed with many front end news, posts, top tips, “see what you can do with x and y”, learn more javascript, learn...

My brain is screaming “Stop!”. This is where I cannot complete any project I have been planning for over two years. My writing have suffered, my self esteem drops off a cliff, my confidence is nowhere where I would have like it to be.

A question for you all, how can you get back on track? Is it a matter of a small selection of people / blog to follow and go on from there? What are your thoughts?
Six Business Reasons You Need a More Diverse Data Science Team
Tags: datascience, machinelearning, management
Published: 2019-06-15 00:13:06

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

To quote DJ Patil, the first Chief Data Scientist of the United States, the most successful organizational transformations are anchored in an approach of data science and the application of AI and ML, as a team sport. 

Teams looking to expand into this space must include a breadth of roles, skills, and responsibilities, not just one person with a PhD in Computer Science. 

What this does for us as a business:

1. This removes the pressure from any one person to deliver “the AI”.

2. It invests in employees to learn new skills that will bring value to their career and their team, learning in the best way that works for 
them.

3. It requires teams to work together to develop advanced products that could have impacts at scale that one perspective would miss. If you are a global company, you must have global representation at the table. 

4. It mitigates potential risks by encouraging diversity of thought and problem solving to challenge how “best” to solve a problem.

5. It immerses all members of a team to understand what *kinds* of problems AI and ML can solve. This is *key* for ML and AI adoption in a company and is hardest to teach: how to recognize the kinds of problems these algorithms can solve and how to frame a problem as an AI or ML experiment is the first step in understanding how to build, test and design these systems.

6. It forces us to question who we are bringing together to solve problems. Does a specific algorithmic change in a deployment lead to a drop in users interacting with a feature? You’ll need someone from the user experience team at the table to help you understand how the constraints you placed on the problem are affecting your desired outcomes.
Sync a Forked Repo
Tags: git, vsc, fork
Published: 2019-10-07 12:01:35

---
title: Sync a Forked Repo
published: true
tags: git, vsc, fork
canonical_url: https://tech.serhatteker.com/post/2019-06/sync-forked-repo/
---

Update a fork of a repository to keep it up-to-date with the upstream repository.

1. Add the remote (original repo you forked) and call it `upstream`:
  ```
  $ git remote add upstream https://github.com/User/original-repo.git
  ```
  or use `SSH`
  ```
  $ git remote add upstream git@github.com:User/original-repo.git
  ```

2. Fetch all branches of remote `upstream`:
  ```
  $ git fetch upstream
  ```

3.  Rewrite your master with `upstream`’s `master` using git rebase:
  ```
  $ git rebase upstream/master
  ```

4. Push your updates to `master`. 
  ```
  $ git push origin master
  ```
  You may need to `force` the push with:
  ```
  $ git push origin master --force
  ```

All done!
Magento 2 theme what is etc/view.xml
Tags: magento
Published: 2019-06-13 00:08:01

In this file, frontend related properties can be configured i.e. size of product images. Also a custom ID of image can be added here with its size and then this image can be generated in PHP.

Additionally, some properties can be set without overriding template files :

``<vars module="Magento_ConfigurableProduct">
 <var name="gallery_switch_strategy">replace</var>
</vars>``

Now, in `vendor/magento/module-configurable-product/view/frontend/templates/product/view/type/options/configurable.phtml`, the variable `gallery_switch_strategy` is fetched like 

`<?php /* @escapeNotVerified */ echo $block->getVar('gallery_switch_strategy', 'Magento_ConfigurableProduct') ?: 'replace'; ?>`

So, instead of overriding a template file, we can use theme's `etc/view.xml`.

Theme's `etc/view.xml` can be used to exclude any `js` file, any `js` components or a complete directory containing static assets from bundling, like below :

``<exclude>
        <!-- js file -->
        <item type="file">Lib::jquery/jquery.min.js</item>
        <!-- Catalog level : js component -->
        <item type="file">Magento_Catalog::js/zoom.js</item>
        <!-- Dir level : exclude bundling for any static contents -->
        <item type="directory">Lib::modernizr</item>
        <item type="directory">Lib::tiny_mce</item>
        <item type="directory">Lib::varien</item>
        <item type="directory">Lib::jquery/editableMultiselect</item>
        <item type="directory">Lib::jquery/jstree</item>
        <item type="directory">Lib::jquery/fileUploader</item>
        <item type="directory">Lib::css</item>
        <item type="directory">Lib::lib</item>
        <item type="directory">Lib::mage/backend</item>
    </exclude>``
What's your favorite Easter egg you have ever hidden in your work?
Tags: discuss
Published: 2019-06-14 23:25:01

Most recently, I have been embedding quotes within random code doc blocks as a way to remind myself to have fun. They typically make me laugh years later when I find them.

Here is one from a recent cache clear command I created which displays anytime the command is called:

`It can take years to mold a cache. It takes only a fraction of a second for it to be shattered...`

What have you been hiding around your codebase?