teleren/devto huggingface dataset:
Taking your PHP career to the Netherlands
Tags: php, webdev, career
Published: 2019-09-18 16:47:40

The search for international tech talent from Netherland-based companies represents a huge opportunity to the tech community. However, shabby remote recruitment processes and the challenges of relocation have been getting in the way.

The <a href"https://phpopendoors.landing.jobs/?utm_source=dev.to&utm_medium=referral&utm_content=phpdevelopers&utm_campaign=php-open-doors" >PHP Open Doors</a> aims to remove these constraints by selecting exclusive companies, that are actually interested in investing in recruiting international talent, and providing the opportunity to PHP developers to get to know them in person and meet in their offices.



<b>So what is the PHP Open Doors? </b>
The <a href"https://phpopendoors.landing.jobs/?utm_source=dev.to&utm_medium=referral&utm_content=phpdevelopers&utm_campaign=php-open-doors" >PHP Open Doors</a> is an event to be held in November 14-15th, in which 30 PHP developers will fly for free to the Netherlands to join a 2-day program where they'll get to know some of the local tech companies hiring international talent.

The 30 tech professionals will be able to be fully immersed into what it's like to live and work in the #1 country in the world for work-life balance. If you want to find additional information, I recommend you to also read some blog posts about the country, <a href"https://www.huffingtonpost.co.uk/entry/the-dutch-dream-why-tech-talent-is-heading-to-amsterdam_uk_5d6d1599e4b0cdfe057353a4?guce_referrer=aHR0cHM6Ly93d3cubGlua2VkaW4uY29tL2ZlZWQvdXBkYXRlL3VybjpsaTphY3Rpdml0eTo2NTc1ODU0MzA4NzY2NjAxMjE2Lw&guce_referrer_sig=AQAAABTj75AhHjgwd1i4nDc5PST76xPKqFRgs6t_BNxZJP6X4CtoZjNXXYGwlOt6asATTYf4TQFrXcRvrzkFsI5yE8DRCQHUEvWVWrrBaul0H7Od0QLhI-p4_qUux7M0NB-ZjbQ2Or6y_KXTcsRfznAYmvMvgEZOkek6DLCjeDO_eP-1&_guc_consent_skip=1568042823" >Huffpost</a>, and the event, <a href"https://www.phpclasses.org/blog_post.html?view_post=1905&key=10134c" >Landing.jobs Blog</a>.



<b>How Can a PHP Developer Apply to Participate in the PHP Open Doors?</b>
The application process consists in:

1) application form - in which the candidates' motivations and background fit with PHP positions will be evaluated

2) skill-assessment test - in which the candidates will be able to prove their PHP skills so that it can be assured that they'll be matched with the best tech companies in the Netherlands.




There is only a limited number of spots available and the applications are until the 27th of September. To be one of the lucky 30, you should apply in the events' <a href"https://phpopendoors.landing.jobs/?utm_source=dev.to&utm_medium=referral&utm_content=phpdevelopers&utm_campaign=php-open-doors" >website</a>.
How to access your localhost application on any device
Tags: javascript, android, devops, productivity
Published: 2019-09-18 16:01:51

I have always had problems while trying to test my applications on my localhost machine. The process was so painful that I would have to do some crazy port forwarding on my router (yes, using my internet provider public IP) or even deploy to staging environment server and access it on the desired device (sadly I did it once 😢).

This was until the other day when my coworker (many thanks to Tays) came to me with a magical solution called ngrok. In a nutshell, ngrok exposes local servers behind NATs and firewalls to the public internet over secure tunnels.

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

## What?? I didn’t catch a thing there!

So, all it does, it takes a port on your computer and forwards it to ngrok’s server. This port is linked to a public URL that can be accessed anywhere in the world by any device!

## Wait! Isn’t it dangerous to do that?

Well, we should be safe if we stick to only testing APIs and debugging web apps. We can deploy any application/API on our localhost, expose it using ngrok and then turn it off. And for those who are really worried about security, ngrok has an option to create a password protected tunnel. On top of that, every tunnel is secured through the HTTPS protocol.

## My favourite use cases (so far) ❤:

- Test Web Apps using My Phone before deploying any code to the server
- Debug OAuth integrations with external services
- Many more! ❤
Ornamentum | Reactive Angular Data Table
Tags: angular, javascript, opensource, webdev
Published: 2019-09-18 16:00:44

Lightweight, feature-rich, highly configurable, UI framework agnostic, fully responsive Angular data table with minimal dependencies.

GitHub: https://github.com/yohangz/ornamentum
Official Site: https://ornamentum.app/

Ornamentum is designed with a lot of flexibility in terms of configuring elements to the smallest detail level. It's a library designed by developers in the aim of building "A GREAT API"

Ornamentum is UI framework (Bootstrap, Foundation, Material Design, etc.) agnostic hence it doesn't matter which UI framework you use. The fully configurable theme style sheets bundle provides several UI/UX flavors and extensive customizability out of the box.

Ornamentum is Mobile-friendly with all major device platforms. From Desktop to Tablet and Mobile devices, Ornamentum is fully responsive for any viewport resolution. Dynamic behavior of width calculation works hand in hand along with static column sizes to provide the best user experience.

Ornamentum is built purely with Angular components by adhering to best practices thereby improve performance. No more JQuery to avoid explicit DOM manipulation complications.

Ornamentum supports server-side rendering with angular universal out of the box. This documentation site itself is built with Angular universal.

Ornamentum is Reactive programming ready with asynchronous data streams. Data binding is fully handled via RxJS observable streams which accepts reactive data sources and use them under the hood for paginating, grouping, filtering and sorting data operations.

Ornamentum is lightweight with minimal external dependencies. It only uses loadash/get and loadash/groupby external dependencies apart from angular builtin modules and RxJS.

We truly believe in open-source software. Ornamentum source code is available for anyone to understand, inspect, modify, enhance, and distribute within the terms of MIT license.
REST Architecture - Part 2: Building the Client
Tags: rest, programming, coding, restful
Published: 2019-09-18 15:40:59

---
title: REST Architecture - Part 2: Building the Client
published: true
description: Learn how to build client-server systems by applying the REST architecture principles. Part 2 shows how to build a true RESTful client by using React.
tags: #REST #programming #coding #RESTful
canonical_url: https://auth0.com/blog/rest-architecture-part-2-building-client/
---

This is the second of a two-articles series showing how to build client-server systems by actually applying the REST architecture principles. In the first part, you [learned how to build a RESTful API](https://auth0.com/blog/rest-architecture-part-1-building-api/) that allows you to use a simplified version of the Auth0 Management API. In this article, you will learn how to implement a RESTful client that consumes that API.

You will use React to build the RESTful client, but the principles you are going to apply are valid for any programming language and platform. 

[Read on 🛠](https://auth0.com/blog/rest-architecture-part-2-building-client/?utm_source=dev&utm_medium=sc&utm_campaign=restarchitecture_pt2)

ICYMI: [Part 1: Building The API](https://auth0.com/blog/rest-architecture-part-1-building-api/?utm_source=dev&utm_medium=sc&utm_campaign=restarchitecture_pt1)

![REST Architecture - Part 2: Building the Client] (https://cdn.auth0.com/blog/illustrations/tutorials.png)
Devart .NET Connectivity Solutions Support EF 6.3 and .NET Core 3
Tags: dotnetframework, entityframework, netcore
Published: 2019-09-18 15:23:50

---
title: Devart .NET Connectivity Solutions Support EF 6.3 and .NET Core 3
published: true
description: Devart has recently introduced a significant update for the range of its products. dotConnect ADO.NET data providers now offer the support for Entity Framework 6.3 and .NET Core 3.
tags: Dot Net Framework, Entity Framework, Net Core
---

Devart, a recognized vendor of professional database management software for developers and DBAs, has taken a proactive step in light of Microsoft's growing signals to freeze the development of the Full .NET Framework and make .NET Core 3.0 the recommended platform for all the new applications.

The Czech company ensured its [ADO.NET providers](https://www.devart.com/dotconnect/) for Oracle, MySQL, PostgreSQL, and SQLite with **the support of all the .NET Core versions**: previous 1.x and 2.x releases as well as the new .NET Core 3.0.

Furthermore, with the appearance of Entity Framework 6.3, which now supports .NET Core 3.0 and allows migrating EF Classic applications, Devart also announced the first major addition to .NET Core related features of its ADO.NET providers for .NET Core 3: **Entity Framework 6.3 support in new NuGet packages**.

The vendor remains committed, with both the extension of the legacy features support to ease migration of existing Full .NET Framework projects and the implementation of new features to improve the support of Windows, Linux, and Mac OS platforms.

To get more information about recent updates, please visit — [https://blog.devart.com/entity-framework-6-3-and-net-core-3-support.html](https://blog.devart.com/entity-framework-6-3-and-net-core-3-support.html)

**About Devart**

Devart is one of the leading developers of database tools and administration software, ALM solutions, data providers for various database servers, data integration and backup solutions. The company also implements Web and Mobile development projects.

For additional information about Devart, visit [https://www.devart.com/](https://www.devart.com/)
Sending Binary Commands in Python Over TCP/IP
Tags: python
Published: 2019-09-18 15:06:08



I have recently started working with a company where its business model is wrapped around IOT devices in the field. I was recently tasked to write a python program that will send commands from a server to a device.

To send a command, we first must understand and choose what protocol we will use. I will be sending this command using TCP protocol, and building a packet that is encoded and eligible for delivery on behalf of another host.

Make sure that you have tested the tcp connection between both parties.
Verify that your designated port is open, then test the connection, it is possible that your ip tables / firewall rules could be blocking tcp connections from external hosts. To do this run an Ncat command.

```
nc -vv address port

```



Also you can run this command to listen on a port for an incoming connection

```
nc -vlp 9100

```

If all is good, you should receive a message that says the connection is established.

The first step is to create a socket and establish the connection between the two parties.

```
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect((dns, 9100))

```
Once the connection has been established, its time to send a command. To send a packet, you must first encode the command. Most common use case is command.encode(“utf-8”)

In this case, I am storing the string value in a byte array and concatenating ASCII 27 and ASCII 13 at the beginning and end. 

Now it is ready to be sent as a packet. I am setting the socket to half closed until I receive a response.

```
packet = bytearray("\x1b" + command + "\x0d")
s.send(packet)
s.shutdown(socket.SHUT_WR)
```

To retrieve the response, use s.recv() and the size of the packet will be noted in the method. 
Upon receiving the message, we parse the packet and now we have a response.

```
result = s.recv(1024)
response = result.split('\0', 1)[0].strip()
```

This example only shows a script that is used with Ansible to send commands to many devices. In order for the device to receive and respond, it will also need a python script that will accept the connection, receive, parse and respond.


```
import socket
import sys
def send_command(dns, command):
try:
    s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
    s.connect((dns, 9100))
except (socket.error,socket.herror,socket.gaierror) as (errno,
  
strErr):
    raise Exception("Failed to connect to device" + dns + ": " + 
 
    strErr)
try:
    packet = bytearray("\x1b" + command + "\x0d")
    s.send(packet)
    s.shutdown(socket.SHUT_WR)
    result = s.recv(1024)
    response = result.split('\0', 1)[0].strip() 
    print(response)
    return response
except (socket.error,socket.herror,socket.gaierror) as (errno,        strErr):
    raise Exception("Failed to communicate with device" +    dns   + 
    ": " + strErr)
finally:
    s.close()
def main():
    dns = sys.argv[1]
    command = sys.argv[2]
    send_command(dns, command)
if __name__ == "__main__":
    main()
```

Finally, I will run the file and pass in the required args.

```
python name_of_file.py "host" "command"
```
Screencast Mode in VS Code
Tags: vscode, productivity
Published: 2019-09-18 15:02:09

This post was originally published on [my blog](https://dzhavat.github.io/2019/09/18/screencast-mode-in-vs-code.html).

---

This week I released an update to my VS Code extension that lets you [open a flexbox cheatsheet](https://marketplace.visualstudio.com/items?itemName=dzhavat.css-flexbox-cheatsheet) directly in the editor. The update contains a couple of things but something I really like in particular is a small icon shown in front of the `flex` value to make it easily recognizable. But because of it, I had to make new demo gifs since the old ones didn’t have the icon in them.

For recording gifs I use [ScreenToGif](https://www.screentogif.com/). It’s an excellent little program but something I miss in it is the option to show the keys being pressed during a recording. I needed this because one way to open the cheatsheet is by searching for a specific command in the “Command Pallete” and I wanted the key combination to be visible in the gif.

So VS Code, once again, helped me out because it has this exact functionality already build-in! It’s called “Screencast Mode”. You can toggle it on and off by searching for it in the “Command Pallete”. Here’s how:

* Press `Ctrl+Shift+P` (Win, Linux) or `Cmd+Shift+P` (Mac) and search for `Toggle Screencast Mode`.
* Press `Enter` to activate it.
* (Obviously, repeat the steps to deactivate it)

Now every keystroke will be shown in an overlay. Check this out:

![Showing pressed keys in an overlay](https://thepracticaldev.s3.amazonaws.com/i/hhpxfgom4uyrnsqdrtvf.gif)

But wait, there’s more!

By default, activating this mode will show all keystrokes in the overlay. And oftentimes this might not be what you want. It’d be nice if the overlay only showed the keyboard shortcuts (key combinations) and nothing more.

Well, VS Code has got you covered! Again! 😎

If you open the settings (`Ctrl+,` (Win, Linux), `Cmd+,` (Mac)) and search for `Screencast Mode`, you’ll find two settings. One of them is `Only show keyboard shortcuts in Screencast Mode`. It’s pretty clear what it does.

Now you know how to show all those nifty key shortcuts in your videos/gifs. 🚀
When and how did you learn to code?
Tags: beginners, learn, code
Published: 2019-09-18 14:48:03

---
title: When and how did you learn to code?
published: true
description: Just curious how other people started with coding ...
tags: #beginner #learn #code
---

I think coding carreers are still pretty diverse and that is what I love so much about it. I was always very bad in math and had not the self-confidence to start with coding, so I was some kind of late starter:

* Starting: At the age of 35
* Language: PHP
* First steps with: The book "php for kids" and a video-tutorial on how to create a tumblr-like blog-platform :D
Multiple calling an API with JMeter
Tags: jmeter, loadtesting, test, testing
Published: 2019-09-18 14:45:56

After getting [acquainted with JMeter](https://dev.to/afsharm/jmeter-acquaintance-and-installation-36ag), it's time to solve a real problem. Recently, I am encountering a shameful yet common bug in our project: an special database field which its incremental behavior is controlled by the application rather than database is populated with repetitive values. The field has a strong business impact and should be instantly addressed. The bug is hard to be reproduced. Only one of customers have complained about. After some trial and error, I found that it may be caused by concurrency problems.

**JMeter** comes to play from now. Under correct settings of the tool, I was able to simulate the error. Each run of the **JMeter** results into the same bad results. Having this at disposal, development efforts can easily check whether their solution has resolved the issue correctly. Additionally, the test scenario helps to guess the root cause.

To have **JMeter** to load test the project, firstly, I created a new project. Afterwards, I added a *Thread Group* which was not hard to configure. I just set *number of threads* equal to 5 and set *ramp-up* to same value. In second step, I added a *Sampler* of type *HTTP Request* to the thread group. A thread group says how many threads will be running the test; while, a sampler is the thing which creates the requests and send them to the server. Basic configuration of *HTTP Request* is self explanatory: it just includes server name and, method and path.

By first run via command line, I saw nothing than a bunch of 401 unauthorized errors. The target API was configured to use JWT as the protection guard. It needed an *Authorization* header populated with a suitable token to work, just as *Postman* does. To do so, I added a *HTTP Header Manager Config Element* to the *HTTP request. Then, added two headers, *Authorization* to pass the token, and *Content-Type* set to `application/x-www-form-urlencoded`. The latter gives an ability to me to pass API parameters via *HTTP request*. And the final step was just running it in CLI mode:

```
jmeter -n -t CheckAPI.jmx -l LogFile.log
```

Take a look at this simple but yet useful test project:

![JMeter Test Project](https://thepracticaldev.s3.amazonaws.com/i/k8ljfrq6b8u6x4pwarca.PNG)
Welcome Thread - v41
Tags: welcome
Published: 2019-09-18 14:41:35

---
title: Welcome Thread - v41
published: true
description: Welcome to DEV! A thread of hellos and intros.
tags: welcome
---

![relaxed sloth](https://media.giphy.com/media/xNrM4cGJ8u3ao/giphy.gif)

### Welcome to DEV!

1. Leave a comment below to introduce yourself! You can talk about what brought you here, what you're learning, or just a fun fact about yourself.

2. Reply to someone's comment, either with a question or just a hello. 👋 

**Great to have you in the community!**
Retrieve the permalink for a page and post type.
Tags: wordpress, development, permalinks
Published: 2019-09-18 09:43:26

---
title: Retrieve the permalink for a page and post type.
published: true
description: Learn, how you can retrieve the permalink for a post type and page.
tags: WordPress, Development, permalinks
---

Do you know that the WordPress have some useful functions to link page and archive page? Let's see them in action.

**Scenario :** 
You would normally grab a page link via its ID but in the case that you had a localhost which install and an online install the ID was different, how you can link the page?


##Get the permalink for a page by title##

```
<a href="<?php echo get_permalink( get_page_by_title( 'about' ) ); ?>">About Me</a> 
```

##Get the permalink for a page by name##

```
<a href="<?php echo get_permalink( get_page_by_path( 'About' ) ) ?>">About Me</a>
```

##Get the permalink for a page by slug##

```
<a href="<?php echo get_permalink( get_page_by_path( 'about' ) ); ?>">About Me</a> 
```

##Get the permalink for a page by parent/child##

**Scenario :** 
If you want to get the permalink using the method with child-page, then you need to pass the full slug. So, in this case we have a child page "about" with a parent pages which called "skills". 

```
<a href="<?php echo get_permalink( get_page_by_path( 'about/skills' ) ) ?>">Skills</a
```
##Get the link to custom post type archive page##

**Scenario :** 
If you have a custom posts loop and in the bottom you want to add "View all" link, then how you should lead to the page with all posts that type?


```
 <a href="<?php echo get_post_type_archive_link ( 'your_post_type' ) ?>"</a>
```

_**Note:**_
In case that `get_post_type_archive_link()` returns `false`, make sure that you have used the argument `has_archive => true` when using `register_post_type()`.
Help speeding up website / Mobile View
Tags: help, webdev, html, javascript
Published: 2019-09-18 14:40:43

Hi all,

can someone help me speedup my website[1] before I release version 1.0.0 of SirixDB soon!? Would be great.

What I did so far was scaling images (lower scale), using Webp instead of JPEG files, moved loading of CSS files before Javascript stuff and adding GZipping to the Jekyll configuration. Loading of JQuery stuff asynchronously or deferred...

However, as I'm no frontend engineer I'm having a rather hard time, figuring out all the stuff :-)

I think @import url("font-awesome.min.css"); in the main CSS-file is taking some time, too.

The mobile view seems to be not optimal sadly:

https://developers.google.com/speed/pagespeed/insights/?url=https%3A%2F%2Fsirix.io%2F&tab=mobile

I've used a Jekyll theme, for which I mainly changed CSS stuff :-)

Kind regards
Johannes

[1] https://sirix.io
A Discord transport for Winston Logger
Tags: node, typescript, npm, javascript
Published: 2019-09-18 14:24:05

I just published an npm package to send log messages directly to your Discord channel.

Check out [winston-discord-transport](https://github.com/sidhantpanda/winston-discord-transport) on Github!

It's pretty straight-forward to use if your already use winston to manage server logs.

### Install the package
```
$ npm i winston-discord-transport
```

### Use the transport
```javascript
import winston from "winston";
import DiscordTransport from "winston-discord-transport";

const logger = winston.createLogger({
  transports: [
    new DiscordTransport({
      webhook: "https:/your/discord/webhook",
      defaultMeta: { service: "my_node_service" },
      level: "warn"
    })
  ]
});

logger.log({
  level: "error",
  message: "Error intializing service",
  error: new Error()
});
```

If you provide an `error` in the log message, the transport will send the entire error stack to Discord, so you can pin point the location of error directly from the message.

![Error message screenshot](https://i.ibb.co/nsQR12X/Screenshot-2019-09-18-at-7-04-59-PM.png)

Check out the [README](https://github.com/sidhantpanda/winston-discord-transport) for more information!
What’s your favorite piece of code that you had to throw away?
Tags: agile, discuss, productivity, webdev
Published: 2019-09-18 14:23:57

---
title: What’s your favorite piece of code that you had to throw away?
published: true
tags: agile, discuss, productivity, webdev
---

Ever been here before...?

> Developer: “Hey, I just finished the feature”
> Product Owner: “Oh, the customer actually wanted something different. Sorry about that.”
> Developer: “Oh” {furiously clicks delete}

I know I have had to toss some of my favorite things I’ve written. And I’ve written about how [change can be okay](https://dev.to/cubiclebuddha/your-code-is-not-pretty-your-code-is-already-dead-code-glp) and might even be the best thing for the user.

{% link https://dev.to/cubiclebuddha/your-code-is-not-pretty-your-code-is-already-dead-code-glp %}

But... sometimes you need to _mourn_ something before you can really move on. So tell me about your favorite bit of code that you’ve had to throw away. We can mourn it together so you can move onto even greater software!