teleren/devto huggingface dataset:
Uffizio Goes All The Way To Gitex 2019 Dubai
Published: 2019-09-18 11:22:31

We have great news to share! Uffizio will be participating at the Middle East, North Africa & South Asia’s biggest technology event, GITEX Technology Week, from 6-10 October 2019 at Dubai World Trade Centre and we would love to meet you there and talk to you about our latest products and solutions.

Events like these are a great place for professionals to meet, demonstrating our products and solutions to the world leaders will be a great honour.  For us, it’s also a tremendous opportunity to meet new potential partners in the region as well as strengthen ties with existing partners.

We’re excited about representing our company on the global stage and going head to head with our competition. Meeting our stand guests to hear about their business needs and explaining how Uffizio can help them to grow more.

Our Advance Fleet Management Platform is just a glance at the exciting technologies that we will be proudly presenting at the event.

Here are the few glimpses of Advance features offered by Uffizio at GITEX 2019
Eco-Driving: is an efficient and effective system that guides you to improvise driving behavior and reduce fuel usage. It corrects the driver unconscious, reduces the excessive acceleration during the start off and in of the vehicle.

Fuel Monitoring: it helps you to know when and how much fuel was consumed from the vehicle and generates immediate notifications and alerts.

Video Telematics: it gathers data from sensors and recordings, then analyses the information and provides an effective result, which helps the companies to take necessary steps if required.

Digital Tachograph: is a device fitted in the vehicle which is used to record the driving time, speed of the vehicle, distance covered and the overall driving activity.

On-Board Diagnostics (OBD): is a computer-based system designed to reduce emissions by monitoring the working structure of major components of the engine.

Maintenance Reminder: this feature provides complete fleet health monitoring solutions and generates alerts for various fleet maintenance activities.

Tire Pressure Monitoring Software: Tire Pressure Monitoring System is a modern-day electronic framework designed to monitor the tire air pressure of your fleets or vehicles. 

Advanced Driver Assistance System (ADAS): it is an electronic system which automates, study and adopts the vehicle driving pattern. It acts as an automatic co-pilot of your vehicle.

Meet Us:
We look forward to welcoming you at our stand, Z2-1, located in ZABEEL HALL.

You can read more about the show at GITEX 2019.

Hope to see you soon!
🐳 Login to MySQL on Docker and run a SQL file
Tags: docker
Published: 2019-09-18 11:03:38

---
title: 🐳 Login to MySQL on Docker and run a SQL file
tags: docker
published: true
---

## 🤔Situation
You maintain an app with MySQL and develop it on Docker. You have a dump file as .sql. Then, you want to run it.

## 👌Procedure
### 1. copy the SQL file into the Docker container
```sh
$ docker cp hoge.sql [cotaier-id]:/hoge.sql
```

### 2. Login to Docker
```shell
$ docker ps
$ docker exec -it [container-id] /bin/bash
```

### 3. Login to MySQL
```shell
$ mysql -u root -p
$ show databases;
$ use [your_database_name];
$ show tables;
```

💡hint: if you use a rails app, the password and connection informations should be defined at `config/database.yml`. Perhaps, it is actually written in `.env` file.


### 4. Run the SQL file
```shell
$ source hoge.sql
```
---

## Parent Note
{% link n350071/my-docker-note-3d0m %}
Weekly Cloud-Native Digest #12
Tags: cloud, news
Published: 2019-09-24 10:49:44

---
title: Weekly Cloud-Native Digest #12
published: true
tags: cloud,news
canonical_url: https://educosta.dev/blog/weekly-cloud-native-digest-12/
cover_image: https://thepracticaldev.s3.amazonaws.com/i/0ov6xhnzgga51ad9pkz7.jpg
---

Stay  up-to-date with what’s going on in cloud-native ecosystem. News,  tutorials and useful information on microservices, serverless, containers, kubernetes and more.

- [Play with Docker](https://training.play-with-docker.com/alacart/) 									
- [Developing microservices with aggregates - Chris Richardson](https://www.youtube.com/watch?v=7kX3fs0pWwc&t=6s)
- [Ebook Concepts and Patterns for Streaming Services with Apache Kafka](https://www.confluent.io/designing-event-driven-systems) 									
- [7 Ways to Deal with Application Secrets in Azure](https://www.pulumi.com/blog/7-ways-to-deal-with-application-secrets-in-azure/) 									
- [Distributed systems vocabulary](https://lethain.com/distributed-systems-vocabulary/) 									
- [15 Best Practices to Design Cloud-Native Modern Applications](https://medium.com/faun/15-best-practices-to-design-cloud-native-modern-applications-a2aa9f19cda0) 									
- [Build a Serverless API with Serverless, AWS Lambda and Lambda API](https://www.jeremydaly.com/build-serverless-api-serverless-aws-lambda-lambda-api/) 									
- [Silence of the Lambdas - 5 antipatterns for AWS Lambda](https://dev.to/dgreene/silence-of-the-lambdas---5-antipatterns-for-aws-lambda-e60) 									
- [The Scale Cube](https://microservices.io/articles/scalecube.html) 									
- [Solving 2 Common Deployment Dilemmas in Kubernetes With Istio](https://blog.container-solutions.com/solving-2-common-deployment-dilemmas-in-istio) 							

The post [Weekly Cloud-Native Digest #12](https://educosta.dev/blog/weekly-cloud-native-digest-12/) appeared first on [Be Cloud Native](https://educosta.dev). If you have any doubts or questions feel free to drop a comment here or reach me out on Twitter [@educostadev](http://twitter.com/educostadev).
TypeORM Connection in NestJS
Tags: nestjs, typeorm, orm
Published: 2019-09-18 09:55:59

---
title: TypeORM Connection in NestJS
published: true
description: Following are the steps to connect a MySQL database to a Nest Framework application using TypeORM
tags: nestjs, typeorm, orm
---

*Post in Indonesian, [TypeORM Connection in NestJS](https://antaraksi.com/tutorial-nestjs-untuk-backend-rest-api-bag-2-koneksi-ke-basis-data-mysql/).*

A software can have a function to save data to database. To save data, usually it uses software such as MySQL, SQLite, or MongoDB with communication using ORM (Object-relational Mapping).

NestJS has three ORM support namely TypeORM, Sequelize and Mongoose. In this tutorial I will only use TypeORM. The advantages of TypeORM in NestJS over other ORMs are that TypeORM and Nest Framework are both built using Typescript language so that they can be well integrated.

Following are the steps to connect a MySQL database to a Nest Framework application using TypeORM:

## Install the dependencies.

To begin, we will install the TypeORM dependencies. We will use MySQL as the database.
```
$ npm install --save @nestjs/typeorm typeorm mysql
```

## Create a database in MySQL.

We will create a database now that will be connected to our Nest application in MySQL.
```
CREATE DATABASE hello;
```

## Make a Connection Configuration.

Now, we will make a connection configuration in `AppModule` to connect to our MySQL `hello` database. Import and use the `TypeOrmModule` from Nest here.
```
import { Module } from '@nestjs/common';
import { TypeOrmModule } from '@nestjs/typeorm';

@Module({
  imports: [
    TypeOrmModule.forRoot({
      type: 'mysql',
      host: 'localhost',
      port: 3306,
      username: 'root',
      password: 'root',
      database: 'hello',
      entities: [__dirname + '/**/*.entity{.ts,.js}']
    }),
  ],
})
export class AppModule {}
```
Done, our application can be connected to our `hello` database now. The username and password configuration can be different, adjust it to fit yours.

## Additional: TypeORM CLI.

TypeORM has CLI capabilities that can be used to create entities, migrations, etc. If we make a connection configuration like no. 3 above, we cannot use TypeORM's CLI.

As an alternative, we can make a json-based configuration.

Create a file called `ormconfig.json` at the root of this project, fill in the configuration with:
```
{
  "type": "mysql",
  "host": "localhost",
  "port": 3306,
  "username": "root",
  "password": "root",
  "database": "hello",
  "entities": ["src/**/*.entity{.ts,.js}"],
}
```
Once again, The username and password configuration can be different, adjust it to fit yours.

Now, delete the connection configuration inside `TypeOrmModule.forRoot()` and make it only calls the `TypeOrmModule.forRoot()`
```
import { Module } from '@nestjs/common';
import { TypeOrmModule } from '@nestjs/typeorm';

@Module({
  imports: [TypeOrmModule.forRoot()],
})
export class AppModule {}
```
Done, now we can use the TypeORM CLI because our application now read the connection configuration from `ormconfig.json`.
Handling Redirects in Nuxt.js through Middleware
Tags: nuxt, vue, redirect, seo
Published: 2019-09-18 09:19:20

I recently published an article about [how to handle redirects in Laravel](https://jackwhiting.co.uk/posts/handling-seo-redirects-in-a-laravel-application/), since I also use [Nuxt.js](https://nuxtjs.org/) I thought it would be good to write up how to handle redirects simplistically through pure Nuxt (no server, no advanced configuration).

To do this we'll need to leverage the **serverMiddleware**, you can learn more about this [from the official Nuxt.js docs](https://nuxtjs.org/api/configuration-servermiddleware), but in short, it allows for us to handle additional routes that aren't defined within the folder structure (for example an API). In our case, we will be using the serverMiddleware to read the redirects and take us to the appropriate route.

We are going to create a JSON file to hold all of our redirects and then let the middleware read the start destination and send us to the final destination.

### Create JSON

Create a new JSON file in your project and place it in your desired location. For this example, place the file in the following destination `/data/redirects.json`.

Our JSON should contain an array of elements with a `from` and `to`, please see the below example and adjust this to your own needs.

```json
[
  {
    "from": "/",
    "new": "/home"
  },
  {
    "from": "/get-in-touch",
    "to": "/contact"
  }
]
```

### Create the serverMiddleware

Next, we need to create a file which can handle the reading of the JSON and the logic to handle the redirect. Create a new file in `/serverMiddleware/redirects.js` with the following code:

```js
const redirects = require('../data/redirects.json') // update to your file path

export default function(req, rest, next) {
  // find the redirect if it exists where the from === the requested url
  const redirect = redirects.find(r => r.from === req.url)

  // If it exists, redirect the page with a 301 response else carry on
  if (redirect) {
    res.writeHead(301, { Location: redirect.to })
    res.end()
  } else {
    next()
  }
}
```

The above file checks that the URL exists and if so, redirects to the destination. If not, the Nuxt application will move on and return the requested page.

### Add to Nuxt.config.js

Before anything will work, we need to add the newly created redirects middleware into the `nuxt.config.js` . Edit the `nuxt.config.js` file and add the following in:

```
...
serverMiddleware: [
	'~/serverMiddleware/redirects.js'
],
...
```

Recompile the code and check that everything is working.

#### Bonus

If you need to take the redirects a bit further or if you don't mind using third party packages there is an awesome package available at [https://github.com/nuxt-community/redirect-module](https://github.com/nuxt-community/redirect-module) that can handle this for you.

---

*Like what you read? You can find more articles on my blog at [https://jackwhiting.co.uk](https://jackwhiting.co.uk)*
Get all the images from a folder in HTML with paginated view
Tags: html, javascript, node
Published: 2019-09-18 08:36:11



I have a folder named uploads. An admin uploads a picture in this folder and a user must see all the images with paginated view.

I have read the file using in express but I cannot add it in the HTML.I want to add the images dynamically in HTML. So every time the admin adds a new picture the user must see those images along with the previous ones.

The folder name is uploads and the HTML page is located under views/usernews/addNews.
I created a side project sharing platform, feel free to show off your projects!
Tags: sideprojects
Published: 2019-09-18 08:25:50

As a maker, I tend to spend too much time on development and not enough chance to receive feedbacks from people.

From such standpoint I decided to create a site where people can freely share project updates to gain user reviews.

Key features supported by DevUp are, 
- Project Showcase 
- Share Feature Updates 
- Publish User Engagement Post 
- Technology Stack Share 
- Project Review/Feedback 
- User Support

Project is still in beta stage but would really appreciate if you would share your project with us!

DevUp: https://devup.app

Mock Site: https://devup-staging.netlify.com

![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/qwjtasu1w2id56glxy09.png)
Chinese school holidays: shut up and take my money
Tags: discussstartupmotivation
Published: 2019-09-18 07:53:55

**by [Anton Krotov](https://www.linkedin.com/in/anton-krotov/), Market Researcher at Skyeng company.**

![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/5qiaip5e1jqdsn6uibv3.jpeg)

Chinese students’ summer break is full of despair — it lasts only for a single month, August, and Chinese [“Tiger Parents”](https://en.wikipedia.org/wiki/Tiger_parenting) are always eager to send their kids to as many summer schools and courses as possible. So, this period is all for work, not for fun. And from the side of Chinese EdTech companies, August is marvellous. But before getting there they must survive, perhaps, the most terrible month of the year — July.

In July a fierce competition between Chinese educational companies that provide K12 after-school services reaches to a totally different level — all big companies start to pump up the advertising budgets of their summer courses up to six-figure sums. For instance, last month each of three top K12 educational enterprises — [TAL Education Group](http://en.100tal.com/), [Yuanfudao](https://www.yuanfudao.com/), and [Zuoyebang](https://www.zybang.com/) — have been spending TEN MILLION RMB every day ONLY to promote their SUMMER COURSES (~US$1.5 mln per day). Other top K12 platforms — [Zhangmen](https://www.zhangmen.com/), [17Zuoye](https://17zuoye.com/), [Knowbox](https://www.knowbox.cn/), [VIPKID](https://www.vipkid.com/), [NetEase Youdao](https://www.youdao.com/), [Fudao QQ](https://fudao.qq.com/) and [Genshuixue](https://www.genshuixue.com/)— have spent in total around 3–4 billion RMB (~US$42–52 mln) on similar advertising also in a single month.

In fact, all Chinese EdTech companies are willing to spend a lot of money on this advertising boom for at least one reason — everyone wants to take the largest share of the world’s largest K12 after-school market in its hottest period. This market consists of 59 million students whose parents are ready to pay big money to give their children a better education and more chances to compete for their future.

Source: https://asia.nikkei.com/Business/Education/All-work-and-no-play-for-Chinese-kids-this-summer2
Kreatorschool - Choice based Tutorials #NoCode
Tags: nocode, code, webflow
Published: 2019-09-18 07:51:16

Hello Everyone, I am Rudraksh from Kreatorschool.com, we are a content-based startup where we enlighten people about no code and its significance and where people can come to our workshops to build their own products from scratch without code and validate the idea to prototype.
![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/o7xaugh45ed92lju923e.png)
Mac / Windows / Linux - Which Do You Use?
Tags: discuss, healthydebate, technology
Published: 2019-09-18 07:50:05

---
title: Mac / Windows / Linux - Which Do You Use?
published: true
description: Which operating system are Dev's using? 
tags: #discuss #healthydebate #technology
---

![fight](https://media.giphy.com/media/e37RbTLYjfc1q/giphy.gif)

___

Me personally, I was a long-time Windows user but moved to a Mac about three/four years ago. At the time it was so I could use Sketch, however I liked it so much I have never looked back.
click link in Capybara
Tags: rails
Published: 2019-09-18 06:43:35

---
title: click link in Capybara
tags: rails
---

## 🔗 Parent Note
{% link https://dev.to/n350071/my-capybara-note-2gp3 %}

## 👍 Way1: Usual way.
[Capybara::Node::Actions#click_link](https://www.rubydoc.info/github/jnicklas/capybara/Capybara%2FNode%2FActions:click_link) is easy.

You can just type the text. This example click the link of dev.to edit link.
```ruby
click_link('EDIT')
```

Also, you can do this.
```ruby
click_link(href: "/n350071/my-capybara-note-2gp3/edit")
```

But, if the page has 2 or 3 of same link? You will face to Ambiguous match error.

## 👍 Way2: Workaround
You can use find and find_all method.

```ruby
find('a[href="/n350071/my-capybara-note-2gp3/edit"]') 

find_all('a[href="/n350071/my-capybara-note-2gp3/edit"]').each do
  # do something
  # back
  page.go_back
end
```

---

## If you want to click button, 

```ruby
click_button('SUBMIT')
```
Résumé / CV Sift
Tags: discuss, career
Published: 2019-09-18 06:41:35

---
title: Résumé / CV Sift
published: true
description: why I'll bin your résumé
tags: 
- discuss
- careers

---

So we're hiring -- who isn't? -- and my colleague hands me a stack of CVs. That's 'Curriculum Vitae' here in Merrie Olde England, aka a "résumé" for those of us who enjoy using accents.

"These are the ones I'd like to interview," they say, "but there's still too many. Could you take look at them?"

"Well this one for a start," I say, handing them back the first CV on the stack. "There's two typos in the first paragraph."

"What? Why does that matter?"

It matters. It matters a lot. When I'm going through a stack of résumés I'm not looking for reasons to accept, I'm looking for reasons to reject. And quick ones too; we can get hundreds of applications for a position, especially for a junior role, and I have an actual job to do at the same time. So I want to get rid of 90% of these applications. And the ones with typos are the first to go.

If you can't be bothered to proofread your own CV a few times, or get a friend to read it over, then I'm not going to read it. Why would I hire someone who won't take the time to check how to spell "JavaScript"?

If your CV is more then two pages (one in the US), then I bin it. I do not have time to read your life story. No, changing the font size to 7pt won't help you. You will have to cut stuff.

I select on other things too -- poor formatting for instance -- but you get the idea.

Some people think this is unfair. I get told that we're hiring developers, not writers, and who cares if they can't spell.

The first thing I'd say is that this is fairer than just binning 50% of the applications from the start, at random. Yes, I have seen that done.

But also, these criteria; what are they _really_ testing for? **Concision and accuracy**. These are two excellent attributes for a developer to have, as well as the diligence to check your work before you send it off.

I want to hire someone who _cares_, who has a sense of pride in what they produce. And I think that starts with the CV and the job application.

What do you think?
checkbox in Capybara
Tags: rails
Published: 2019-09-18 06:18:49

---
title: checkbox in Capybara
tags: rails
---

## 🔗 Parent Note
{% link https://dev.to/n350071/my-capybara-note-2gp3 %}

## 👍 Way1: 
[Capybara::Node::Actions#check](https://www.rubydoc.info/github/jnicklas/capybara/Capybara%2FNode%2FActions:check) is easy and similar way with [Capybara::Node::Actions#fill_in](https://www.rubydoc.info/github/jnicklas/capybara/Capybara/Node/Actions:fill_in) for the textbox.

example.
```ruby
# will check a descendant checkbox with a name, id, or label text matching 'German'
page.check('German')

# will check `el` if it's a checkbox element
el.check()
```

## 👍 Way2: Workaround
But, when somehow it doesn't work, try to find the pair label, and click it. It should be work because a checkbox is usually pair with label.

```html
<input type="checkbox" value="1" name="workaround[item_id]" class="workaround" id="workaround_1">
```

```ruby
find("label[for='workaround_1']").click
```
What's wrong with this person?! No! What's wrong with you?
Tags: watercooler, philosophy, stoic
Published: 2019-09-18 06:08:01

There is an e-mail from the [Daily Stoic](https://dailystoic.com/) I go back to read frequently. I try to go back to it every time someone irritates me - so quite frequently. In that mail there is a quote from [Anthony de Mello](https://en.wikipedia.org/wiki/Anthony_de_Mello): "The question to ask is not, 'What's wrong with this person?' but 'What does this irritation tell me about myself?'"

The idea behind is one of the essential elements of Stoicism. All our feelings are coming from the inside. If you see a nice painting, that niceness is not the characteristic of the painting. It's just something you and probably others find nice. But what you find nice is decided by you - even if not consciously. 

The same goes of course with negative feelings. If you have to deal with an irritating person, stop for a second and think about it again. Why do you find him irritating and what does it tell about yourself?

I come quite early to the office in order to avoid traffic. Recently someone joined the team who when he arrived went through the whole department shaking everyone's hands. Every morning. I'm not a jerk if someone arrives and I see him/her, I nod and I say hello. But that's it. I'm not sitting in front of my screens daydreaming about fluffy unicorns, I'm working on something unless I'm fantasizing about unicorns... Most probably I'm in the middle of a [pomodoro](/blog/2018/02/28/setting-yourself-up-to-succeed). The last thing I want is someone to come by to shake my hands and asking me how am I doing when he is not even interested in the answer. 

Beware, if you ask this question from someone from Central or Eastern Europe you might get a really long answer including stories of family members who passed away decades ago.

Was this guy irritating? This behaviour of his, yes it was - for me, maybe for some others too. Does it mean that he's an irritating person? Not at all.

On the other hand, it tells me a lot about myself. It shows how much I respect my own time, my boundaries and the authority on my time. Stepping back and recognizing these motivations might help to handle the situation better.

There might be cases, behaviours that will irritate you a lot. And you will be convinced that it's just simply irritating and it's really not about you. I could also list a couple of things like that, even from the office.
- Knowingly checking in bad code
- Not respecting meeting rules
- Leaving the toilet in a bad shape

But even in those situations, it's worth to think through what you find irritating and why. You might find knowing yourself better in the end and that'll help you a lot in the long run. Not just in your career, but in your personal life too.

_This article has been originally posted on my [blog](http://sandordargo.com/blog/2019/09/18/what-s-wrong-with-this-person). If you are interested in receiving my latest articles, please [sign up to my newsletter](http://eepurl.com/gvcv1j) and [follow me on Twitter](https://twitter.com/SandorDargo)._
how do i get my wordpress website url with Colon ':' ..?
Tags: wordpressshortcode, url, wordpress, php
Published: 2019-09-18 05:51:54

```
add_action( 'init', function() {

	add_shortcode( 'site_url', function( $atts = null, $content = null ) {
		return site_url();
	});

});
```
I'm Using The Short Code **[`site_url`]** and My Short Code Function Returned `https//shad-pro.com/contact-us`

How Do I get The Proper `Url` With Colon **`:`**