teleren/devto huggingface dataset:
tflookup - Developer Diary Part 4
Tags: vue, frontend, tflookup
Published: 2019-06-05 14:09:08

Dear Diary!

So I finished my REST service which will deliver my search results. But what good is that without an appealing frontend.

After I was nearly blown away by the overwhelming good critics about [Vue.js](https://vuejs.org) at last year's [enterjs](https://www.enterjs.de/) I took the Vue-way immediately.

I think, Vue is *very* easy compared to other frameworks out there and also very well structured.

Also, it has proper Typescript support and good documentation.

So I [started a Vue project](https://github.com/dploeger/tflookup/tree/master/static) using [Vue CLI](https://cli.vuejs.org/) (which has an amazing new UI btw).

A simple test of the REST calls worked fine, but I wanted something more appealing.

Luckily, [Vuetify](https://vuetifyjs.com) has some nice Material Design components ready for Vue and also a nice autocomplete component. 

[This method](https://github.com/dploeger/tflookup/blob/master/static/src/components/Lookup.vue#L70) watches the query input field and uses the REST backend to fill the results. I used a delayed promise there to allow the user to input the complete search text before I use the text to search the backend.

The autocomplete than renders [a so-called "slot"](https://github.com/dploeger/tflookup/blob/master/static/src/components/Lookup.vue#L25) with the item results.

Selecting a result would trigger a location change to the actual terraform documentation page.

The hard thing here was to get my head around how Vue plugins work, how they work in *Typescript* and how Vuetify components and their specialities (like slots) work. But the good examples and documentation for Vuetify and Vue helped a great deal.

Yours
Dennis

*This post is one of five posts from the [tflookup developer diary series](https://dev.to/t/tflookup)*

*Cover Image: ["diary writing" by Fredrik Rubensson](https://flic.kr/p/ffFhz5)*
How to do Security Updates only with Yum in CentOS
Tags: centos, yum, security
Published: 2019-06-05 13:57:20

---
title: How to do Security Updates only with Yum in CentOS
published: true
description: Sometimes you just want to patch the critical issues when doing OS updates.
tags: CentOS, yum, security
---

This is a fairly basic "just the security updates, please!" guide for CentOS 6+.

This assumes you're `root` or have used `sudo su`.

First, you may need to ensure you have the yum security plugin:

```sh
rpm -qa | grep -i yum-plugin-security
```

If you don't, you can update it with the following.

```sh
yum install yum-plugin-security
```

Now let's check if there are updates:

```sh
yum --security check-update
```

If there are available updates, there will be results after this command.

To update, run the updater with the option `--security` to specify security updates only.

```sh
yum update --security
```

That's it!

_Is something badly out of date? Did this work for you? Please post a comment to help others who might use this for guidance. I originally wrote these instructions around 2013._
tflookup - Developer Diary Part 3
Tags: tflookup, rest, express, search
Published: 2019-06-05 13:53:31

Dear Diary!

Now that I have a documentation index, I could write a server, that serves that index and searches it. That server will ultimately also deliver my frontend application, because I'm too lazy to do it the microservices way right now.

The most easy and stable web server for Node I know today is [ExpressJS](https://expressjs.com) and that's what I used.

I'm mostly doing my projects in Typescript today, so that was my basic setup.

After the index has been created or read from my pre-rendered index, the [server](https://github.com/dploeger/tflookup/blob/master/lib/Server.ts) starts up, registers its endpoints and listens for requests.

One [very simple controller](https://github.com/dploeger/tflookup/blob/master/lib/controllers/IndexController.ts) would basically just output various areas of the index:

* [the complete index](https://tflookup.herokuapp.com/api/index)
* [All available vendors](https://tflookup.herokuapp.com/api/index/vendors)
* [The available object types (datasources and resources) for a vendor](https://tflookup.herokuapp.com/api/index/vendors/kubernetes)
* [All datasources by the vendor](https://tflookup.herokuapp.com/api/index/vendors/kubernetes/datasources) and [all resources by the vendor](https://tflookup.herokuapp.com/api/index/vendors/kubernetes/resources)

The interesting part came with the search endpoint.

I could simply return all items that include a certain query, but I wanted *weighted* results.

See, I'm no search engine expert and other people can do that way better, but I tried.

How could I weigh the search results? I needed to make a [decision workflow](https://github.com/dploeger/tflookup/blob/master/lib/api/DocumentationSearcher.ts#L49) for that and weigh upon the results

* Datasources and resources are much more relevant than Vendors
* Resources are more relevant than datasources (yes, that one is highly opinionated)
* Matches in names are more relevant than in descriptions
* If a match is found in the vendor **and** an object, the result becomes more relevant

Additionally, I blatantly steal the [string ranking algorithm](https://github.com/keeweb/keeweb/blob/master/app/scripts/util/ranking.js#L2) of the wonderful [Keeweb project](https://keeweb.info/)

I guess, that's as good as it gets currently.

Yours
Dennis

*This post is one of five posts from the [tflookup developer diary series](https://dev.to/t/tflookup)*

*Cover Image: ["diary writing" by Fredrik Rubensson](https://flic.kr/p/ffFhz5)*
exposing rabbitmq to world
Tags: rabbitmq
Published: 2019-06-05 13:52:23

I would like to expose my rabbitmq borker service to the world. Is there any way to block the source IP automatically using any intermediate firewall tools or in the local iptables in case of brute force attack. I would like to block the source IP automatically if the user tries to access the endpoint with wrong credential or vhost. Please suggest.
The Myth about Javascript ecossystem's descent into hell
Published: 2019-06-05 13:52:16


> Warning: grumpy programmer that's been working with Javascript since  Netscape 4 (1999 I guess)

I'm becoming a different kind of an old fart: the one who doesn't really miss the good ol' times when we didn't have so many any JS libraries and frameworks and everything was so simple (or so they say). I would take new JS technologies over the old, pre-NPM-projects era any day.

Yeah, I know it's sometimes frustrating to need to download zillions of dependencies so we can build a simple "Hello World" app. I can easily see the point of using Vanilla JS or jQuery even for greenfield projects. Someone who has pretty much only worked with JS libraries and frameworks such as React, Angular, Vue, etc may find jQuery or vanilla JS a breathe of fresh air. It may seem to be a great idea. After all, who needs so many external dependencies when we can just fetch data and render smaller jQuery UI components?

So, you just start rewriting that old overdone code with small JS files and simple HTML. After a couple of months/years later, you start realizing there's something not quite right about your code. You spot Javascript monsters breaking and turning the state into a spaghetti dragon firing meatballs. Then, one may think "what if we create a library that kind of lets us control page state more easily? Let's give it a name that sounds like it reacts to changes". Ring any bells?

There is a bright side to opting for vanilla JS, though. One may find, indeed, several cases where using a library is not necessary. Do you really need a "is-number-equals-to-zero" library? What about "return-false-when-object-equals-to"? Don't forget that maybe there is a reason why people choose NPM projects, etc, even guys that do web development since we didn't even have AJAX and jQuery was a pipe dream. 

Vanilla JS or plain jQuery are great for really small scripts, but remember:

* Most apps are usually seemingly small and trivial at first
* When you project grows beyond a certain point, vanilla JS may give you headaches
* Know as much about vanilla JS as possible, sometimes you can just use it instead of some library.
tflookup - Developer Diary Part 2
Tags: terraform, documentation, tflookup, markdown
Published: 2019-06-05 13:38:32

Dear Diary!

Hmmm... A lookup app. How could that work?

* I need a frontend obviously. And a backend, that does the heavy work.
* Frontend and backend should communicate through REST. What else?
* The backend should index the Terraform documentation
* Everything should be well tested of course

First things first. The absolute basis for the whole project is the documentation index. Without that, I could trash the whole thing.

So, how is the terraform documentation built actually?

The Terraform developers do that using a massive repository with multiple submodules for all providers:

{% github hashicorp/terraform-website %}

They write all documentation in Markdown with Frontmatter included and cramp everything together with [Middleman](https://middlemanapp.com/)

The Frontmatter includes titles, layouts, description and the information where the documentation lives in the documentation tree on the website.

So that's what I need.

I "submoduled" the terraform-website repository as well and wrote an [Indexer](https://github.com/dploeger/tflookup/blob/master/lib/api/DocumentationIndexer.ts), that walks through every datasource and resource documentation available for all providers in the terraform website.

That worked quite well (aside from some minor errors)[https://github.com/dploeger/tflookup/blob/master/indexErrors.txt], where people forgot how to write proper Frontmatter.

However, I needed to make some assumptions:

* Every vendor has a "website/docs" subfolder where its documentation lives
* There's only a datasource or a resource
* The datasources are living in a "d" directory, the resources in an "r" directory
* The titles are designed as "<provider name>: <datasource/resource name>"

I didn't go through all documentation files, but the documentation seems to be quite structured like this.

Using all this information, I could create my documentation index, which included the title, the name, wether it's a datasource or a resource, the description and a link to the real documentation page.

I included ways to store the indexed documentation, so the future frontend server wouldn't need to initialize all the required submodules for that. I also wrote a [script which updates the documentation](https://github.com/dploeger/tflookup/blob/master/updateIndex.sh) every night, which is running on my private server.

Okay, index done.

Yours
Dennis

*This post is one of five posts from the [tflookup developer diary series](https://dev.to/t/tflookup)*

*Cover Image: ["diary writing" by Fredrik Rubensson](https://flic.kr/p/ffFhz5)*
Enterprise Blockchain Development
Tags: blockchain, enterpriseblockchain
Published: 2019-06-05 13:33:12

---
title: Enterprise Blockchain Development
published: true
description: Here is an article to describe about the features of enterprise blockchain solutions
tags: blockchain,enterpriseblockchain
---

##Blockchain Technology 
A blockchain is a decentralized, distributed and public digital ledger that is used to record transactions so that any involved record cannot be altered ,without the alteration of all subsequent blocks.
##Types of Blockchain 
The blockchain is classified into two types as per the use.
1. Private Blockchain ( Enterprise Blockchain )
2.Public Blockchain

###Public Blockchain 
Public blockchains are completely open ecosystems in which anyone can take part in the network. The network also has an in-built incentive mechanism which inturn rewards participants for taking part more thoroughly in the system/network.

###Private Blockchain 
Private blockchain is not open for all and so people who want to participate in the private chain must gain permission. This is why these kind of blockchains are also called as permission blockchains.

##Features of Enterprise Blockchain 

###1. High Performance
Public blockchains cannot process 100 transactions per seconds.When it comes to telecom or other enterprise that needs 10,000 transactions per seconds and it is only possible by enterprise blockchain with following aspects.
Use-case of asynchronous flows
Uses faster consensus algorithms
Compartmentalizes different process effectively
Executes itself in optimized states
Utilizes parallelization

###2 . High Resilience
To ensure high availability, the network must be able to avoid issues which may lead to major outages. To have this level of resilience, the network should assume that failures are bound to happen and must be prepared to keep the network running during these situations.
Enterprise blockchain should be build in such a way that it should deploy redundant peer nodes, clustered ordering services, and replicate other working blockchain network without any confusions.

###3 . Privacy 
Privacy and security is obviously a huge need for enterprise-level blockchains. Since these are permission blockchains, all members are known entities and carefully vetted before they enter the ecosystem.

##Bitdeal - Enterprise Blockchain Development Company 
Bitdeal - Blockchain Development Company, which provides every enterprise related blockchain solutions and services for every enterprise and startups worldwide.They are known for their 100% proven results and services.
They provide 24 X 7 support system through which you can clear your doubts and get support from their Blockchain experts instantly. 

[**Get a free Consultation Now from Bitdeal !!**](https://www.bitdeal.net/blockchain-development)
What's in your cup?
Tags: discuss, coffee
Published: 2019-06-05 13:25:11

---
title: What's in your cup?
published: true
description: Running low on coffee, what do *you* suggest?
tags: discuss, coffee
---

As a 2-3 cups per day coffee drinker, things are dire... I'm down to my last four coffee pods!

So I got wondering, what are fellow devs drinking? Maybe it's worth picking up something new to try.

Share your go-to coffee (or tea) brands and varieties. What stores carry it and/or can it be purchased online?

Myself...

@ the office (K-Cup machine):
[Jumping Bean Coffee](http://jumpingbean.ca) "East Coast Roast" and "Deep Water Dark". Available direct from Jumping Bean, Amazon, and at Sobeys (eastern Canada grocery chain)

@ home (Aeropress):
T.A.N. Coffee "Hondouran", "Peruvian" and "Bolivian" blends. TAN is a small, Nova Scotia-based roaster.
Flat Design Cover Page: With Menu with Parallax
Tags: codepen, vue, design, javascript
Published: 2019-06-05 13:18:56

<p>This is a monochromatic flat design cover page with functionalities, written in VueJS.</p>

<p>This design is inspired by brutalism designing (Especially the menu part). I know that some people doesn't find it good, but I actually like it.</p>

<p>The landing page is inspired by many minimalist landing page existing on the internet.</p>

<p>The background on the off-canvas menu has parallax effect while scrolling. Its background may be changed to a normal image, to see clearly the parallax effect.</p>

<p>I just random links that is usually inside the menu. I did it, so that I could populate the Y-scroll, which I need to see the parallax effect.</p>

<p>As for the hamburger menu, I just used the same animation as I did the previous day, for Codepen Challenge.</p>

<p>Most of the functionalities are written in VueJS, but the animations are just CSS.</p>

{% codepen https://codepen.io/takaneichinose/pen/PvgjMZ %}
tflookup - Developer Diary Part 1
Tags: terraform, documentation, tflookup
Published: 2019-06-05 13:18:14

Dear Diary!

As a DevOps engineer (or SRE as the cool people call it) I'm working closely together with [Terraform](https://terraform.io) which is one more great open source based application from [Hashicorp](https://hashicorp.com) and allows to define an infrastructure in text files (read: *"Infrastructure as code"*)

Terraform has a great and extensive [documentation](https://www.terraform.io/docs), especially for the things you can do with the various available providers.

So, after understanding the basic hows and whats about Terraform and its [DSL](https://www.terraform.io/docs/configuration/index.html), I spend most of my time clicking my way through the Terraform documentation to reach the part of the specific resource or datasource I want to know the parameters for.

That is tedious.

I tried [optimizing that](https://dev.to/dploeger/data-sources-down-28ai), but that still wasn't fast enough.

I needed a quick lookup. An input field, I could jot a few keywords into and it would quickly guide me through to the right documentation page.

But hey, I'm a developer. I know my way around REST, web UIs and stuff, so this couldn't be that hard, right?

*Narrator*: "He was wrong"

So, my little diary. I will embark on a journey now that will bring me what I deserve the most. A lookup feature. For Terraform. I think, I will call it [tflookup](https://tflookup.herokuapp.com/)!

Yours,
Dennis

*This post is one of five posts from the [tflookup developer diary series](https://dev.to/t/tflookup)*

*Cover Image: ["diary writing" by Fredrik Rubensson](https://flic.kr/p/ffFhz5)*
ES6 for beginners - Part 4 (Rest, Spread) 
Tags: javascript, tutorial, beginners, webdev
Published: 2019-06-05 13:17:32

---
title: ES6 for beginners - Part 4 (Rest, Spread) 
published: true
description: 
tags: javascript, tutorial, beginners, webdev
cover_image: https://thepracticaldev.s3.amazonaws.com/i/dvbio7pgoh5l6epaoryp.png
---
*This is the fourth part of ES6 tutorial, created by our dev Bartosz. All of the previous parts you can find [here](https://www.2n.pl/blog) :).*

##REST

What is **rest** in ES6? The rest parameter syntax allows us to represent an indefinite number of arguments.
We know that in JavaScript functions can have any number of parameters. Besides, we do not have to give everyone an argument. This was mentioned in [JavaScript Part 17](https://www.2n.pl/blog/javascript-part-17).
Now let's say that we have a function that takes an unknown number of parameters for us. Example of simple addition of several arguments by the user when we do not know about its number. Using the standard before ES6, we could do it in the following way.

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

Since the arguments are not stored in the array but in array-like format, we had to create a new array consisting of arguments. ES6 makes it easy for us to do the job using the **rest** parameter.

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

Using the **myAdd function**, we can add an unlimited number of arguments. The reason for this is that by using the three dots **...** and the **nameOfparameter**, all arguments will be thrown into the array.

![](https://2n.pl/ckeditor_assets/pictures/92/content_es5-1.png)

Also, we must take care that the rest parameter is used correctly, always at the end of the parameters passed. This is since, it will not just work. The error we receive will certainly remind us of it.

![](https://2n.pl/ckeditor_assets/pictures/93/content_es5-3.png)

##SPREAD

It allows an array of arguments for elements calls (for array calls) or elements (for array literals) are expected or an object expression to be expanded in places where zero or more key-value pairs (for object literals) are expected. Sounds complicated? Let's look at a few examples of how we will use it.

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

![](https://2n.pl/ckeditor_assets/pictures/94/content_es5-5.png)

As you can observe with great ease we can combine the arrays.

In the next post, I will talk about array helper methods so stay tuned! Thank's for reading and don't hesitate to express your opinion on this post - all of your feedback will be appreciated :).
Weekly Picks #78 — Development Posts
Tags: javascript, webdesign, webdev, react
Published: 2019-06-06 10:11:28

---
title: Weekly Picks #78 — Development Posts
published: true
tags: javascript,webdesign,webdev,react
canonical_url: https://medium.com/daily-now/weekly-picks-78-development-posts-80054350a99b
cover_image: https://cdn-images-1.medium.com/max/1024/1*FR21tWsqt4RfmwYq1yXDLg.jpeg
---

> No growth hack, brilliant marketing idea, or sales team can save you long-term if you don’t have a sufficiently good product.

- [Research: Indian Coder is better than Chinese, but very far from American coder](https://app.dailynow.co/r/9af1e3ad3b66810bab350ab841c1ef37) by [Michail Athanassiadis](https://medium.com/u/4f239d7d14ec)
- [8 Useful JavaScript Tricks](https://app.dailynow.co/r/81f7d3a1945796e4bd2948857f01d2db)
- [Stay Healthy as a Developer](https://app.dailynow.co/r/75f69ae8dac64b737e56ea63568d3f62)
- [Ant Design 4.0 is in progress!](https://app.dailynow.co/r/13bc0ca84ba1c60cbee8b621bbea42c0) by [zombiej](https://medium.com/u/a9ddf45c6fa3)
- [Software Development Trends in 2019](https://app.dailynow.co/r/19c68ff46d455ca55a9b17179b84f1b1) by [Stephanie Donahole](https://medium.com/u/7bb33cd2653e)
- [John Wick: 5 Life Lessons](https://app.dailynow.co/r/89bab051cc4e2517dcb3cbf6425a4bb7) by [Anthony Galli](https://medium.com/u/301bfb8fbcbe)
- [Fabulous — CSS properties editor sidebar in VSCode](https://app.dailynow.co/r/095196750775deeef97e55ba81c283d1)
- [2 (+1) Reasons To Not Buy The New MacBook Pro, Aside From Price](https://app.dailynow.co/r/2b7d974f0442c20668911f415aa70baf) by [Cameron Frye](https://medium.com/u/c663f1ce81a1)
- [Tricks to get you coding ?‍? again when you aren’t motivated to.](https://app.dailynow.co/r/06955f3315e7a49d6f3bf72ac3bb0437)
- [Move Over Redux](https://app.dailynow.co/r/235d0440a2971596a33c35911e48376f) by [Matt Dionis](https://medium.com/u/6387214b750d)

* * *

[_Thanks to Daily_](https://www.dailynow.co/) _developers can focus on code instead of searching for news. Get immediate access to all these posts and much more just by opening a new tab._

[![](https://cdn-images-1.medium.com/max/1024/1*7bwIhcH467BKX5Ni8XWpQg.jpeg)](https://www.dailynow.co/)