teleren/devto huggingface dataset:
Docker Compose UI – Almost a Thing
Tags: tools, docker, dockercompose
Published: 2019-06-12 21:17:03

---
title: Docker Compose UI – Almost a Thing
published: true
tags: tools,docker,docker-compose
canonical_url: https://www.aheil.de/2019/05/30/3651/
---

I currently manage all my Docker containers in my servers via Ansible. However, either for setting up new containers, testing new images or debugging in the case of emergency, I ssh into my server and fiddle a lot with the shell.

#### Promising Web-based Docker Compose Management?

I came along [Docker Compose UI](https://github.com/francescou/docker-compose-ui) which provides a nice web-based user interface to work with Docker Compose. 

> Docker Compose UI is a web interface for Docker Compose.
> 
> The aim of this project is to provide a minimal HTTP API on top of Docker Compose while maintaining full interoperability with Docker Compose CLI.
> 
> The application can be deployed as a single container, there are no dependencies nor databases to install.

It comes as Docker image itself, which again makes it really easy to deploy. To test it locally, just check out the GitHub repository and run docker-compose up. 

![](https://i1.wp.com/www.aheil.de/wp-content/uploads/2019/05/image-13.png?ssl=1)

To get the demo project running was quite easy. But…

#### There is a Catch

- When I rolled out Docker Compose UI to one of my servers it still showed the demo projects even I changed the overall config 
- To do so, the documentation of the project is not the best 
- After grepping through the entire files, I did not find anything that gave me a hint where the demo projects might come from 
- To me (I might be wrong) it looks like the demo information is built into the Docker image 
- The GitHub project was updated the last time about 12 months ago

#### Conclusion

Docker Compose UI would be a very useful project. However, the project looks very abandoned to me. Although there are 12 contributors, the very last pull request is open since 2017. The readme was updated the last time in 2018. I might have a closer look into the project or fork it at one point. Until then, it has to stay on the bench.

Link: [https://github.com/francescou/docker-compose-ui ](https://github.com/francescou/docker-compose-ui)
Create an Eleventy (11ty) theme based on a free HTML template
Tags: serverless, beginners, tutorial, html
Published: 2019-05-30 14:00:59

In this video series, we'll take a look at what it takes to start with a free HTML template found on Google and convert it for use with a static site generator (SSG). We'll be using my personal favorite SSG [11ty](https://11ty.io).

For many people working in agencies or doing freelance, it's hard to make a transition from WordPress to something static. Themes are incredibly handy when using WordPress. You can still have the conveniences of templates and themes with a static site generator.

Many SSGs have themes available free or for low costs, but it's not too hard to convert any HTML theme into a theme on a SSG.

## Introduction
{% youtube z-o1W9ijUhI %}


## Tutorial 1: Project structure and initial templates

In this video, we'll tackle picking our theme and basic 11ty setup and configuration. After we move our assets and static HTML into our project, we install Eleventy via `npm install @11ty/eleventy` and create a `.eleventy.js` configuration file with some simple modifications.

{% youtube h6ZxRudaYIQ %}


## Tutorial 2: Creating a base template

In this video, we'll tackle creating the base template from which all our other templates will inherit. 

This template will contain our header and footer, as well as our page banners.

We set up the template and then use front matter to use the layout on each of our HTML pages.
{% youtube iWivBpYmOaQ %}


## Tutorial 3: Creating a reusable simple content template

In this video, we explore extending our base template to allow for a reusable simple content template that we'll use for our "About" page.

{% youtube iHHxd5L_gIo %}


## Tutorial 4: Eleventy Collections for Services and Testimonials (where the fun begins)

This video is where the fun begins! We start converting our data over from static HTML to be more dynamic by creating 11ty Collections.

These collections allow us to create a file per service and testimonial and then loop through those in our templates to create the design from our HTML.
{% youtube xzH2XZubgEk %}


## Tutorial 5: Creating a Custom Homepage with front matter and collections

In this tutorial, we'll tackle converting our homepage into a custom template. We'll use front-matter for the one-off data on the homepage. For Services and Testimonials, we'll pull data directly from the collections we created in the previous video. For a new Brands section, we'll create another collection and pull those in as well.
{% youtube 5MpfJNdPnNs %}


## Contact form and Netlify Deploy

In this tutorial, we'll flesh out the contact page, including making a variable for our map and setting up form submissions to Netlify. We'll connect up to GitHub and have Netlify automatically deploy our 11ty site every time we push to master.

{% youtube Rw75idHWPi4 %}

## Coming Soon: NetlifyCMS tutorials
What's new in Node?
Tags: discuss, node, javascript
Published: 2019-05-30 14:00:34

---
title: What's new in Node?
published: true
tags: discuss, node, javascript
---

I used to solely write Node, React and JavaScript but in the last 1.5y I've been focussed on React-Native, Elm and Elixir.

I wanna spruce up and get back into it but I fear I may be slightly behind the ecosystem.

Any massive new libraries, features, patterns, do's/don'ts I should be aware of if I were to start looking for Node jobs anytime soon?
A suitable solution for php microservicies
Tags: php, microservicies
Published: 2019-05-30 13:35:21

---
title: A suitable solution for php microservicies
published: true
description: What is the best tool to transform a huge monolithic php application in a modular structure with php?
tags: php, microservicies
---

I'm the maintainer of a old php web application birth in 2009 from the scratch (there is no framework, sic.) hosted in a Debian server.

It has been upgraded during the time, extended with new functionalities and now is a huge pile of code. But it works.

There is a plan of restyling the user interface, at least client side. This could be the chance  to modularize the application that cover to many areas (relation with clients, contacts with providers, financial account, customer relationship management).

This could be the chance to convert an humongous application in a modular one.

One idea is: use microservicies!

The question is: what is the suitable solution in php?

At the moment I found these solutions:

1) **[ReactPHP](https://reactphp.org/)**, it is easy to install with [Composer](https://getcomposer.org/) but requires a lot of dependencies (e.g. [Symfony](https://symfony.com/)) to work;

2) **[Swoole PHP](https://www.swoole.co.uk/)**, it's a php module that must be installed with [PECL](https://pecl.php.net/). It's fast but not so easy to install in a Debian production server;

3) **[Amphp](https://amphp.org/amp/)**, it is easy to install with composer but has and does not require a lot of dependencies to work;

4) **Web server** that handles the requests on a different port and also catch PUT,DELETE requests.

Any suggestion that could be applied easily in a Debian machine?
Using Serverless architecture and the JAMstack for client work
Tags: jamstack, serverless, staticsites, html
Published: 2019-05-30 13:01:24


I worked at an agency for almost six years. In that time, I created only a handful of static sites. Part of this was because the agency had a custom content management system. The other part was an unwillingness to give up "dynamic" websites.

> **tldr;** I've created a website to aggregate resources for agencies and freelancers looking to branch out into the JAMstack. It's called [_MyClientWants.com_](https://myclientwants.com)

This was definitely an relevant concern when I started, but by the time I left to start my own business, it was no longer valid. 

When a client couldn't use our proprietary CMS, we'd often use WordPress. Our server language of choice was PHP, so this made a lot of sense. WordPress comes with a lot of baggage. It also is it's own style of management. We used "WordPress-specific" hosts to avoid putting a security vulnerability like WordPress on our main application server. 

As developers came and went, we lost most of our WordPress knowledge. Legacy clients still using WordPress became highly problematic.

JAMstack sites are built out of HTML, CSS and JS. Most developers I would look to hire at an agency would be proficient in these. That means that most could figure out how to modify a JAMstack site. Legacy codebases become less problematic.

## Why agencies shy away from the JAMstack

![MyClientWants.com banner](https://thepracticaldev.s3.amazonaws.com/i/wqu5kmxpg380frmyc3wp.jpg)

If JAMstack sites are less of an issue for legacy sites, why do agencies -- which tend to have a decent amount of turnovers -- eschew them?

There tends to be a stigma around "static sites." Most clients have a decent number of requests that seem problematic for static sites at first glance.

Clients want contact forms, e-commerce, a CMS, comments, and more. Unless you've been paying attention to the JAMstack trend, you may not know that these are all possible on a static site.

To fix this stigma, I'm putting together a resource center to help developers figure out even the weirdest of client requests. Let's face it, clients have varied and complicated needs. Let's make sure the JAMstack is up for it. Let's make sure agency developers and designers know of all the tools.

## Meet your clients' desires with MyClientNeeds.com

Head over to [MyClientNeeds.com](https://myclientneeds.com) to view the resources I've compiled so far. The current categories are Forms, Content Management, Integrating with APIs, E-Commerce and User Generated Content.

I've got a couple dozen resources listed, but I plan on that growing quickly. If you have any resources you want to share, [you can post an Issue on the GitHub repo](https://github.com/brob/butmyclientwants.com/issues/new/choose).

I hope this helps folks discover that the JAMstack is the future and they CAN take part in that future today ... even when working with clients.
QuickBooks Salesforce Integration
Tags: quickbooks, salesforce, apex, visualforce
Published: 2019-05-30 12:47:58

[eShopSync](https://eshopsync.com/quickbooks/) for QuickBooks is giving the major goals for synchronizing the accounting data of QuickBooks online to [salesforce](https://appexchange.salesforce.com/appxListingDetail?listingId=a0N3A00000FP1TAUA1). Now dealing with the QuickBooks unlimited data is much easier than ever before. As coming to its functionality user synchronize the Customers, Invoices, Payments, Estimates & Products from QuickBooks in Salesforce.

**Benefits**

<ui>
  <li>Synchronization of Product and services from QuickBooks to Salesforce  
  <li> User can connect up to N number of QuickBooks application to the salesforce end
  <li>Synchronize Invoices, Payments, Estimates from QuickBooks to Salesforce 
  <li>Synchronize customers as accounts and contacts in salesforce </li>
</ui>
[eShopSync for QuickBooks](https://store.webkul.com/Quickbooks-Salesforce-Connector.html) helps you to make effective use of time and Its provides the functionality of Auto synchronization as well as manual synchronization of QuickBooks online data to [salesforce](https://eshopsync.com/quickbooks-salesforce-connector/). It is the most secure in terms of security perspective as everything is managing on the cloud instead of a server.
Why should Drupal be your first choice of open source CMS?
Tags: drupal, webdev, opensource, security
Published: 2019-05-30 12:45:09

---
title: Why should Drupal be your first choice of open source CMS?
published: true
description: Something that started as a small community within India, a decade ago, is something that developers now swear by. As the number of developers increases multi-fold, here’s a snippet of its very melodious roots!
tags: drupal,webdev,opensource,security
---


But what is all the buzz about? Drupal is an open source platform for building digital experiences. We already know of the many benefits and boons that open source comes with.

Here are a few reasons why you should prioritize security and make Drupal your first choice:
1.OWASP
2.The Security Team:
3.Community
4.Encryption of Database
5.Trusted by large enterprises

**[Read more!](https://www.innoraft.com/blogs/why-should-drupal-be-your-first-choice-open-source-cms)**
What would be a technical solution to ✔️ not looking good on dark mode?
Tags: discuss, webdev, css
Published: 2019-05-30 12:30:44

This was brought up in another thread. This and other some other emojis do not translate well to dark backgrounds, such as night theme on this site. I’m not necessarily looking for a specific solution for [dev.to](/), but I’d be curious to hear about possible approaches to this sort of thing.
Use styled-components + ReactNative's FlatList in TypeScript 
Published: 2019-05-30 12:17:36

---
title: Use styled-components + ReactNative's FlatList in TypeScript 
published: true
description: 
tags: 
---

To use `styled-components` + `FlatList`, we have to write like this:

```tsx
interface User {
  id: number
  name: string
}

const StyledFlatList = styled(FlatList as new () => FlatList<User>)`
  background-color: #f7f7f7;
`
```

[edited]
Finally, I added my workaround. I hope someone solve the issue.

https://github.com/styled-components/styled-components/issues/1803#issuecomment-497323287
[/edited]

This is because styled.FlatList does not support by typing definition of styled-components.

see: https://github.com/styled-components/styled-components/issues/1294


Ref: https://github.com/styled-components/styled-components/issues/1803#issuecomment-407332173
react dynamic table creation
Tags: react
Published: 2019-05-30 12:17:13

hey guys i am doing a mini project in which i have to input fields one is row and the another one is column and i have button named create if i enter a value in both the fields and click create a empty table should be created.
for example,if i give 3 in row input and 3 in column input the output should be 3*3 table
#react
#someone knows please do reply
Masons on the roof
Tags: help
Published: 2019-05-30 12:12:34

---
title: Masons on the roof
published: true
tags: help
---

I am seeing the situation that developers get assigned with tasks they are absolutely not qualified to do. Appears to happen more and more frequently. I guess this has to do with the fact that management does not understand that complexity in tech grows fast, thinks devs are all the same and thinking goes like:

You built the mobile app, right? Please set up a Kubernetes cluster on prem tomorrow.

What I have seen is that devs generally don't refuse those tasks (imposter?) even though they likely feel uncomfortable with it and quality suffers.

So far, I am calling this symptom "Masons on the roof" - because quality won't match the work of a slater.

Is there a better known name for this symptom? Any suggested references?

cheers
Andreas
A Sports Analytics Phenomenon Reveals His Secrets Using The Champions League's 2019 Data & a Log Analysis Tool
Tags: analytics, bigdata, dataanalysis, loganalysis
Published: 2019-05-30 11:33:49

---
title:  A Sports Analytics Phenomenon Reveals His Secrets Using The Champions League's 2019 Data & a Log Analysis Tool
published: True
description: Towards the Champions League tournament, we asked our developer (and a sports analytics phenomenon) how does he do it??
tags: analytics, big data, data analysis, log analysis 
---

One of our developers (Eran) is an analytics phenomenon, with a nearly infallible record predicting the outcome of matches (top 0.05% of sport analytics predictions).

Working up to this year’s Champions League tournament on Saturday, (in the context of our office pool) we wanted to understand his secret.

Eran showed us his method. Essentially, he gathered all the data around the matches (players, teams, fouls, etc.) and visualized it into past and predictive stats using our own tool. 

Will this data make you a better predictor? Give it a try!  

Access platform here > https://www.xplg.com/champions-league-results-predictions/
Machine Learning — NLP Vectorization Techniques
Tags: nlp, deeplearning, chatbots, machinelearning
Published: 2019-06-17 15:25:11

---
title: Machine Learning — NLP Vectorization Techniques
published: true
tags: nlp,deep-learning,chatbots,machine-learning
canonical_url: https://medium.com/@bhavaniravi/machine-learning-nlp-vectorization-techniques-27dd0d6fb0d
---

### Machine Learning — NLP Vectorization Techniques

Whenever you start with any ML algorithm that involves text you should convert the text into a bunch of numbers. This is obvious because ML algorithms usually build a probabilistic model(which is math) and math can deal only with numbers.

> The process of converting NLP text into numbers is called vectorization in machine learning.

#### Word Vocabulary

Vocabulary is the list of all the words you are dealing with. If your dataset can contain 1000 documents then your word vocabulary would be a list of unique words from the document. For a generalized chatbot, your vocabulary will have all the words in the language dictionary. For a customer success bot, it will have a language understanding as well as the words with respect to the products or services you provide.

### Bag of words(BoW)

The simplest and most powerful vectorization technique. Given a bunch of sentences BoW is creating a table of words with it’s associated a score denoting it_s_ contribution to the document.

The scoring can be done based on any of the following scoring techniques

1. Word Count — (No of occurrences)
2. Word Frequency — (No. of occurrences/Total number of words)
3. TFIDF Vectorizer — The word that occurs the least carries the most information about the document

**Applications** : BoW is used in spam filtering. Given an email and frequency of words in the email, the simplest approach would be to figure out whether the most occurring words are spammy. TFIDF is used in topic modeling and document tagging.

BoW also found itself a spot with computer vision where the image features are treated as a word vectors and preserved in a sparse matrix.

### Word2Vec

Word2Vec is a strategy where words are represented as a bunch of numbers. These numbers(Vectors) are not assigned in random they are assigned in such a way that two similar words are closer together in a vector space.

![](https://cdn-images-1.medium.com/proxy/1*70iOJhTnYxj7Wc08TMbFaw.png)

#### Applications

1. Parts of speech tagging
2. Entity Extraction
3. Chatbots

![](https://cdn-images-1.medium.com/max/1024/0*JlO7wQeJDLTUTw8q)

### **References**

1. [https://en.wikipedia.org/wiki/Bag-of-words\_model](https://en.wikipedia.org/wiki/Bag-of-words_model)
2. [https://en.wikipedia.org/wiki/Bag-of-words\_model\_in\_computer\_vision](https://en.wikipedia.org/wiki/Bag-of-words_model_in_computer_vision)
3. [https://scikit-learn.org/stable/modules/feature\_extraction.html#text-feature-extraction](https://scikit-learn.org/stable/modules/feature_extraction.html#text-feature-extraction)
4. [https://blog.acolyer.org/2016/04/21/the-amazing-power-of-word-vectors/](https://blog.acolyer.org/2016/04/21/the-amazing-power-of-word-vectors/)
What's the best blogging platform for my needs?
Tags: discuss, blog
Published: 2019-05-30 11:26:31

---
title: What's the best blogging platform for my needs?
published: true
description: Need ideas for a self hosted blog 
tags: #discuss #blog
---

My wife wants to start a travel blog. I was wondering what would be the best platform (self-hosted) to set it up in?

Don't particularly want to use wordpress unless someone can convince me 😁

I've done some research, just wondered if anyone had any favourites!
How to Dockerize a Basic PHP Application?
Tags: php, docker
Published: 2019-05-30 11:24:41

#What is Docker?
Docker is a tool designed to make it easier to create, deploy, and run applications by using containers. Containers allow a developer to package up an application with all of the parts it needs, such as libraries and other dependencies, and ship it all out as one package. 

#Steps for Dockerizing a Basic PHP Application

##Files required for setup
Create a folder in your working directory.

Add the files given below in the directory.

**index.php**

This is a basic PHP file which only prints a text on the screen.

```php
<?php

        echo "Hello - This is my first docker application";

?>
```

**Dockerfile**
```
FROM php:7.2-apache
COPY index.php /var/www/html/index.php
EXPOSE 80
CMD ["/usr/sbin/apache2ctl", "-D", "FOREGROUND"]
```
1. The base image php:7.2-apache is used. The base image is pulled from dockerhub.
2. The file index.php is copied to /var/www/html/ in the image.
3. The port 80 is exposed for apache.
4. Apache is started inside the container.

##Docker Commands

1. Build an image using docker build command. We build the image with the name phpdemo and tag as v1.
```
docker build -t phpdemo:v1 .
```

2. Run the image in a container using docker run command. We run one container from the image phpdemo:v1. Notice the -p tag. It is used to publish the host port 9090 to the container port 80. In short, if any request will come on port 9090, it will redirect that request to our container in port 80.
```
docker run -d -p9090:80 phpdemo:v1
```

3. Open your browser and go to http://localhost:9090/index.php
You should see the output from the PHP file.

#Conclusion
In this article, we discussed how to dockerize a basic PHP application. You can also read more articles on [PHP on Concatly](http://concatly.com/topics/php/ "PHP on Concatly").
What's the best way to store data for my very basic app?
Tags: help, beginners, javascript, java
Published: 2019-05-30 11:12:23

---
title: What's the best way to store data for my very basic app?
published: true
description: 
tags: help, beginners, javascript, java
cover_image: https://thepracticaldev.s3.amazonaws.com/i/7r4hqsip39w48xtx9jby.png
---

I'm creating a very simple app to visualise my progress and grades in my courses, which is something I used to do on paper back in undergrad. I figured it would be a nice simple project which would actually be of use, if only to me.

I've started out creating it as a web app, creating SVG using Javascript. However, I've run into a snag with how to actually get the data in. I want to be able to use a form (or similar) to add new data when I receive grades, but I don't know how to store and access that data. 

From my research, it seems that I can't access a database using Javascript, and I also can't access a local JSON file. Is there another way to have this data stored and be able to be updated and saved? Do I need to create a Java servlet just so that I can read/write a JSON file? (Java is the only backend I know so far, but if there's something else that will make it easier, let me know!) Is this the time to learn one of these mysterious frameworks everyone's on about?

My other alternative is to give in and do the whole thing in Java, but I'd like to have the possibility of putting it online eventually rather than having it tied into a desktop app.

Any advice?